Package com.ponysdk.ui.server.basic

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


public class RefreshableLabelCellRenderer<V> implements RefreshableCellRenderer<V, PHTML> {

    @Override
    public PHTML render(final int row, final V value) {
        return new PHTML((value == null ? "-" : value.toString()));
    }
View Full Code Here


        tabPanel = new PTabLayoutPanel();

        tabPanel.add(examplePanel, "Example");

        final PHTML sourcePanel = new PHTML(getSource());
        sourcePanel.addStyleName("codepanel");
        codePanel.setWidget(sourcePanel);

        tabPanel.add(codePanel, "Source Code");

        pageView.setWidget(tabPanel);
View Full Code Here

        super.onFirstShowPage();

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

        final PHTML htmlBold = new PHTML("<b>Pony Bold</b> and <font color='red'>Pony Red</font> using HTML");
        final PHTML htmlClickable = new PHTML("<span style='cursor: pointer;border: 1px solid black;color:white;background-color:gray;margin:5px;padding:10px'>click me!</span> using HTML and CSS");
        htmlClickable.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                logEvent("HTML clicked", clickEvent);
            }

        });

        final PHTML htmlDoubleClickable = new PHTML("<span style='cursor: pointer;border: 1px solid black;color:white;background-color:gray;margin:5px;padding:10px'>double click me!</span> using HTML and CSS");
        htmlDoubleClickable.addDoubleClickHandler(new PDoubleClickHandler() {

            @Override
            public void onDoubleClick(final PDoubleClickEvent clickEvent) {
                logEvent("HTML double clicked", clickEvent);
            }

        });

        final PHTML htmlWithContextMenu = new PHTML("<span style='cursor: pointer;border: 1px solid black;color:white;background-color:gray;margin:5px;padding:10px'>context menu on me!</span> using HTML and CSS");
        htmlWithContextMenu.preventEvent(PEvent.ONCONTEXTMENU);
        htmlWithContextMenu.addDomHandler(new PContextMenuHandler() {

            @Override
            public void onContextMenu(final PContextMenuEvent event) {
                PNotificationManager.showHumanizedNotification("Context menu triggered");
            }
View Full Code Here

                previous.getW().setHTML(value.v1);
            }

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

        datagrid = new RefreshableDataGrid<String, Data>(new DefaultSimpleListView());
        datagrid.addDataGridColumnDescriptor(descriptor);
View Full Code Here

        panel.setCellHorizontalAlignment(anchor, PHorizontalAlignment.ALIGN_LEFT);
        complexListView.getTopListLayout().setWidget(panel);
    }

    protected void hideSelectAllOption() {
        complexListView.getTopListLayout().setWidget(new PHTML());
    }
View Full Code Here

            @Override
            public void onRequest() {
                final PFlowPanel flowPanel1 = new PFlowPanel();
                flowPanel1.ensureDebugId("flowPanel1");
                flowPanel1.add(new PHTML("text1"));
                flowPanel1.add(new PHTML("text2"));
                flowPanel1.add(new PHTML("text3"));
                flowPanel1.add(new PHTML("text4"));
                PRootPanel.get().add(flowPanel1);
                register(flowPanel1);
            }
        });
View Full Code Here

        // creation
        updateUI(new RequestHandler() {

            @Override
            public void onRequest() {
                final PHTML html1 = new PHTML();
                html1.ensureDebugId("html1");
                html1.setHTML("Pure <b>HTML</b>");
                PRootPanel.get().add(html1);
                register(html1);
            }
        });

        final WebElement html1 = findElementById("html1");
        Assert.assertEquals("Pure HTML", html1.getText());
        Assert.assertEquals(1, html1.findElements(By.tagName("b")).size());

        final PHTML pHtml = get("html1");
        Assert.assertEquals("Pure <b>HTML</b>", pHtml.getHTML());
        Assert.assertEquals(false, pHtml.isWordWrap());
    }
View Full Code Here

            @SuppressWarnings("unchecked")
            @Override
            public void onRequest() {
                final PLabel tab2Label = new PLabel("tab 2");
                tab2Label.ensureDebugId("tab2Label");
                final PHTML tab3Label = new PHTML("tab <font color='red'>3</font>");

                final PTabPanel tabPanel1 = new PTabPanel();
                tabPanel1.add(new PLabel("content 1"), "tab 1");
                tabPanel1.add(new PLabel("content 2"), tab2Label);
                tabPanel1.add(new PLabel("content 3"), tab3Label);
View Full Code Here

TOP

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

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.