OPEN = NbBundle.getMessage(DynamicRangePanel.class, "DynamicRangePanel.timelineButton.text");
CLOSE = NbBundle.getMessage(DynamicRangePanel.class, "DynamicRangePanel.timelineButton.closetext");
}
public void setup(final DynamicRangeFilter filter) {
final TopComponent topComponent = WindowManager.getDefault().findTopComponent("TimelineTopComponent");
timelineButton.setText(topComponent.isOpened() ? CLOSE : OPEN);
timelineButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (!topComponent.isOpened()) {
topComponent.open();
topComponent.requestActive();
timelineButton.setText(CLOSE);
} else {
topComponent.close();
timelineButton.setText(OPEN);
}
}
});
keepEmptyCheckbox.setSelected(filter.isKeepNull());