Search in sources :

Example 1 with ButtonEvent

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;
}
Also used : VBoxLayout(com.extjs.gxt.ui.client.widget.layout.VBoxLayout) RowData(com.extjs.gxt.ui.client.widget.layout.RowData) Button(com.extjs.gxt.ui.client.widget.button.Button) ButtonEvent(com.extjs.gxt.ui.client.event.ButtonEvent) Margins(com.extjs.gxt.ui.client.util.Margins) Text(com.extjs.gxt.ui.client.widget.Text) ContentPanel(com.extjs.gxt.ui.client.widget.ContentPanel)

Example 2 with ButtonEvent

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();
        }
    });
}
Also used : Button(com.extjs.gxt.ui.client.widget.button.Button) ButtonEvent(com.extjs.gxt.ui.client.event.ButtonEvent)

Example 3 with ButtonEvent

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);
}
Also used : Button(com.extjs.gxt.ui.client.widget.button.Button) ButtonEvent(com.extjs.gxt.ui.client.event.ButtonEvent)

Example 4 with ButtonEvent

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);
    }
}
Also used : Button(com.extjs.gxt.ui.client.widget.button.Button) ButtonEvent(com.extjs.gxt.ui.client.event.ButtonEvent) SelectionListener(com.extjs.gxt.ui.client.event.SelectionListener)

Example 5 with ButtonEvent

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);
    }
}
Also used : Button(com.extjs.gxt.ui.client.widget.button.Button) ButtonEvent(com.extjs.gxt.ui.client.event.ButtonEvent) SelectionListener(com.extjs.gxt.ui.client.event.SelectionListener)

Aggregations

ButtonEvent (com.extjs.gxt.ui.client.event.ButtonEvent)9 Button (com.extjs.gxt.ui.client.widget.button.Button)7 SelectionListener (com.extjs.gxt.ui.client.event.SelectionListener)2 Margins (com.extjs.gxt.ui.client.util.Margins)1 ContentPanel (com.extjs.gxt.ui.client.widget.ContentPanel)1 Text (com.extjs.gxt.ui.client.widget.Text)1 RowData (com.extjs.gxt.ui.client.widget.layout.RowData)1 VBoxLayout (com.extjs.gxt.ui.client.widget.layout.VBoxLayout)1 ScheduledCommand (com.google.gwt.core.client.Scheduler.ScheduledCommand)1 AsyncCallback (com.google.gwt.user.client.rpc.AsyncCallback)1 UpdateUserPermissions (org.activityinfo.legacy.shared.command.UpdateUserPermissions)1 UserExistsException (org.activityinfo.legacy.shared.command.result.UserExistsException)1 VoidResult (org.activityinfo.legacy.shared.command.result.VoidResult)1 LocationDTO (org.activityinfo.legacy.shared.model.LocationDTO)1 ApplyFilterEvent (org.activityinfo.ui.client.component.filter.FilterToolBar.ApplyFilterEvent)1 ApplyFilterHandler (org.activityinfo.ui.client.component.filter.FilterToolBar.ApplyFilterHandler)1 RemoveFilterEvent (org.activityinfo.ui.client.component.filter.FilterToolBar.RemoveFilterEvent)1 RemoveFilterHandler (org.activityinfo.ui.client.component.filter.FilterToolBar.RemoveFilterHandler)1 FormDialogCallback (org.activityinfo.ui.client.page.common.dialog.FormDialogCallback)1 FormDialogImpl (org.activityinfo.ui.client.page.common.dialog.FormDialogImpl)1