Package com.ponysdk.ui.server.basic

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


        dialogBox.setGlassEnabled(true);
        dialogBox.setTitle(title);
        dialogBox.setCaption(messageType.getName());

        // Build content
        final PVerticalPanel panel = new PVerticalPanel();
        final PLabel content = new PLabel(message);
        panel.add(content);
        final PHorizontalPanel controlsPanel = new PHorizontalPanel();
        controlsPanel.setStyleName(PonySDKTheme.DIALOGBOX_CONTROLS);
        controlsPanel.setHorizontalAlignment(PHorizontalAlignment.ALIGN_CENTER);

        for (final String option : options) {
            final PButton button = new PButton();
            button.setText(option);
            button.ensureDebugId("optionpane[" + option + "]");
            button.addClickHandler(new PClickHandler() {

                @Override
                public void onClick(final PClickEvent clickEvent) {
                    handler.onAction(dialogBox, option);
                }
            });
            controlsPanel.add(button);
        }

        panel.add(controlsPanel);
        panel.setCellHorizontalAlignment(controlsPanel, PHorizontalAlignment.ALIGN_CENTER);
        panel.setCellHorizontalAlignment(content, PHorizontalAlignment.ALIGN_CENTER);

        dialogBox.setWidget(panel);
        dialogBox.show();
        dialogBox.center();
View Full Code Here


    public static PConfirmDialog buildPopup(final String windowCaption, final PWidget content, final String okCaption, final String cancelCaption, final PConfirmDialogHandler confirmDialogHandler) {
        final PConfirmDialog confirmDialog = new PConfirmDialog();
        confirmDialog.setStyleName(PonySDKTheme.DIALOGBOX);
        confirmDialog.setAnimationEnabled(true);
        confirmDialog.setGlassEnabled(true);
        final PVerticalPanel dialogContent = new PVerticalPanel();
        dialogContent.setWidth("100%");
        dialogContent.add(content);
        final PHorizontalPanel controlsPanel = new PHorizontalPanel();
        controlsPanel.setStyleName(PonySDKTheme.DIALOGBOX_CONTROLS);
        controlsPanel.setHorizontalAlignment(PHorizontalAlignment.ALIGN_CENTER);
        controlsPanel.setWidth("100%");

        if (cancelCaption != null) {
            final PButton cancelButton = new PButton();
            cancelButton.setText(cancelCaption);
            cancelButton.addClickHandler(new PClickHandler() {

                @Override
                public void onClick(final PClickEvent clickEvent) {
                    if (confirmDialogHandler != null) {
                        confirmDialogHandler.onCancel();
                    }
                    confirmDialog.hide();
                }
            });
            controlsPanel.add(cancelButton);
            confirmDialog.setCancelButton(cancelButton);
        }
        if (okCaption != null) {
            final PButton okButton = new PButton();
            okButton.setText(okCaption);
            okButton.addClickHandler(new PClickHandler() {

                @Override
                public void onClick(final PClickEvent clickEvent) {
                    if (confirmDialogHandler != null) {
                        if (confirmDialogHandler.onOK(confirmDialog)) confirmDialog.hide();
                    } else confirmDialog.hide();
                }
            });

            controlsPanel.add(okButton);
            confirmDialog.setOkButton(okButton);
        }
        dialogContent.add(controlsPanel);
        dialogContent.setCellHorizontalAlignment(controlsPanel, PHorizontalAlignment.ALIGN_CENTER);
        dialogContent.setCellHorizontalAlignment(content, PHorizontalAlignment.ALIGN_CENTER);
        confirmDialog.setCaption(windowCaption);
        confirmDialog.setWidget(dialogContent);
        return confirmDialog;
    }
View Full Code Here

        final PFlexTable table = new PFlexTable();
        table.setCellPadding(0);
        table.setCellSpacing(0);
        table.setSizeFull();

        final PVerticalPanel bodyLayout = new PVerticalPanel();
        bodyLayout.setSizeFull();

        final PButton button = new PButton("Remove last row");
        button.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                table.removeRow(table.getRowCount() - 1);
            }
        });

        bodyLayout.add(button);
        bodyLayout.add(table);

        final PButton scheduleButton = new PButton("Schedule");
        scheduleButton.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                if (currentTimer != null) {
                    currentTimer.cancel();
                }

                currentTimer = new PTimer() {

                    @Override
                    public void run() {
                        time++;
                        updateTableData(100);
                    }
                };

                for (int r = 0; r < 100; r++) {
                    for (int c = 0; c < 6; c++) {
                        final PLabel label = new PLabel(r + "_" + c + Math.random());
                        labels[r][c] = label;
                        table.setWidget(r, c, label);
                    }
                }

                currentTimer.scheduleRepeating(Integer.valueOf(textBox.getText()));
            }
        });

        bodyLayout.add(textBox);
        bodyLayout.add(scheduleButton);

        final PScrollPanel scrollPanel = new PScrollPanel();
        scrollPanel.setSizeFull();
        scrollPanel.setWidget(bodyLayout);
View Full Code Here

        this.container = container;
    }

    @Override
    public void start(final PAcceptsOneWidget world) {
        final PVerticalPanel verticalPanel = new PVerticalPanel();
        currentFormActivityPanel = new PSimplePanel();
        verticalPanel.add(currentFormActivityPanel);

        final PHorizontalPanel horizontalPanel = new PHorizontalPanel();
        verticalPanel.add(horizontalPanel);
        next.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                if (currentFormActivity.isValid() && index != (formActivities.size() - 1)) {
View Full Code Here

    @Override
    protected void onFirstShowPage() {
        super.onFirstShowPage();

        final PVerticalPanel panel = new PVerticalPanel();
        panel.setSpacing(10);

        panel.add(new PLabel("Check all days that you are available:"));

        final PCheckBox monday = new PCheckBox("Monday");
        monday.addValueChangeHandler(this);
        panel.add(monday);

        final PCheckBox tuesday = new PCheckBox("Tuesday");
        tuesday.addValueChangeHandler(this);
        panel.add(tuesday);

        final PCheckBox wednesday = new PCheckBox("Wednesday");
        wednesday.addValueChangeHandler(this);
        panel.add(wednesday);

        final PCheckBox thursday = new PCheckBox("Thursday");
        thursday.addValueChangeHandler(this);
        panel.add(thursday);

        final PCheckBox friday = new PCheckBox("Friday");
        friday.addValueChangeHandler(this);
        panel.add(friday);

        final PCheckBox saturday = new PCheckBox("Saturday");
        saturday.addValueChangeHandler(this);
        saturday.setEnabled(false);
        panel.add(saturday);

        final PCheckBox sunday = new PCheckBox("Sunday");
        sunday.addValueChangeHandler(this);
        sunday.setEnabled(false);
        panel.add(sunday);

        examplePanel.setWidget(panel);
    }
View Full Code Here

    public DefaultFormView(PPanel layout) {
        this(null, layout);
    }

    public DefaultFormView() {
        this(null, new PVerticalPanel());
    }
View Full Code Here

    public DefaultFormView() {
        this(null, new PVerticalPanel());
    }

    public DefaultFormView(String caption) {
        this(caption, new PVerticalPanel());
    }
View Full Code Here

        toolbarGroupPanel.add(pagingLayout);
        toolbarGroupPanel.add(preferencesLayout);
        toolbarGroupPanel.setCellHorizontalAlignment(pagingLayout.asWidget(), PHorizontalAlignment.ALIGN_RIGHT);
        topListLayout.setSizeFull();

        final PVerticalPanel headerPanel = new PVerticalPanel();
        headerPanel.setVerticalAlignment(PVerticalAlignment.ALIGN_MIDDLE);
        headerPanel.setSizeFull();
        headerPanel.setStyleProperty("paddingLeft", "1em");
        headerPanel.setStyleProperty("paddingRight", "1.3em");
        headerPanel.add(inputLayout);
        headerPanel.add(toolbarGroupPanel);
        headerPanel.add(topListLayout);
        headerPanel.setWidth("100%");

        positionPanel.setWidget(headerPanel);

        bottomListLayout.setWidget(searchResultTimeLabel);
View Full Code Here

    @Override
    protected void onFirstShowPage() {
        super.onFirstShowPage();

        final PVerticalPanel panel = new PVerticalPanel();
        panel.setSpacing(10);

        panel.add(new PLabel("Push button :"));
        panel.add(buildPushButtonPanel());

        examplePanel.setWidget(panel);
    }
View Full Code Here

        this.caption = caption;
    }

    @Override
    public IsPWidget render(FormField formField) {
        final PVerticalPanel verticalPanel = new PVerticalPanel();
        final FormFieldComponent<PVerticalPanel> formFieldComponent = new FormFieldComponent<PVerticalPanel>(verticalPanel);
        formFieldComponent.setCaption(caption);

        fields.add(formFieldComponent);
View Full Code Here

TOP

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

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.