use of com.extjs.gxt.ui.client.event.ButtonEvent in project activityinfo by bedatadriven.
the class ReportViewRetrier method createRetryPanel.
private static ContentPanel createRetryPanel(final Throwable caught, final ClickHandler retryCallback) {
Button retryButton = new Button(I18N.CONSTANTS.retry());
retryButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
if (retryCallback != null) {
retryCallback.onClick(null);
}
}
});
Text label = new Text(ExceptionOracle.getExplanation(caught));
label.setWidth("50%");
VBoxLayout layout = new VBoxLayout(VBoxLayout.VBoxLayoutAlign.CENTER);
ContentPanel panel = new ContentPanel();
panel.setHeaderVisible(false);
panel.setLayout(layout);
panel.add(label, new RowData(1, -1, new Margins(4)));
panel.add(retryButton, new RowData(-1, -1, new Margins(4)));
return panel;
}
use of com.extjs.gxt.ui.client.event.ButtonEvent in project activityinfo by bedatadriven.
the class MailingListDialog method createCloseButton.
private void createCloseButton() {
closeButton = new Button(I18N.CONSTANTS.close());
addButton(closeButton);
closeButton.addListener(Events.Select, new Listener<ButtonEvent>() {
@Override
public void handleEvent(ButtonEvent be) {
hide();
}
});
}
use of com.extjs.gxt.ui.client.event.ButtonEvent in project activityinfo by bedatadriven.
the class ExportDialog method createButtons.
@Override
protected void createButtons() {
button = new Button();
button.setText(I18N.CONSTANTS.cancel());
button.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
ExportDialog.this.canceled = true;
bar.reset();
hide();
}
});
getButtonBar().add(button);
}
use of com.extjs.gxt.ui.client.event.ButtonEvent in project activityinfo by bedatadriven.
the class FilterToolBar method createApplyButton.
private void createApplyButton() {
if (renderApplyButton) {
applyButton = new Button(I18N.CONSTANTS.apply(), IconImageBundle.ICONS.applyFilter(), new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
fireEvent(new ApplyFilterEvent());
}
});
add(applyButton);
setApplyFilterEnabled(false);
}
}
use of com.extjs.gxt.ui.client.event.ButtonEvent 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);
}
}
Aggregations