Package org.gwtoolbox.widget.client.button

Examples of org.gwtoolbox.widget.client.button.ImageToggleButton$Face


    public ImageToggleButtonSample() {

        HorizontalPanel buttons = new HorizontalPanel();

        Image image = WidgetImages.Instance.get().notification_WarningLarge().createImage();
        ImageToggleButton button = new ImageToggleButton(image);
        button.addToggleHandler(new ToggleHandler() {
            public void onToggle(ToggleEvent event) {
                if (!event.getState()) {
                    showMessage("Warning");
                }
            }
        });
        button.setGroup("group");
        buttons.add(button);

        addGap(buttons, "10px");

        image = WidgetImages.Instance.get().notification_ErrorLarge().createImage();
        button = new ImageToggleButton(image);
        button.addToggleHandler(new ToggleHandler() {
            public void onToggle(ToggleEvent event) {
                if (!event.getState()) {
                    showMessage("Error");
                }
            }
        });
        button.setGroup("group");
        buttons.add(button);

        SimplePanel main = new SimplePanel();
        main.setWidget(buttons);
View Full Code Here

TOP

Related Classes of org.gwtoolbox.widget.client.button.ImageToggleButton$Face

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.