Search in sources :

Example 1 with ClickEvent

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

the class ExpandEditorAction method createCustomComponent.

@Override
public Widget createCustomComponent(Presentation presentation) {
    if (buttonPanel != null) {
        return buttonPanel;
    }
    final Element tooltip = DOM.createSpan();
    tooltip.setInnerHTML(constant.actionExpandEditorTitle());
    buttonPanel = new FlowPanel();
    buttonPanel.addStyleName(resources.coreCss().editorFullScreen());
    button = new FlowPanel();
    button.getElement().setInnerHTML(FontAwesome.EXPAND);
    button.addDomHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            toggleExpand();
        }
    }, ClickEvent.getType());
    buttonPanel.add(button);
    buttonPanel.getElement().appendChild(tooltip);
    buttonPanel.addDomHandler(new MouseOverHandler() {

        @Override
        public void onMouseOver(MouseOverEvent event) {
            final Element panel = event.getRelativeElement();
            tooltip.getStyle().setProperty("top", (panel.getAbsoluteTop() + panel.getOffsetHeight() + 9) + "px");
            tooltip.getStyle().setProperty("right", (Document.get().getClientWidth() - panel.getAbsoluteRight() - 2) + "px");
        }
    }, MouseOverEvent.getType());
    return buttonPanel;
}
Also used : ClickHandler(com.google.gwt.event.dom.client.ClickHandler) Element(com.google.gwt.dom.client.Element) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) MouseOverEvent(com.google.gwt.event.dom.client.MouseOverEvent) FlowPanel(com.google.gwt.user.client.ui.FlowPanel) MouseOverHandler(com.google.gwt.event.dom.client.MouseOverHandler)

Example 2 with ClickEvent

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

the class BaseView method addMenuButton.

/**
     * Adds part menu button.
     */
private void addMenuButton() {
    final ToolButton menuButton = new ToolButton(FontAwesome.COG + " " + FontAwesome.CARET_DOWN);
    menuButton.getElement().setAttribute("name", "workBenchIconMenu");
    menuButton.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            int left = getAbsoluteLeft(menuButton.getElement());
            int top = getAbsoluteTop(menuButton.getElement());
            delegate.onPartMenu(left, top + 21);
        }
    });
    toolbarHeader.addEast(menuButton, 25);
    if (menuButton.getElement() instanceof elemental.dom.Element) {
        Tooltip.create((elemental.dom.Element) menuButton.getElement(), PositionController.VerticalAlign.BOTTOM, PositionController.HorizontalAlign.MIDDLE, "Panel options");
    }
}
Also used : DoubleClickHandler(com.google.gwt.event.dom.client.DoubleClickHandler) ClickHandler(com.google.gwt.event.dom.client.ClickHandler) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) DoubleClickEvent(com.google.gwt.event.dom.client.DoubleClickEvent)

Example 3 with ClickEvent

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

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

the class ChangedListViewImpl method createButtons.

private void createButtons() {
    changeViewModeButton.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent clickEvent) {
            delegate.onChangeViewModeButtonClicked();
        }
    });
    expandButton.setTitle(locale.changeListExpandCollapseAllButtonTitle());
    expandButton.getElement().setInnerHTML(FontAwesome.EXPAND);
    expandButton.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent clickEvent) {
            delegate.onExpandButtonClicked();
        }
    });
    collapseButton.setTitle(locale.changeListCollapseAllButtonTitle());
    collapseButton.getElement().setInnerHTML(FontAwesome.COMPRESS);
    collapseButton.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent clickEvent) {
            delegate.onCollapseButtonClicked();
        }
    });
    Button btnClose = createButton(locale.buttonClose(), "git-compare-btn-close", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onCloseClicked();
        }
    });
    addButtonToFooter(btnClose);
    btnCompare = createButton(locale.buttonCompare(), "git-compare-btn-compare", new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            delegate.onCompareClicked();
        }
    });
    addButtonToFooter(btnCompare);
}
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 ClickEvent

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

the class RecipeWidgetImplTest method tagShouldBeSelected.

@Test
public void tagShouldBeSelected() {
    ClickEvent clickEvent = mock(ClickEvent.class);
    tag.setDelegate(delegate);
    tag.onClick(clickEvent);
    verify(delegate).onTagClicked(tag);
}
Also used : ClickEvent(com.google.gwt.event.dom.client.ClickEvent) Test(org.junit.Test)

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