Package com.ponysdk.ui.server.basic

Examples of com.ponysdk.ui.server.basic.PTabLayoutPanel


        super.onFirstShowPage();

        final PDockLayoutPanel dockLayoutPanel = new PDockLayoutPanel(PUnit.PX);
        dockLayoutPanel.setSizeFull();

        final PTabLayoutPanel tabPanel = new PTabLayoutPanel();
        tabPanel.setSizeFull();
        tabPanel.setAnimationVertical(false);
        tabPanel.setAnimationDuration(1000);

        tabPanel.addBeforeSelectionHandler(new PBeforeSelectionHandler<Integer>() {

            @Override
            public void onBeforeSelection(final PBeforeSelectionEvent<Integer> event) {
                PNotificationManager.showTrayNotification("onBeforeSelection, tab index : " + event.getSelectedItem());
            }
        });
        tabPanel.addSelectionHandler(new PSelectionHandler<Integer>() {

            @Override
            public void onSelection(final PSelectionEvent<Integer> event) {
                PNotificationManager.showTrayNotification("onSelection, tab index : " + event.getSelectedItem());
            }
        });

        final PButton button = new PButton("Add Tab");
        button.setStyleProperty("margin", "10px");
        button.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                addTabContent(tabPanel);
            }
        });

        final PButton addCustomTabButton = new PButton("Add Tab (custom tab)");
        addCustomTabButton.setStyleProperty("margin", "10px");
        addCustomTabButton.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                addCustomTabContent(tabPanel);
            }
        });

        final PTextBox indexTextBox = new PTextBox();
        final PButton selectButton = new PButton("Select Tab");
        selectButton.setStyleProperty("margin", "10px");
        selectButton.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                final String text = indexTextBox.getText();
                tabPanel.selectTab(Integer.valueOf(text));
            }
        });

        final PHorizontalPanel horizontalPanel = new PHorizontalPanel();
        horizontalPanel.setVerticalAlignment(PVerticalAlignment.ALIGN_MIDDLE);
View Full Code Here


                super.setWidget(w);
            }
        };
        examplePanel.setSizeFull();

        tabPanel = new PTabLayoutPanel();

        tabPanel.add(examplePanel, "Example");

        final PHTML sourcePanel = new PHTML(getSource());
        sourcePanel.addStyleName("codepanel");
View Full Code Here

TOP

Related Classes of com.ponysdk.ui.server.basic.PTabLayoutPanel

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.