Examples of PHTML


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

        countDescriptor.setValueProvider(new IdentityValueProvider<PonyStock>());
        countDescriptor.setCellRenderer(new RefreshableCellRenderer<PonyStock, PHTML>() {

            @Override
            public PHTML render(final int row, final PonyStock value) {
                return new PHTML(value.getCount().toString());
            }

            @Override
            public void update(final PonyStock value, final Cell<PonyStock, PHTML> previous) {
                previous.getW().setText(value.getCount().toString());
View Full Code Here

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

        priceDescriptor.setValueProvider(new IdentityValueProvider<PonyStock>());
        priceDescriptor.setCellRenderer(new RefreshableCellRenderer<PonyStock, PHTML>() {

            @Override
            public PHTML render(final int row, final PonyStock value) {
                return new PHTML(value.getPrice().toString());
            }

            @Override
            public void update(final PonyStock value, final Cell<PonyStock, PHTML> previous) {
                previous.getW().setText(value.getPrice().toString());
View Full Code Here

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

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

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

        raceDescriptor.setValueProvider(new IdentityValueProvider<PonyStock>());
        raceDescriptor.setCellRenderer(new RefreshableCellRenderer<PonyStock, PHTML>() {

            @Override
            public PHTML render(final int row, final PonyStock value) {
                return new PHTML(value.getRace());
            }

            @Override
            public void update(final PonyStock value, final Cell<PonyStock, PHTML> previous) {
                // no update
View Full Code Here

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

        idDescriptor.setValueProvider(new IdentityValueProvider<PonyStock>());
        idDescriptor.setCellRenderer(new RefreshableCellRenderer<PonyStock, PHTML>() {

            @Override
            public PHTML render(final int row, final PonyStock value) {
                return new PHTML(value.getId().toString());
            }

            @Override
            public void update(final PonyStock value, final Cell<PonyStock, PHTML> previous) {
                // no update
View Full Code Here

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

        icon.addStyleName("icon");
        final PLabel header = new PLabel(currency);
        header.addStyleName("header");
        final PAnchor close = new PAnchor();
        close.addStyleName("close");
        final PHTML buy = new PHTML("<div></div>");
        buy.addStyleName("buy");
        buy.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                PNotificationManager.showHumanizedNotification("Buy clicked!");
            }
        });

        final PLabel buyPipHead = new PLabel("buy");
        buyPipHead.addStyleName("buy_pip_head");
        final PLabel buyNum = new PLabel("1.22");
        buyNum.addStyleName("buy_num");
        final PFlowPanel buyPipNum = new PFlowPanel();
        buyPipNum.addStyleName("buy_pip_num");
        final PElement buyPipNumStrong = new PElement("strong");
        final PFlowPanel buyDirection = new PFlowPanel();
        buyDirection.addStyleName("buy_direction");
        final PHTML sell = new PHTML("<div></div>");
        sell.addStyleName("sell");
        sell.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                PNotificationManager.showHumanizedNotification("Sell clicked!");
            }
View Full Code Here

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

                final String selectedItem = themesSelector.getSelectedItem();
                setTheme(selectedItem);
            }
        });

        layout.add(new PHTML("<br><br><br>"));
        layout.add(new PLabel("You can easily compile many themes"));
        layout.add(new PLabel("Try some of it: "));
        layout.add(themesSelector);

        examplePanel.setWidget(layout);
View Full Code Here

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

                    window.close();
                }
            }
        });

        verticalPanel.add(new PHTML("<b>Simple popup</b>"));
        verticalPanel.add(table);
        verticalPanel.add(open);

        verticalPanel.add(new PHTML("<br><br><b>Communicating popup</b>"));
        verticalPanel.add(table2);
        verticalPanel.add(open2);
        verticalPanel.add(postHello);
        verticalPanel.add(closeAllWindow);
View Full Code Here

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

        panel.add(scheduleRepeatingButton);

        // Fixed delay
        final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy MM dd hh:mm:ss");
        final PLabel dateLabel = new PLabel(dateFormat.format(Calendar.getInstance().getTime()));
        panel.add(new PHTML("<br>"));
        panel.add(new PLabel("Fixed delay timer"));
        panel.add(dateLabel);
        final PButton fixedDelayButton = new PButton("Start");
        fixedDelayButton.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                PScheduler.get().scheduleFixedDelay(new RepeatingCommand() {

                    @Override
                    public boolean execute() {
                        dateLabel.setText(dateFormat.format(Calendar.getInstance().getTime()));
                        return true;
                    }
                }, 1000);
            }
        });
        panel.add(fixedDelayButton);

        // Client side only
        panel.add(new PHTML("<br>"));
        panel.add(new PLabel("Timer (terminal side)"));
        final PButton changeColorsBUtton = new PButton("Start");
        changeColorsBUtton.addClickHandler(new PClickHandler() {

            @Override
View Full Code Here

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

public class PHTMLRenderer implements NotificationTypeRenderer<String> {

    @Override
    public PWidget getWidget(final String source) {
        return new PHTML(source);
    }
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.