Package elemental.events

Examples of elemental.events.MouseEvent$Button


          evt.preventDefault();
        }

        @Override
        protected void onOtherEvent(Event evt) {
          MouseEvent mouseEvt = (MouseEvent) evt;

          // This is a click on the root.
          dispatchOnRootContextMenuEvent(mouseEvt.getClientX(), mouseEvt.getClientY());
        }

        @Override
        protected void onTreeNodeBodyChildEvent(Event evt, Element treeNodeBody) {
          MouseEvent mouseEvt = (MouseEvent) evt;

          // Dispatch if eventTarget is the treeNodeBody, or if it is a child
          // of a treeNodeBody.
          dispatchContextMenuEvent(
              mouseEvt.getClientX(), mouseEvt.getClientY(), treeNodeBody, css);
        }
      }, false);

      EventListener dragDropEventListener = new EventListener() {
        @Override
View Full Code Here


        tabs.addTab(tab1);
        tabs.addTab("Tab 2", new HTML("Tab 2 Content"));
        tabs.addTab("Tab 3", new HTML("Tab 3 Content"));
        final TabSpec tab4 = new TabSpec("tab4", "Tab 4", null, new HTML("Tab 4 Content"), true);
        tabs.addTab(tab4);
        Button button = new Button("Add Tab 4");
        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                tabs.addTab(tab4, 3);
            }
        });
        FlowPanel content5 = new FlowPanel();
        content5.add(button);

        button = new Button("Highlight 3");
        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                tabs.setTabHightlighted("Tab 3", true);
            }
        });
        content5.add(button);

        button = new Button("Rename 6", new ClickHandler() {
            public void onClick(ClickEvent event) {
                tabs.renameTab("tab6", "Tab 6 *");
            }
        });
        content5.add(button);
View Full Code Here

    private HandlerRegistration hideHandlerRegistration;

    public SimpleDialogSample() {

        Button openButton = new Button("Open Dialog", new ClickHandler() {
            public void onClick(ClickEvent event) {

                final Dialog dialog = new Dialog(false, true);
                dialog.setCaption("List");
                VerticalPanel main = new VerticalPanel();
View Full Code Here

     * Creates a button showing only a caption.
     *
     * @return created button
     */
    private Button captionOnlyButton() {
        return new Button("Button", new ClickHandler() {
            public void onClick(ClickEvent event) {
                showMessage("Button was clicked");
            }
        });
    }
View Full Code Here

     *
     * @return created button
     */
    private Button iconWithCaptionButton() {
        Image icon = WidgetImages.Instance.get().icon_Printer().createImage();
        return new Button("Icon button", icon, new ClickHandler() {
            public void onClick(ClickEvent event) {
                showMessage("Icon button was clicked");
            }
        });
    }
View Full Code Here

     *
     * @return created button
     */
    private Button iconOnlyButton() {
        Image icon = WidgetImages.Instance.get().icon_CubeBlue().createImage();
        return new Button(icon, new ClickHandler() {
            public void onClick(ClickEvent event) {
                showMessage("Icon button was clicked");
            }
        });
    }
View Full Code Here

     * Creates a disabled button with only a caption.
     *
     * @return created button
     */
    private Button disabledButton() {
        Button button = new Button("Disabled Button", new ClickHandler() {
            public void onClick(ClickEvent event) {
                showMessage("This should not be shown");
            }
        });
        button.setEnabled(false);
        return button;
    }
View Full Code Here

     *
     * @return created button
     */
    private Button disabledIconWithCaptionButton() {
        Image icon = WidgetImages.Instance.get().icon_CubeGreen().createImage();
        Button button = new Button("Disabled Button", icon, new ClickHandler() {
            public void onClick(ClickEvent event) {
                showMessage("This should not be shown");
            }
        });
        button.setEnabled(false);
        return button;
    }
View Full Code Here

        createHTML(buttons, deck, "Red", "#ff9999");
        createHTML(buttons, deck, "Green", "#ccffcc");
        createHTML(buttons, deck, "Blue", "#cacaf7");
        createHTML(buttons, deck, "Yellow", "#ffcc66");

        Button clearButton = new Button("Clear Selection", new ClickHandler() {
            public void onClick(ClickEvent event) {
                deck.clearSelection();
            }
        });
        clearButton.getElement().getStyle().setMarginLeft(10, Style.Unit.PX);
        buttons.add(clearButton);

        SimpleToggleButton enableDisableButton = new SimpleToggleButton("Disable Animation");
        enableDisableButton.addChangeHandler(new ChangeHandler() {
            public void onChange(ChangeEvent event) {
View Full Code Here

        final HTML html = new HTML(text);
        html.getElement().getStyle().setBackgroundColor(color);
        html.setSize("100%", "100%");
        layout.add(html);

        Button button = new Button(text, new ClickHandler() {
            public void onClick(ClickEvent event) {
                layout.selectWidget(html);
            }
        });

        button.getElement().getStyle().setMarginLeft(10, Style.Unit.PX);

        buttons.add(button);

    }
View Full Code Here

TOP

Related Classes of elemental.events.MouseEvent$Button

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.