Package org.gwtoolbox.widget.client.panel.layout

Examples of org.gwtoolbox.widget.client.panel.layout.DeckLayout


public class DeckLayoutSample extends ResizeComposite implements SamplePanel {

    public DeckLayoutSample() {

        LayoutPanel panel = new LayoutPanel();
        final DeckLayout deck = new DeckLayout();
        deck.setAnimationEnabled(true);
        panel.add(deck);
        panel.setWidgetLeftRight(deck, 50, Style.Unit.PX, 50, Style.Unit.PX);
        panel.setWidgetTopBottom(deck, 50, Style.Unit.PX, 50, Style.Unit.PX);

        FlowPanel buttons = new FlowPanel();

        DockLayout main = new DockLayout();
        main.addNorth(buttons, 50);
        main.add(panel);

        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) {
                deck.setAnimationEnabled(!deck.isAnimationEnabled());
            }
        });
        enableDisableButton.getElement().getStyle().setMarginLeft(10, Style.Unit.PX);
        buttons.add(enableDisableButton);
View Full Code Here


    /**
     * Constructs a new empty TabLayout.
     */
    public TabLayout() {
        deck = new DeckLayout();
        tabBar = new TabBar();

        tabBar.addCloseHandler(new CloseHandler<TabBar.Tab>() {
            public void onClose(CloseEvent<TabBar.Tab> event) {
                TabAndContent tac = tabAndContentById.remove(event.getTarget().getId());
View Full Code Here

TOP

Related Classes of org.gwtoolbox.widget.client.panel.layout.DeckLayout

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.