Search in sources :

Example 6 with ClickHandler

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

the class EditDebugConfigurationsViewImpl method createButtons.

private void createButtons() {
    saveButton = createButton(coreLocale.save(), "window-edit-debug-configurations-save", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onSaveClicked();
        }
    });
    saveButton.addStyleName(Window.resources.windowCss().primaryButton());
    overFooter.add(saveButton);
    cancelButton = createButton(coreLocale.cancel(), "window-edit-debug-configurations-cancel", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onCancelClicked();
        }
    });
    overFooter.add(cancelButton);
    debugButton = createButton(coreLocale.debug(), "window-edit-debug-configurations-debug", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onDebugClicked();
        }
    });
    overFooter.add(debugButton);
    closeButton = createButton(coreLocale.close(), "window-edit-debug-configurations-close", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onCloseClicked();
        }
    });
    closeButton.addDomHandler(new BlurHandler() {

        @Override
        public void onBlur(BlurEvent blurEvent) {
            //set default focus
            selectText(filterInputField.getElement());
        }
    }, BlurEvent.getType());
    addButtonToFooter(closeButton);
    Element dummyFocusElement = DOM.createSpan();
    dummyFocusElement.setTabIndex(0);
    getFooter().getElement().appendChild(dummyFocusElement);
}
Also used : BlurHandler(com.google.gwt.event.dom.client.BlurHandler) ClickHandler(com.google.gwt.event.dom.client.ClickHandler) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) SpanElement(com.google.gwt.dom.client.SpanElement) Element(com.google.gwt.dom.client.Element) BlurEvent(com.google.gwt.event.dom.client.BlurEvent)

Example 7 with ClickHandler

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

the class EditCommandsViewImpl method createButtons.

private void createButtons() {
    saveButton = createButton(coreLocale.save(), "window-edit-commands-save", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onSaveClicked();
        }
    });
    saveButton.addStyleName(Window.resources.windowCss().primaryButton());
    buttonsPanel.add(saveButton);
    cancelButton = createButton(coreLocale.cancel(), "window-edit-commands-cancel", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onCancelClicked();
        }
    });
    buttonsPanel.add(cancelButton);
    closeButton = createButton(coreLocale.close(), "window-edit-commands-close", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onCloseClicked();
        }
    });
    closeButton.addDomHandler(new BlurHandler() {

        @Override
        public void onBlur(BlurEvent blurEvent) {
            //set default focus
            selectText(filterInputField.getElement());
        }
    }, BlurEvent.getType());
    addButtonToFooter(closeButton);
    Element dummyFocusElement = DOM.createSpan();
    dummyFocusElement.setTabIndex(0);
    getFooter().getElement().appendChild(dummyFocusElement);
}
Also used : BlurHandler(com.google.gwt.event.dom.client.BlurHandler) ClickHandler(com.google.gwt.event.dom.client.ClickHandler) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) SpanElement(com.google.gwt.dom.client.SpanElement) Element(com.google.gwt.dom.client.Element) BlurEvent(com.google.gwt.event.dom.client.BlurEvent)

Example 8 with ClickHandler

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

the class ShowReferenceViewImpl method addButtons.

private void addButtons() {
    Button cancel = createButton(locale.cancel(), "copy-reference-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 9 with ClickHandler

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

the class ProjectClasspathViewImpl method createButtons.

private void createButtons() {
    doneButton = createPrimaryButton(localization.buttonDone(), "window-edit-configurations-close", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onDoneClicked();
        }
    });
    addButtonToFooter(doneButton);
    Element dummyFocusElement = DOM.createSpan();
    dummyFocusElement.setTabIndex(0);
    getFooter().getElement().appendChild(dummyFocusElement);
}
Also used : ClickHandler(com.google.gwt.event.dom.client.ClickHandler) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) SpanElement(com.google.gwt.dom.client.SpanElement) Element(com.google.gwt.dom.client.Element)

Example 10 with ClickHandler

use of com.google.gwt.event.dom.client.ClickHandler 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)

Aggregations

ClickHandler (com.google.gwt.event.dom.client.ClickHandler)448 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)442 CustomButton (cz.metacentrum.perun.webgui.widgets.CustomButton)168 JsonCallbackEvents (cz.metacentrum.perun.webgui.json.JsonCallbackEvents)143 TabMenu (cz.metacentrum.perun.webgui.widgets.TabMenu)129 ArrayList (java.util.ArrayList)125 JavaScriptObject (com.google.gwt.core.client.JavaScriptObject)110 TabItem (cz.metacentrum.perun.webgui.tabs.TabItem)79 ChangeEvent (com.google.gwt.event.dom.client.ChangeEvent)49 ChangeHandler (com.google.gwt.event.dom.client.ChangeHandler)48 ExtendedSuggestBox (cz.metacentrum.perun.webgui.widgets.ExtendedSuggestBox)41 PerunError (cz.metacentrum.perun.webgui.model.PerunError)38 Button (com.google.gwt.user.client.ui.Button)35 HashMap (java.util.HashMap)34 ExtendedTextBox (cz.metacentrum.perun.webgui.widgets.ExtendedTextBox)33 Button (org.gwtbootstrap3.client.ui.Button)33 HTML (com.google.gwt.user.client.ui.HTML)31 Image (com.google.gwt.user.client.ui.Image)29 FlexCellFormatter (com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter)28 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)26