Examples of PHorizontalPanel


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

                final String text = indexTextBox.getText();
                tabPanel.selectTab(Integer.valueOf(text));
            }
        });

        final PHorizontalPanel horizontalPanel = new PHorizontalPanel();
        horizontalPanel.setVerticalAlignment(PVerticalAlignment.ALIGN_MIDDLE);
        horizontalPanel.add(button);
        horizontalPanel.add(addCustomTabButton);
        horizontalPanel.add(indexTextBox);
        horizontalPanel.add(selectButton);

        final PHorizontalPanel tabPanelContainer = new PHorizontalPanel();
        tabPanelContainer.add(tabPanel);

        dockLayoutPanel.addNorth(horizontalPanel, 50);
        dockLayoutPanel.add(tabPanelContainer);

        addTabContent(tabPanel);
View Full Code Here

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

        content.add(actionPanel);
        content.add(logsPanel);
    }

    private void initActionPanel() {
        actionPanel = new PHorizontalPanel();
        actionPanel.addStyleName(PonySDKTheme.LOG_CONSOLE_ACTIONS);

        final PAnchor clearLogs = new PAnchor("Clear logs");

        clearLogs.addClickHandler(new PClickHandler() {
View Full Code Here

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

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

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

                final String text = indexTextBox.getText();
                tabPanel.selectTab(Integer.valueOf(text));
            }
        });

        final PHorizontalPanel horizontalPanel = new PHorizontalPanel();
        horizontalPanel.setVerticalAlignment(PVerticalAlignment.ALIGN_MIDDLE);
        horizontalPanel.add(button);
        horizontalPanel.add(addCustomTabButton);
        horizontalPanel.add(indexTextBox);
        horizontalPanel.add(selectButton);

        dockLayoutPanel.addNorth(horizontalPanel, 50);
        dockLayoutPanel.add(tabPanel);

        addTabContent(tabPanel);
View Full Code Here

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

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

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

    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)) {
                    currentFormActivityPanel.clear();
                    for (final WizardActivityHandler handler : wizardActivityHandlers) {
                        handler.onNext(currentFormActivity);
                    }
                    index++;
                    currentFormActivity = formActivities.get(index);
                    currentFormActivity.start(currentFormActivityPanel);
                    update();
                }

            }
        });
        horizontalPanel.add(previous);
        previous.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                if (index != 0) {
                    currentFormActivityPanel.clear();
                    for (final WizardActivityHandler handler : wizardActivityHandlers) {
                        handler.onPrevious(currentFormActivity);
                    }
                    index--;
                    currentFormActivity = formActivities.get(index);
                    currentFormActivity.start(currentFormActivityPanel);
                    update();
                }
            }
        });
        horizontalPanel.add(next);
        horizontalPanel.add(finish);
        horizontalPanel.add(cancel);
        finish.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                boolean valid = true;
View Full Code Here

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

        dateFieldComponent.getInput().setDateFormat(dateFormat);
        dateFieldComponent.getInput().addValueChangeHandler(this);
        fields.add(dateFieldComponent);
        addListener(dateFieldComponent.getInput());

        final PHorizontalPanel horizontalPanel = new PHorizontalPanel();
        horizontalPanel.add(dateFieldComponent.asWidget());

        hours = new PListBox(false, false);

        for (int i = 0; i < 24; i++) {
            hours.addItem(i + "", i);
        }

        minutes = new PListBox(false, false);

        for (int i = 0; i < 60; i++) {
            minutes.addItem(i + "", i);
        }

        seconds = new PListBox(false, false);
        for (int i = 0; i < 60; i++) {
            seconds.addItem(i + "", i);
        }

        hours.addChangeHandler(new PChangeHandler() {

            @Override
            public void onChange(final PChangeEvent event) {
                if (calendar != null) {
                    calendar.set(Calendar.HOUR_OF_DAY, (Integer) hours.getSelectedValue());
                }
            }
        });
        minutes.addChangeHandler(new PChangeHandler() {

            @Override
            public void onChange(final PChangeEvent event) {
                if (calendar != null) {
                    calendar.set(Calendar.MINUTE, (Integer) minutes.getSelectedValue());
                }
            }
        });
        seconds.addChangeHandler(new PChangeHandler() {

            @Override
            public void onChange(final PChangeEvent event) {
                if (calendar != null) {
                    calendar.set(Calendar.SECOND, (Integer) seconds.getSelectedValue());
                }
            }
        });

        horizontalPanel.add(new PLabel("hh"));
        horizontalPanel.add(hours);
        horizontalPanel.add(new PLabel("mm"));
        horizontalPanel.add(minutes);
        horizontalPanel.add(new PLabel("ss"));
        horizontalPanel.add(seconds);

        return horizontalPanel;
    }
View Full Code Here

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

    private final PLabel searchResultTimeLabel = new PLabel();

    public DefaultComplexListView() {
        setSizeFull();

        final PHorizontalPanel toolbarGroupPanel = new PHorizontalPanel();
        toolbarGroupPanel.setVerticalAlignment(PVerticalAlignment.ALIGN_MIDDLE);
        toolbarGroupPanel.setWidth("100%");
        toolbarGroupPanel.add(toolbarLayout.asWidget());
        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();
View Full Code Here

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

    @Override
    public IsPWidget render(final FormField formField) {
        selected = new PListBox(true, true);
        unselected = new PListBox(true, true);
        final PHorizontalPanel panel = new PHorizontalPanel();
        formFieldComponent = new FormFieldComponent<PHorizontalPanel>(panel);
        panel.setVerticalAlignment(PVerticalAlignment.ALIGN_MIDDLE);
        selected.addChangeHandler(this);
        unselected.addChangeHandler(this);
        panel.setSpacing(5);

        for (final String item : items) {
            unselected.addItem(item);
        }
        panel.setTitle("caption");
        final PWidget unselectedWidget = unselected.asWidget();
        panel.add(unselectedWidget);
        switchButton = new PButton("<>");
        formFieldComponent.setCaption(caption);
        switchButton.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                selectValues.clear();
                for (int i = 1; i < unselected.getItemCount(); i++) {
                    if (unselected.isItemSelected(i)) {
                        selectValues.add(unselected.getItem(i));
                    }
                }

                for (int i = 1; i < selected.getItemCount(); i++) {
                    if (!selected.isItemSelected(i)) {
                        selectValues.add(selected.getItem(i));
                    }
                }
                refresh();
            }
        });
        final PWidget button = switchButton.asWidget();
        panel.add(button);
        final PWidget selectedWidget = selected.asWidget();
        panel.add(selectedWidget);
        panel.setCellVerticalAlignment(selectedWidget, PVerticalAlignment.ALIGN_TOP);
        panel.setCellHeight(selectedWidget, "100%");
        panel.setCellHeight(unselectedWidget, "100%");
        panel.setCellVerticalAlignment(button, PVerticalAlignment.ALIGN_TOP);
        panel.setCellVerticalAlignment(unselectedWidget, PVerticalAlignment.ALIGN_TOP);
        if (debugID != null) {
            onEnsureDebugID();
        }
        return formFieldComponent.asWidget();
    }
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.