Package org.gwtoolbox.widget.client.button

Examples of org.gwtoolbox.widget.client.button.SimpleButton.addClickHandler()


    public MessageBoxSample() {
        HorizontalPanel buttons = new HorizontalPanel();
        buttons.setSpacing(4);

        SimpleButton button = new SimpleButton("Show Error");
        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                String title = "The Error";
                String message = "This is the content of the message and it's very long to see how it copes with it";
                MessageBox.show(NotificationType.ERROR, MessageBox.OptionType.OK, title, message, new MessageBox.OptionCallback() {
                    public void handle(MessageBox.Button button) {
View Full Code Here


            }
        });
        buttons.add(button);

        button = new SimpleButton("Show Warning");
        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                String title = "The Warning";
                String message = "This is the content of the message and it's very long to see how it copes with it";
                MessageBox.show(NotificationType.WARNING, MessageBox.OptionType.OK, title, message, new MessageBox.OptionCallback() {
                    public void handle(MessageBox.Button button) {
View Full Code Here

            }
        });
        buttons.add(button);

        button = new SimpleButton("Show Tip");
        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                String title = "The Tip";
                String message = "This is the content of the message and it's very long to see how it copes with it";
                MessageBox.show(NotificationType.TIP, MessageBox.OptionType.OK, title, message, new MessageBox.OptionCallback() {
                    public void handle(MessageBox.Button button) {
View Full Code Here

            }
        });
        buttons.add(button);

        button = new SimpleButton("Show Message");
        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                String title = "The Message";
                String message = "This is the content of the message and it's very long to see how it copes with it";
                MessageBox.show(NotificationType.MESSAGE, MessageBox.OptionType.OK, title, message, new MessageBox.OptionCallback() {
                    public void handle(MessageBox.Button button) {
View Full Code Here

            }
        });
        buttons.add(button);

        button = new SimpleButton("Confirm");
        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                String title = "Please Confirm";
                String message = "This is the content of the message and it's very long to see how it copes with it";
                MessageBox.show(NotificationType.MESSAGE, MessageBox.OptionType.OK_CANCEL, title, message, new MessageBox.OptionCallback() {
                    public void handle(MessageBox.Button button) {
View Full Code Here

            }
        });
        buttons.add(button);

        button = new SimpleButton("Yes/No/Cancel");
        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                String title = "Please Confirm";
                String message = "This is the content of the message and it's very long to see how it copes with it";
                MessageBox.show(NotificationType.MESSAGE, MessageBox.OptionType.YES_NO_CANCEL, title, message, new MessageBox.OptionCallback() {
                    public void handle(MessageBox.Button button) {
View Full Code Here

        main.setCellWidth(top, "100%");

        addGap(main, "20px");

        SimpleButton highlightButton = new SimpleButton("Highlight All Females");
        highlightButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent clickEvent) {
                grid.setRowDecorator(new RecordRowDecorator<Record>() {
                    public void decorateRow(int row, Record record, BasicTable.BasicTableRowFormatter rowFormatter) {
                        if (record.getValue("gender") == Gender.FEMALE) {
                            rowFormatter.addStyleName(row, "row-highlight");
View Full Code Here

                    }
                });
            }
        });
        SimpleButton clearHighlightButton = new SimpleButton("Clear Hightlighting");
        clearHighlightButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent clickEvent) {
                grid.clearRowDecorator();
            }
        });
        main.add(LayoutUtils.hBuilder().add(highlightButton).addGap("20px").add(clearHighlightButton).getPanel());
View Full Code Here

    public GGrowlSamplePane() {
        HorizontalPanel buttons = new HorizontalPanel();
        buttons.setSpacing(4);

        SimpleButton button = new SimpleButton("Show Message", WidgetImages.Instance.get().notification_Message().createImage());
        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent clickEvent) {
                GGrowl.showMessage("Short Message", "This is the content of the message", 3500);
            }
        });
        buttons.add(button);
View Full Code Here

            }
        });
        buttons.add(button);

        button = new SimpleButton("Show Long Message", WidgetImages.Instance.get().notification_Message().createImage());
        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent clickEvent) {
                GGrowl.showMessage("Long Message", "This is the content of a very very very very very long message, so " + "long it seems it has no end, but it does... it's coming soon... very soon... wait... wait... " + "here it comes... no.. just kiding it's not coming... yes it is... now!", 8000);
            }
        });
        buttons.add(button);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.