use of com.extjs.gxt.ui.client.widget.button.Button in project activityinfo by bedatadriven.
the class FilterToolBar method createRemoveButton.
private void createRemoveButton() {
if (renderRemoveButton) {
removeButton = new Button(I18N.CONSTANTS.remove(), IconImageBundle.ICONS.delete(), new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
fireEvent(new RemoveFilterEvent());
}
});
add(removeButton);
setRemoveFilterEnabled(false);
}
}
use of com.extjs.gxt.ui.client.widget.button.Button in project activityinfo by bedatadriven.
the class ActionToolBar method setDirty.
public void setDirty(boolean dirty) {
Button currentSaveButton = getSaveButton();
if (currentSaveButton != null) {
currentSaveButton.setEnabled(dirty);
if (dirty) {
currentSaveButton.setText(I18N.CONSTANTS.save());
currentSaveButton.setIcon(IconImageBundle.ICONS.save());
} else {
currentSaveButton.setText(I18N.CONSTANTS.saved());
}
}
}
use of com.extjs.gxt.ui.client.widget.button.Button in project activityinfo by bedatadriven.
the class FormDialogImpl method createCancelButton.
private void createCancelButton() {
cancelButton = new Button(I18N.CONSTANTS.cancel());
cancelButton.setIcon(IconImageBundle.ICONS.cancel());
addButton(cancelButton);
cancelButton.addListener(Events.Select, new Listener<ButtonEvent>() {
@Override
public void handleEvent(ButtonEvent be) {
hide();
onCancel();
}
});
}
use of com.extjs.gxt.ui.client.widget.button.Button in project activityinfo by bedatadriven.
the class FormDialogImpl method createSaveButton.
private void createSaveButton() {
saveButton = new Button(I18N.CONSTANTS.save());
saveButton.setIcon(IconImageBundle.ICONS.save());
saveButton.addListener(Events.Select, new Listener<ButtonEvent>() {
@Override
public void handleEvent(ButtonEvent be) {
// use a deferred handler to make sure we get any change
// events first
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
if (!form.isValid()) {
MessageBox.alert(getHeadingHtml(), fromSafeConstant(I18N.CONSTANTS.pleaseCompleteForm()), null);
} else {
onValidated();
}
}
});
}
});
addButton(saveButton);
}
Aggregations