Search in sources :

Example 1 with BottomComponent

use of org.gephi.desktop.banner.perspective.spi.BottomComponent in project gephi by gephi.

the class DynamicRangePanel method setup.

public void setup(final DynamicRangeFilter filter) {
    final BottomComponent bottomComponent = Lookup.getDefault().lookup(BottomComponent.class);
    timelineButton.setText(bottomComponent.isVisible() ? CLOSE : OPEN);
    timelineButton.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            if (!bottomComponent.isVisible()) {
                bottomComponent.setVisible(true);
                timelineButton.setText(CLOSE);
            } else {
                bottomComponent.setVisible(false);
                timelineButton.setText(OPEN);
            }
        }
    });
    keepEmptyCheckbox.setSelected(filter.isKeepNull());
    keepEmptyCheckbox.addItemListener(new ItemListener() {

        @Override
        public void itemStateChanged(ItemEvent e) {
            if (!filter.isKeepNull() == keepEmptyCheckbox.isSelected()) {
                filter.getProperties()[1].setValue(keepEmptyCheckbox.isSelected());
            }
        }
    });
}
Also used : ItemEvent(java.awt.event.ItemEvent) ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent) ItemListener(java.awt.event.ItemListener) BottomComponent(org.gephi.desktop.banner.perspective.spi.BottomComponent)

Aggregations

ActionEvent (java.awt.event.ActionEvent)1 ActionListener (java.awt.event.ActionListener)1 ItemEvent (java.awt.event.ItemEvent)1 ItemListener (java.awt.event.ItemListener)1 BottomComponent (org.gephi.desktop.banner.perspective.spi.BottomComponent)1