Package com.ponysdk.ui.server.basic

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


        super.onFirstShowPage();

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

        panelTop.add(new PLabel("Select your favorite color:"));

        panelTop.add(newPRadioButton("color", "blue"));
        panelTop.add(newPRadioButton("color", "red"));

        final PRadioButton yellow = newPRadioButton("color", "yellow");
        yellow.setEnabled(false);
        panelTop.add(yellow);

        panelTop.add(newPRadioButton("color", "green"));

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

        panelBottom.add(new PLabel("Select your favorite sport:"));
        panelBottom.add(newPRadioButton("sport", "Polo"));
        panelBottom.add(newPRadioButton("sport", "Rodeo"));
        panelBottom.add(newPRadioButton("sport", "Horse racing"));
        panelBottom.add(newPRadioButton("sport", "Dressage"));
        panelBottom.add(newPRadioButton("sport", "Endurance riding"));
View Full Code Here


    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

        final DataGridColumnDescriptor<Pony, Pony> descriptor = new DataGridColumnDescriptor<Pony, Pony>();
        descriptor.setHeaderCellRenderer(new HeaderCellRenderer() {

            @Override
            public IsPWidget render() {
                return new PLabel();
            }
        });

        final DataGridColumnDescriptor<Pony, String> nameColumnDescriptor = new DataGridColumnDescriptor<Pony, String>();
        final ComplexHeaderCellRenderer nameHeaderCellRender = new FilterableHeaderCellRenderer("Name", new StringTextBoxFormField(), "name");
View Full Code Here

        createPony.addFormField(nameFormField);
        createPony.addFormField(raceFormField);
        createPony.addFormField(ageFormField);

        createPonyActivityPanel = new PFlexTable();
        createPonyActivityPanel.setWidget(0, 0, new PLabel("Add a pony"));
        createPonyActivityPanel.getFlexCellFormatter().setColSpan(0, 0, 3);
        createPonyActivityPanel.setWidget(1, 0, new FormFieldComponent("Name", nameFormField));
        createPonyActivityPanel.setWidget(1, 1, new FormFieldComponent("Race", raceFormField));
        createPonyActivityPanel.setWidget(1, 2, new FormFieldComponent("Age", ageFormField));
    }
View Full Code Here

    public DefaultFooterView(String copyright) {
        setSizeFull();
        content.setSizeFull();
        addStyleName(PonySDKTheme.FOOTER);

        final PLabel label = new PLabel(copyright);
        content.add(label);
        content.setCellHorizontalAlignment(label, PHorizontalAlignment.ALIGN_CENTER);
        content.setCellVerticalAlignment(label, PVerticalAlignment.ALIGN_MIDDLE);
        setWidget(content);
    }
View Full Code Here

        return formFieldComponent;
    }

    @Override
    public IsPWidget render(final FormField formField) {
        final PLabel captionLabel = new PLabel(caption);

        fields.add(textbox);
        final PAttachedPopupPanel popup = new PAttachedPopupPanel(true, textbox);
        popup.asWidget().setStyleName(PonySDKTheme.ORACLE_POPUP_PANEL);
View Full Code Here

        List<PLabel> currentMatchingElements = new ArrayList<PLabel>();

        private KeyUpHandler(final PTextBox textBox, final PPopupPanel popup, final PButton deploy) {
            // this.addStyleName(PonySDKTheme.ORACLE_LIST_BOX);
            this.previousPaginationLabel = new PLabel();
            this.deploy = deploy;
            this.down = new PLabel();
            down.addStyleName(PonySDKTheme.ORACLE_ARROW);
            down.addStyleName(PonySDKTheme.ORACLE_ARROW_DOWN);
            down.setVisible(false);
            this.up = new PLabel();
            up.addStyleName(PonySDKTheme.ORACLE_ARROW);
            up.addStyleName(PonySDKTheme.ORACLE_ARROW_UP);
            up.setVisible(false);
            initDeploy();
            this.textBox = textBox;
            this.popup = popup;
            this.nextPaginationLabel = new PLabel();
            nextPaginationLabel.setStyleName(PonySDKTheme.ORACLE_PAGINATION);
            this.popupContent = new PVerticalPanel();
            popupContent.setSizeFull();
            setHorizontalAlignment(PHorizontalAlignment.ALIGN_LEFT);
            add(previousPaginationLabel);
View Full Code Here

        void refreshLabels() {
            for (final PLabel l : currentMatchingElements) {
                l.removeStyleName(PonySDKTheme.ORACLE_LIST_BOX_SELECTED);
            }
            final PLabel selectedLabel = currentMatchingElements.get(currentSelected);
            selectedLabel.addStyleName(PonySDKTheme.ORACLE_LIST_BOX_SELECTED);
            textBox.setText(selectedLabel.getText());
        }
View Full Code Here

            // get element for current page
            final List<String> elementsForCurrentPage = matchingElements.subList(currentPageBeginIndex, currentPageEndIndex);
            // add element to popup
            for (final String s : elementsForCurrentPage) {

                final PLabel label = new PLabel(s);
                currentMatchingElements.add(label);
                label.addStyleName(PonySDKTheme.ORACLE_ITEM);
                label.addClickHandler(new PClickHandler() {

                    @Override
                    public void onClick(final PClickEvent event) {
                        OracleListBoxRenderer.this.onValueChange(new PValueChangeEvent<String>(this, s));
                        popup.hide();
View Full Code Here

        examplePanel.setWidget(panel);
    }

    private PWidget getDisclosurePanelContent() {
        final PVerticalPanel verticalPanel = new PVerticalPanel();
        verticalPanel.add(new PLabel("First Name: "));
        verticalPanel.add(new PTextBox());
        verticalPanel.add(new PLabel("Last Name: "));
        verticalPanel.add(new PTextBox());
        return verticalPanel;
    }
View Full Code Here

TOP

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

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.