use of org.jowidgets.common.widgets.controller.IActionListener in project jo-client-platform by jo-source.
the class GraphSettingsDialog method createDefaultSetterButton.
private void createDefaultSetterButton(final IScrollComposite content) {
final IButton btn = content.add(BPF.button("Reset", "Set settings to default"), "growx, w 0::75, alignx left");
btn.addActionListener(new IActionListener() {
@Override
public void actionPerformed() {
final Set<ISlider> sliders = DEFAULT_SLIDER_SETTINGS.keySet();
for (final ISlider slider : sliders) {
slider.setValue(DEFAULT_SLIDER_SETTINGS.get(slider));
}
}
});
final IButton btnCancel = content.add(BPF.buttonCancel(), " w 0:75:, span 2, alignx right");
btnCancel.addActionListener(new IActionListener() {
@Override
public void actionPerformed() {
closeDialog();
}
});
}
use of org.jowidgets.common.widgets.controller.IActionListener in project jo-client-platform by jo-source.
the class BeanTableSettingsDialogImpl method createButtonBar.
private void createButtonBar(final IComposite buttonBar) {
buttonBar.setLayout(new MigLayoutDescriptor("0[][]0", "0[]0"));
final IButton ok = buttonBar.add(bpF.button(Messages.getString("BeanTableSettingsDialogImpl.ok")), "w 80::, aligny b, sg bg");
ok.addActionListener(new IActionListener() {
@Override
public void actionPerformed() {
okPressed = true;
setVisible(false);
}
});
frame.setDefaultButton(ok);
final IButton cancel = buttonBar.add(bpF.button(Messages.getString("BeanTableSettingsDialogImpl.cancel")), "w 80::, aligny b, sg bg");
cancel.addActionListener(new IActionListener() {
@Override
public void actionPerformed() {
setVisible(false);
}
});
}
Aggregations