Package com.ponysdk.ui.server.basic

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


            row.insert(row.getWidget(index), beforeIndex);
        }
    }

    private void checkRowBound(final int beforeIndex) {
        final PElement parentElement = (beforeIndex == 0) ? thead : tbody;

        if ((beforeIndex < 0) || (beforeIndex >= parentElement.getWidgetCount() + (beforeIndex == 0 ? 0 : 1))) {
            if ((beforeIndex < 0)) throw new IndexOutOfBoundsException("(beforeIndex (" + beforeIndex + ") < 0)");
            else throw new IndexOutOfBoundsException("beforeIndex (" + beforeIndex + ") >= size (" + parentElement.getWidgetCount() + ")");
        }
    }
View Full Code Here


        super.clear(from);
    }

    @Override
    public void insertRow(final int row) {
        insert(new PElement("tr"), row);
    }
View Full Code Here

    @Override
    public void addColumnStyle(final int column, final String styleName) {
        final Iterator<PElement> iterator = getColumnIterator(column);
        while (iterator.hasNext()) {
            final PElement e = iterator.next();
            e.addStyleName(styleName);
        }
    }
View Full Code Here

    @Override
    public void removeColumnStyle(final int column, final String styleName) {
        final Iterator<PElement> iterator = getColumnIterator(column);
        while (iterator.hasNext()) {
            final PElement e = iterator.next();
            e.removeStyleName(styleName);
        }
    }
View Full Code Here

        }
    }

    @Override
    public void setColumnWidth(final int column, final String width) {
        final PElement cell = getCell(0, column);
        cell.setStyleProperty("width", width);
    }
View Full Code Here

            public void onClick(final PClickEvent event) {
                PNotificationManager.showTrayNotification("Link clicked");
            }
        });

        final PElement ul = new PElement("ul");
        final PElement li1 = new PElement("li");
        final PElement li2 = new PElement("li");
        final PElement li3 = new PElement("li");
        final PElement li4 = new PElement("li");
        li1.setInnerText("Item 1");
        li2.setInnerText("Item 2");
        li3.setInnerText("Item 3");
        li3.setInnerText("Item 3");
        li4.add(anchor);
        ul.add(li1);
        ul.add(li2);
        ul.add(li3);
        ul.add(li4);
        ul.addStyleName("customList");
View Full Code Here

        // creation
        updateUI(new RequestHandler() {

            @Override
            public void onRequest() {
                final PElement ul1 = new PElement("ul");
                ul1.ensureDebugId("ul1");
                final PElement li1 = new PElement("li");
                li1.setInnerText("1rst element");
                final PElement li2 = new PElement("li");
                li2.setInnerHTML("<font color='red'>2d</font> element");
                final PLabel label1 = new PLabel("A widget");
                ul1.add(li1);
                ul1.add(li2);
                ul1.add(label1);
                PRootPanel.get().add(ul1);
View Full Code Here

TOP

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

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.