Package com.ponysdk.ui.server.basic

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


        add(endButton);
    }

    @Override
    public void addSeparator(final String text) {
        add(new PLabel(text));
    }
View Full Code Here


        examplePanel.setWidget(verticalPanel);
    }

    private PWidget buildBox(final String label) {
        final PLabel lbl = new PLabel(label);
        lbl.addStyleName("label");

        final PFlowPanel box = new PFlowPanel();
        box.addStyleName("ddbox");
        box.add(lbl);
View Full Code Here

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

        final PVerticalPanel panel = new PVerticalPanel();

        panel.add(new PLabel("StackLayout: "));

        final PStackLayoutPanel stackLayoutPanel = new PStackLayoutPanel(PUnit.PX);

        stackLayoutPanel.setStyleProperty("border", "1px solid #CCC");
View Full Code Here

    private PScrollPanel buildCenterPanel() {
        final PScrollPanel panel = new PScrollPanel();
        panel.setSizeFull();
        panel.setStyleProperty("backgroundColor", "#c17d7d");
        panel.setWidget(new PLabel(
                "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;
    }
View Full Code Here

    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

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

        final PVerticalPanel panel = new PVerticalPanel();

        panel.add(new PLabel("Choose a word:"));

        final PSuggestBox suggestBox = new PSuggestBox();
        suggestBox.setLimit(10);

        final PMultiWordSuggestOracle suggestOracle = (PMultiWordSuggestOracle) suggestBox.getSuggestOracle();
        suggestBox.addSelectionHandler(new PSelectionHandler<PSuggestion>() {

            @Override
            public void onSelection(final PSelectionEvent<PSuggestion> event) {
                final String msg = "Selected item : " + event.getSelectedItem().getReplacementString();
                UIContext.getRootEventBus().fireEvent(new DemoBusinessEvent(msg));
            }
        });

        final Query query = new Query();
        final FindPonysCommand command = new FindPonysCommand(query);
        final Result<List<Pony>> ponys = command.execute();

        final List<String> datas = new ArrayList<String>();
        for (final Pony pony : ponys.getData()) {
            datas.add(pony.getName());
        }
        suggestOracle.addAll(datas);
        suggestOracle.setDefaultSuggestions(datas.subList(0, 5));

        panel.add(suggestBox);

        panel.add(new PHTML("<br><br>"));

        panel.add(new PLabel("Manipulate the suggest box:"));
        final PListBox operation = new PListBox(true);
        operation.addItem("Select \"Friesian horse\"", 0);
        operation.addItem("Get textbox value", 1);
        operation.addItem("Enable/Disable textbox", 2);
        operation.addItem("Clear", 3);
View Full Code Here

    protected void removeColspanRow() {
        dataGrid.remove(5);
    }

    protected void insertColspanRow() {
        dataGrid.insertRow(5, 0, 4, new PLabel("Hello " + System.currentTimeMillis()));
    }
View Full Code Here

            @Override
            public void onClick(final PClickEvent event) {
                final Integer index = addRowFormField.getValue();
                if (index != null) {
                    dataGrid.insertRow(index, 0, 4, new PLabel("Colspan 1 inserted"));
                }
            }
        });

        final PButton removeByKeyButton = new PButton("Remove a row (by key)");
View Full Code Here

                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

        final PMenuBar menuBar1 = createMenuBar(false);
        final PMenuBar menuBar2 = createMenuBar(true);
        final PMenuBar menuBar3 = createMenuBar(true);
        final PMenuBar menuBar4 = createMenuBar(true);

        panel.add(new PLabel("Horizontal Menu Bar [Default Style]"));
        panel.add(menuBar1);
        panel.add(new PLabel("Vertical Menu Bar [Default Style]"));
        panel.add(menuBar2);
        panel.add(new PLabel("Vertical Menu Bar [Light Style]"));
        panel.add(menuBar3);
        panel.add(new PLabel("Vertical Menu Bar [Toolbar Style]"));
        panel.add(menuBar4);

        menuBar2.setStylePrimaryName("samplePopup");
        menuBar3.addStyleName(PonySDKTheme.MENUBAR_LIGHT);
        menuBar4.setStyleName("pony-ActionToolbar");
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.