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

Examples of org.gwtoolbox.widget.client.panel.layout.DockLayout$DockAnimateCommand


@Order(100)
@LayoutSample
public class CombinedLayoutSample extends ResizeComposite implements SamplePanel {

    public CombinedLayoutSample() {
        final DockLayout main = new DockLayout();

        final DrawerLayout drawers = new DrawerLayout();

        PanelLayout navigation = new PanelLayout("Navigation");
        navigation.addCloseHandler(new CloseHandler<PanelLayout>() {
            public void onClose(CloseEvent<PanelLayout> event) {
                drawers.hideDrawer(DrawerLayout.Position.LEFT);
            }
        });
        Drawer navigationDrawer = new Drawer("Navigation", navigation, DrawerLayout.Position.LEFT);
        drawers.addDrawer(navigationDrawer);

        SplitLayout split = new SplitLayout();
        split.addNorth(createHTML("Top content", "#ffcccc"), 200);

        TabLayout tabs = new TabLayout();
        tabs.addTab("Tab 1", createHTML("Tab Content", "white"));
        split.add(tabs);
        LayoutUtils.fitParent(tabs);
       
        drawers.setContent(split);
        LayoutUtils.fitParent(split);

        main.addNorth(createHTML("Header", "#ccffcc"), 100);
        main.add(drawers);

        PanelLayout layout = new PanelLayout("Combined Layout");
        layout.setContent(main);
        layout.setCollapsable(true);
        LayoutUtils.fitParent(main);
View Full Code Here


    private List<SampleGroup> groups;

    public MainPane() {

        DockLayout main = new DockLayout();

        Label header = new Label("GWToolbox Widget Explorer");
        header.setStylePrimaryName("MainHeader");
        header.setSize("100%", "100%");
        main.addNorth(header, 40);

        SplitLayout split = new SplitLayout();

        tree = new Tree();
        tree.setAnimationEnabled(true);
        tree.addSelectionHandler(new SelectionHandler<TreeItem>() {
            public void onSelection(SelectionEvent<TreeItem> event) {
                TreeItem item = event.getSelectedItem();
                final SamplePanel sample = (SamplePanel) item.getUserObject();
                if (sample == null) {
                    return;
                }
                sample.reset();
                if (tabs.getTabIndex(sample.getName()) < 0) {
                    TabSpec ts = new TabSpec(sample.getName())
                            .setClosable(true)
                            .setText(sample.getName())
                            .setContent(sample.getContentWidget());

                    tabs.addTab(ts);
                }
                tabs.setSelectedTab(sample.getName());
            }
        });

        PanelLayout treePanel = new PanelLayout("Navigation Bar");
        treePanel.setContent(tree);

        split.addWest(treePanel, 200);
        tabs = new TabLayout();
        split.add(tabs);

        main.add(split);

        GWT.setUncaughtExceptionHandler(new GWT.UncaughtExceptionHandler() {
            public void onUncaughtException(Throwable e) {
                GWT.log("Uncaught exception in java land", e);
                GGrowl.showMessage("An error occurred. Please contact your system administrator. ", e.toString(), 10000);
View Full Code Here

        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");
View Full Code Here

@Order(10)
@LayoutSample
public class DockLayoutSample extends ResizeComposite implements SamplePanel {

    public DockLayoutSample() {
        final DockLayout dock = new DockLayout();

        final HTML north = createHTML("North", "#cacaf7");
        dock.addNorth(north, 100);
        final HTML south = createHTML("South", "#ccffcc");
        dock.addSouth(south, 100);
        final HTML east = createHTML("East", "#ffcccc");
        dock.addEast(east, 100);
        final HTML west = createHTML("West", "#ffff99");
        dock.addWest(west, 100);

        FlowPanel buttons = new FlowPanel();
        ToggleButton button = new ToggleButton("Hide North", "Show North");
        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent clickEvent) {
                dock.setWidgetVisible(north, !((ToggleButton) clickEvent.getSource()).isDown());
            }
        });
        buttons.add(button);
        button = new ToggleButton("Hide South", "Show South");
        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent clickEvent) {
                dock.setWidgetVisible(south, !((ToggleButton) clickEvent.getSource()).isDown());
            }
        });
        buttons.add(button);
        button = new ToggleButton("Hide West", "Show West");
        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent clickEvent) {
                dock.setWidgetVisible(west, !((ToggleButton) clickEvent.getSource()).isDown());
            }
        });
        buttons.add(button);
        button = new ToggleButton("Hide East", "Show East");
        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent clickEvent) {
                dock.setWidgetVisible(east, !((ToggleButton) clickEvent.getSource()).isDown());
            }
        });
        buttons.add(button);

        dock.add(buttons);

        initWidget(dock);
    }
View Full Code Here

                    LayoutUtils.notifyResize(widget);
                }
            }
        });

        final DockLayout main = new DockLayout(Style.Unit.PX);
        main.addNorth(tabBar, 28);
        main.add(deck);
        tabBarVisibilitySetter = new ValueSetter<Boolean>() {
            public void set(Boolean visible) {
                main.setWidgetVisible(tabBar, visible);
            }
        };
        initWidget(main);

        setStylePrimaryName("SimpleTabPanel");
View Full Code Here

    private RuntimeDrawer currentLeftDrawer;
    private RuntimeDrawer currentRightDrawer;
    private RuntimeDrawer currentBottomDrawer;

    public DrawerLayout() {
        main = new DockLayout();
        split = new SplitLayout();
        leftGutter = new Gutter(true);
        rightGutter = new Gutter(false);
        statusBar = new StatusBar();
        main.addEast(rightGutter, GUTTER_WIDTH);
View Full Code Here

TOP

Related Classes of org.gwtoolbox.widget.client.panel.layout.DockLayout$DockAnimateCommand

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.