Examples of PHorizontalPanel


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

    private void initUI() {
        startButton = new PButton("|<");
        add(startButton);
        previousButton = new PButton("<");
        add(previousButton);
        pagesPanel = new PHorizontalPanel();
        add(pagesPanel);
        nextButton = new PButton(">");
        add(nextButton);
        endButton = new PButton(">|");
        add(endButton);
View Full Code Here

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

                "This is some text to show how the contents on either side of the splitter flow. This is some text to show how the contents on either side of the splitter flow. This is some text to show how the contents on either side of the splitter flow. This is some text to show how the contents on either side of the splitter flow. This is some text to show how the contents on either side of the splitter flow. This is some text to show how the contents on either side of the splitter flow. This is some text to show how the contents on either side of the splitter flow. This is some text to show how the contents on either side of the splitter flow."));
        return panel;
    }

    private PHorizontalPanel buildComponent(final String name, final String color) {
        final PHorizontalPanel panel = new PHorizontalPanel();
        panel.setSizeFull();
        panel.setStyleProperty("backgroundColor", color);
        final PLabel label = new PLabel("The " + name + " component");
        panel.add(label);
        panel.setCellHorizontalAlignment(label, PHorizontalAlignment.ALIGN_CENTER);
        panel.setCellVerticalAlignment(label, PVerticalAlignment.ALIGN_MIDDLE);
        return panel;
    }
View Full Code Here

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

        examplePanel.setWidget(panel);
    }

    private PWidget buildThemeSelectorPanel() {
        final PHorizontalPanel panel = new PHorizontalPanel();
        panel.setSpacing(10);

        final PListBox styleListBox = new PListBox(false, false);

        styleListBox.addItem(PonySDKTheme.BUTTON_WHITE);
        styleListBox.addItem(PonySDKTheme.BUTTON_BLACK);
        styleListBox.addItem(PonySDKTheme.BUTTON_BLUE);
        styleListBox.addItem(PonySDKTheme.BUTTON_GRAY);
        styleListBox.addItem(PonySDKTheme.BUTTON_GREEN);
        styleListBox.addItem(PonySDKTheme.BUTTON_ORANGE);
        styleListBox.addItem(PonySDKTheme.BUTTON_PINK);
        styleListBox.addItem(PonySDKTheme.BUTTON_ROSY);
        styleListBox.addItem("pony-PButton accent");

        styleListBox.addChangeHandler(new PChangeHandler() {

            @Override
            public void onChange(final PChangeEvent event) {
                final String styleName = styleListBox.getSelectedItem();

                normalButton.setStyleName(styleName);
                disabledOnRequestButton.setStyleName(styleName);
                showLoadingOnRequestButton.setStyleName(styleName);
                comboOnRequestButton.setStyleName(styleName);
                disabledButton.setStyleName(styleName);
            }
        });

        panel.add(new PLabel("Select the button style : "));
        panel.add(styleListBox);

        final PLabel label = new PLabel(UIContext.get().getSession().getUserAgent().toString());
        panel.add(label);

        return panel;
    }
View Full Code Here

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

        return panel;
    }

    private PHorizontalPanel buildButtonPanel() {
        final PHorizontalPanel panel = new PHorizontalPanel();
        panel.setSpacing(10);

        normalButton = new PButton("Normal Button");
        panel.add(normalButton);

        disabledButton = new PButton("Disabled Button");
        disabledButton.setEnabled(false);
        panel.add(disabledButton);

        showLoadingOnRequestButton = new PButton("Show loading on request");
        showLoadingOnRequestButton.showLoadingOnRequest(true);
        showLoadingOnRequestButton.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                fireEvent(new DemoBusinessEvent("Button clicked"));
                try {
                    Thread.sleep(5000);
                } catch (final InterruptedException e) {}
            }
        });

        panel.add(showLoadingOnRequestButton);

        disabledOnRequestButton = new PButton("Disabled on request");
        disabledOnRequestButton.setEnabledOnRequest(false);
        disabledOnRequestButton.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                fireEvent(new DemoBusinessEvent("Button clicked"));
                try {
                    Thread.sleep(5000);
                } catch (final InterruptedException e) {}
            }
        });

        panel.add(disabledOnRequestButton);

        comboOnRequestButton = new PButton("Show loading and disable on request");
        comboOnRequestButton.setEnabledOnRequest(false);
        comboOnRequestButton.showLoadingOnRequest(true);
        comboOnRequestButton.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                fireEvent(new DemoBusinessEvent("Button clicked"));
                try {
                    Thread.sleep(5000);
                } catch (final InterruptedException e) {}
            }
        });

        panel.add(comboOnRequestButton);

        return panel;
    }
View Full Code Here

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

        examplePanel.setWidget(layoutPanel);
    }

    private PWidget buildComponent(final String name, final String color) {
        final PHorizontalPanel panel = new PHorizontalPanel();
        panel.setSizeFull();
        panel.setStyleProperty("backgroundColor", color);
        final PLabel label = new PLabel(name);
        panel.add(label);
        panel.setCellHorizontalAlignment(label, PHorizontalAlignment.ALIGN_CENTER);
        panel.setCellVerticalAlignment(label, PVerticalAlignment.ALIGN_MIDDLE);
        return panel;
    }
View Full Code Here

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

                keyUphandler.refresh(textbox.getText());
            }
        });

        final PVerticalPanel mainPanel = new PVerticalPanel();
        final PHorizontalPanel textBoxAndDeployButtonPanel = new PHorizontalPanel();
        textBoxAndDeployButtonPanel.add(textbox);
        textBoxAndDeployButtonPanel.add(deploy);
        textBoxAndDeployButtonPanel.setCellVerticalAlignment(textbox, PVerticalAlignment.ALIGN_MIDDLE);
        textBoxAndDeployButtonPanel.setCellVerticalAlignment(deploy, PVerticalAlignment.ALIGN_MIDDLE);
        mainPanel.add(captionLabel);
        mainPanel.add(textBoxAndDeployButtonPanel);

        return mainPanel;
    }
View Full Code Here

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

            }
        });
        masked.setPlaceholder("({{000}}) {{000}}.{{0000}}");
        replacement.setWidth("10px");

        final PHorizontalPanel maskPanel = new PHorizontalPanel();
        maskPanel.setVerticalAlignment(PVerticalAlignment.ALIGN_MIDDLE);
        maskPanel.add(masked);
        maskPanel.add(maskedTextBox);
        maskPanel.add(replacement);
        maskPanel.add(showMask);
        maskPanel.add(applyMaskButton);

        panel.add(new PLabel("Password text box:"));
        panel.add(passwordTextBox);
        panel.add(passwordTextBoxReadOnly);
        panel.add(new PLabel("Text area:"));
View Full Code Here

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

        addHandler(SubmitFormEvent.TYPE, this);
        addHandler(ShowSubListEvent.TYPE, this);

        final ComplexListConfiguration<Pony> complexListConfiguration = new ComplexListConfiguration<Pony>();
        complexListConfiguration.setEnableForm(true);
        complexListConfiguration.setFormLayout(new PHorizontalPanel());
        complexListConfiguration.setShowSubListColumnEnabled(true);
        complexListConfiguration.setSelectionColumnEnabled(true);
        complexListConfiguration.setPageSize(20);
        complexListConfiguration.setTableName("Pony List");
        complexListConfiguration.setExportConfiguration(initExportConfiguration());
View Full Code Here

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

        super.onFirstShowPage();

        final PVerticalPanel panel = new PVerticalPanel();

        // Send 'info' business event
        final PHorizontalPanel infoPanel = new PHorizontalPanel();
        final PTextBox textField = new PTextBox("This is an info event");
        final PButton ok = new PButton("send [INFO]");
        ok.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                final DemoBusinessEvent businessEvent = new DemoBusinessEvent(EventPageActivity.this);
                businessEvent.setBusinessMessage(textField.getText());
                fireEvent(businessEvent);
            }
        });

        infoPanel.add(textField);
        infoPanel.add(ok);

        // Send 'warn' business event
        final PHorizontalPanel warningPanel = new PHorizontalPanel();
        final PTextBox textField2 = new PTextBox("This is a warning event");
        final PButton ok2 = new PButton("send [WARN]");

        ok2.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                final DemoBusinessEvent businessEvent = new DemoBusinessEvent(EventPageActivity.this);
                businessEvent.setLevel(Level.WARNING);
                businessEvent.setBusinessMessage(textField2.getText());
                fireEvent(businessEvent);
            }
        });

        warningPanel.add(textField2);
        warningPanel.add(ok2);

        // Send 'error' business level
        final PHorizontalPanel errorPanel = new PHorizontalPanel();
        final PTextBox textField3 = new PTextBox("This is an error event");
        final PButton ok3 = new PButton("send [ERROR]");

        ok3.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                final DemoBusinessEvent businessEvent = new DemoBusinessEvent(EventPageActivity.this);
                businessEvent.setLevel(Level.ERROR);
                businessEvent.setBusinessMessage(textField3.getText());
                fireEvent(businessEvent);
            }
        });

        errorPanel.add(textField3);
        errorPanel.add(ok3);

        // Show 'tray' notification
        final PHorizontalPanel trayPanel = new PHorizontalPanel();
        final PTextBox textField4 = new PTextBox("This is a tray notification");
        final PButton ok4 = new PButton("show [TRAY]");

        ok4.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                PNotificationManager.notify(textField4.getText(), Notification.TRAY);
            }
        });

        trayPanel.add(textField4);
        trayPanel.add(ok4);

        // Build page

        panel.add(infoPanel);
        panel.add(warningPanel);
View Full Code Here

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

        mainLayout.setWidth("100%");
        mainLayout.setCellPadding(0);
        mainLayout.setCellSpacing(0);
        mainLayout.getColumnFormatter().setWidth(0, "100%");

        headerLayout = new PHorizontalPanel();
        errorImage.setStyleProperty("color", "red");
        requiredLabel.setVisible(false);
        errorImage.setVisible(false);
        captionLabel.setVisible(false);
        headerLayout.add(requiredLabel);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.