Search in sources :

Example 11 with ClickEvent

use of com.google.gwt.event.dom.client.ClickEvent in project che by eclipse.

the class MoveViewImpl method createButtons.

private void createButtons(JavaLocalizationConstant locale) {
    preview = createButton(locale.moveDialogButtonPreview(), "move-preview-button", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onPreviewButtonClicked();
        }
    });
    Button cancel = createButton(locale.moveDialogButtonCancel(), "move-cancel-button", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            hide();
            delegate.onCancelButtonClicked();
        }
    });
    accept = createButton(locale.moveDialogButtonOk(), "move-accept-button", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onAcceptButtonClicked();
        }
    });
    addButtonToFooter(accept);
    addButtonToFooter(cancel);
    addButtonToFooter(preview);
}
Also used : ClickHandler(com.google.gwt.event.dom.client.ClickHandler) Button(com.google.gwt.user.client.ui.Button) ClickEvent(com.google.gwt.event.dom.client.ClickEvent)

Example 12 with ClickEvent

use of com.google.gwt.event.dom.client.ClickEvent in project che by eclipse.

the class OrganizeImportsViewImpl method createButtons.

private void createButtons(JavaLocalizationConstant locale) {
    back = createButton(locale.organizeImportsButtonBack(), "imports-back-button", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onBackButtonClicked();
        }
    });
    next = createButton(locale.organizeImportsButtonNext(), "imports-next-button", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onNextButtonClicked();
        }
    });
    Button cancel = createButton(locale.organizeImportsButtonCancel(), "imports-cancel-button", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            hide();
            delegate.onCancelButtonClicked();
        }
    });
    finish = createPrimaryButton(locale.organizeImportsButtonFinish(), "imports-finish-button", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onFinishButtonClicked();
        }
    });
    addButtonToFooter(finish);
    addButtonToFooter(cancel);
    addButtonToFooter(next);
    addButtonToFooter(back);
}
Also used : ClickHandler(com.google.gwt.event.dom.client.ClickHandler) Button(com.google.gwt.user.client.ui.Button) ClickEvent(com.google.gwt.event.dom.client.ClickEvent)

Example 13 with ClickEvent

use of com.google.gwt.event.dom.client.ClickEvent in project che by eclipse.

the class OrganizeImportsViewImpl method show.

/** {@inheritDoc} */
@Override
public void show(ConflictImportDTO match) {
    container.clear();
    List<String> matches = match.getTypeMatches();
    for (String fqn : matches) {
        final Label label = new Label(fqn);
        if (fqn.equals(selectedImport)) {
            selectedLabel = label;
            selectedLabel.getElement().getStyle().setBackgroundColor(getEditorSelectionColor());
        }
        label.getElement().getStyle().setColor(getMainFontColor());
        label.getElement().getStyle().setCursor(POINTER);
        label.addClickHandler(new ClickHandler() {

            @Override
            public void onClick(ClickEvent clickEvent) {
                selectedLabel.getElement().getStyle().setBackgroundColor("initial");
                selectedLabel = label;
                label.getElement().getStyle().setBackgroundColor(getEditorSelectionColor());
            }
        });
        container.add(label);
    }
    super.show();
}
Also used : ClickHandler(com.google.gwt.event.dom.client.ClickHandler) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) Label(com.google.gwt.user.client.ui.Label)

Example 14 with ClickEvent

use of com.google.gwt.event.dom.client.ClickEvent in project che by eclipse.

the class ShowSshKeyViewImpl method addButtons.

private void addButtons() {
    Button cancel = createButton(locale.cancel(), "copy-machine-key-cancel-button", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            hide();
        }
    });
    addButtonToFooter(cancel);
}
Also used : ClickHandler(com.google.gwt.event.dom.client.ClickHandler) Button(com.google.gwt.user.client.ui.Button) ClickEvent(com.google.gwt.event.dom.client.ClickEvent)

Example 15 with ClickEvent

use of com.google.gwt.event.dom.client.ClickEvent in project opentsdb by OpenTSDB.

the class MetricForm method setupDownsampleWidgets.

private void setupDownsampleWidgets() {
    downsampler.setEnabled(false);
    fill_policy.setEnabled(false);
    interval.setEnabled(false);
    interval.setMaxLength(5);
    interval.setVisibleLength(5);
    interval.setValue("10m");
    interval.setValidationRegexp("^[1-9][0-9]*[smhdwy]$");
    downsample.addClickHandler(new ClickHandler() {

        public void onClick(final ClickEvent event) {
            final boolean checked = ((CheckBox) event.getSource()).getValue();
            downsampler.setEnabled(checked);
            fill_policy.setEnabled(checked);
            interval.setEnabled(checked);
            if (checked) {
                downsampler.setFocus(true);
            }
        }
    });
}
Also used : ClickHandler(com.google.gwt.event.dom.client.ClickHandler) ClickEvent(com.google.gwt.event.dom.client.ClickEvent)

Aggregations

ClickEvent (com.google.gwt.event.dom.client.ClickEvent)316 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)314 CustomButton (cz.metacentrum.perun.webgui.widgets.CustomButton)161 JsonCallbackEvents (cz.metacentrum.perun.webgui.json.JsonCallbackEvents)135 TabMenu (cz.metacentrum.perun.webgui.widgets.TabMenu)124 ArrayList (java.util.ArrayList)117 JavaScriptObject (com.google.gwt.core.client.JavaScriptObject)105 TabItem (cz.metacentrum.perun.webgui.tabs.TabItem)76 ExtendedSuggestBox (cz.metacentrum.perun.webgui.widgets.ExtendedSuggestBox)40 PerunError (cz.metacentrum.perun.webgui.model.PerunError)36 ChangeEvent (com.google.gwt.event.dom.client.ChangeEvent)32 ExtendedTextBox (cz.metacentrum.perun.webgui.widgets.ExtendedTextBox)32 ChangeHandler (com.google.gwt.event.dom.client.ChangeHandler)31 HashMap (java.util.HashMap)31 Button (com.google.gwt.user.client.ui.Button)30 FlexCellFormatter (com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter)25 PerunSearchEvent (cz.metacentrum.perun.webgui.client.resources.PerunSearchEvent)23 ListBoxWithObjects (cz.metacentrum.perun.webgui.widgets.ListBoxWithObjects)20 Map (java.util.Map)20 User (cz.metacentrum.perun.webgui.model.User)19