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

Examples of org.gwtoolbox.widget.client.panel.layout.drawer.DrawerLayout$DrawerRemovalDelegatingCompletionCallback


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


        return p;
    }

    private Widget createMain2() {
        final DrawerLayout layout = new DrawerLayout();
        layout.setAnimationDurationFunction(new FixedAnimationDurationFunction(200));

        Drawer drawer;
        final PanelLayout navigation = new PanelLayout("Navigation");
        navigation.setContent(new HTML("Navigation"));
        navigation.setClosable(true);
        navigation.addCloseHandler(new CloseHandler<PanelLayout>() {
            public void onClose(CloseEvent<PanelLayout> event) {
                layout.hideDrawer(DrawerLayout.Position.LEFT);
            }
        });
        navigation.getElement().setId("navigation");

        drawer = new Drawer("Properties", new HTML("Properties"), DrawerLayout.Position.RIGHT);
        drawer.setMinSize(500);
        layout.addDrawer(drawer);

        drawer = new Drawer("Navigation", navigation, DrawerLayout.Position.LEFT);
        layout.addDrawer(drawer);

        drawer = new Drawer("Navigation 2", new HTML("Navigation 2"), DrawerLayout.Position.LEFT);
        layout.addDrawer(drawer);

        Button button = new Button("Close Navigation");

        drawer = new Drawer("Console", button, DrawerLayout.Position.BOTTOM);
        layout.addDrawer(drawer);

        HTML console2 = new HTML("Console 2");
        console2.getElement().setId("console2");
        drawer = new Drawer("Console2", console2, DrawerLayout.Position.BOTTOM);
        drawer.setButtonless(true);
        layout.addDrawer(drawer);

        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                layout.hideDrawer(DrawerLayout.Position.LEFT, new CompletionCallback() {
                    @Override
                    public void onComplete() {
                        layout.showDrawer("Console2");
                    }
                });
            }
        });
        button.getElement().setId("console1");
View Full Code Here

public class DrawerLayoutSample extends ResizeComposite implements SamplePanel {

    private DrawerLayout drawers;

    public DrawerLayoutSample() {
        drawers = new DrawerLayout();

        Drawer drawer = new Drawer("Navigation", createHTML("Navigation Content", "#cacaf7"), DrawerLayout.Position.LEFT);
        drawers.addDrawer(drawer);

        drawer = new Drawer("Structure", new Content(createHTML("Structure Content", "#ccffcc")), DrawerLayout.Position.LEFT)
View Full Code Here

TOP

Related Classes of org.gwtoolbox.widget.client.panel.layout.drawer.DrawerLayout$DrawerRemovalDelegatingCompletionCallback

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.