Search in sources :

Example 1 with ClickHandler

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

the class ProjectExplorerViewImpl method initGoIntoBackButton.

private void initGoIntoBackButton() {
    goBackButton = new ToolButton(FontAwesome.ARROW_CIRCLE_O_LEFT);
    goBackButton.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            tree.getGoInto().reset();
        }
    });
    goBackButton.ensureDebugId(GO_BACK_BUTTON_ID);
    Tooltip.create((elemental.dom.Element) goBackButton.getElement(), BOTTOM, MIDDLE, "Go Back");
    addToolButton(goBackButton);
}
Also used : ClickHandler(com.google.gwt.event.dom.client.ClickHandler) ToolButton(org.eclipse.che.ide.api.parts.base.ToolButton) ClickEvent(com.google.gwt.event.dom.client.ClickEvent)

Example 2 with ClickHandler

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

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

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

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

the class NotificationPopup method createCloseWidget.

/**
     * Create close icon widget that contains an close notification icon.
     *
     * @return {@link SimplePanel} as close icon wrapper
     */
private SimplePanel createCloseWidget() {
    SimplePanel closeWrapper = new SimplePanel();
    SVGImage closeImage = new SVGImage(resources.closeIcon());
    closeImage.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onClose(notification);
        }
    });
    closeWrapper.add(closeImage);
    closeWrapper.setStyleName(resources.notificationCss().notificationPopupCloseButtonWrapper());
    closeWrapper.ensureDebugId(CLOSE_ICON_DBG_ID + notification.getId());
    return closeWrapper;
}
Also used : ClickHandler(com.google.gwt.event.dom.client.ClickHandler) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) SimplePanel(com.google.gwt.user.client.ui.SimplePanel) SVGImage(org.vectomatic.dom.svg.ui.SVGImage)

Aggregations

ClickHandler (com.google.gwt.event.dom.client.ClickHandler)447 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)437 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)128 JavaScriptObject (com.google.gwt.core.client.JavaScriptObject)110 TabItem (cz.metacentrum.perun.webgui.tabs.TabItem)79 ChangeEvent (com.google.gwt.event.dom.client.ChangeEvent)48 ChangeHandler (com.google.gwt.event.dom.client.ChangeHandler)47 ExtendedSuggestBox (cz.metacentrum.perun.webgui.widgets.ExtendedSuggestBox)41 PerunError (cz.metacentrum.perun.webgui.model.PerunError)38 HashMap (java.util.HashMap)37 Button (com.google.gwt.user.client.ui.Button)35 HTML (com.google.gwt.user.client.ui.HTML)34 ExtendedTextBox (cz.metacentrum.perun.webgui.widgets.ExtendedTextBox)33 Button (org.gwtbootstrap3.client.ui.Button)33 FlexCellFormatter (com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter)31 Image (com.google.gwt.user.client.ui.Image)30 Map (java.util.Map)27