Package com.ponysdk.ui.server.basic

Examples of com.ponysdk.ui.server.basic.PButton.addClickHandler()


        });

        final PTextBox indexTextBox = new PTextBox();
        final PButton selectButton = new PButton("Select Tab");
        selectButton.setStyleProperty("margin", "10px");
        selectButton.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                final String text = indexTextBox.getText();
                tabPanel.selectTab(Integer.valueOf(text));
View Full Code Here


        final PSimplePanel formLayout = new PSimplePanel();
        layout.add(formLayout);
        formActivity.start(formLayout);

        final PButton validateButton = new PButton("Validate");
        validateButton.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                final boolean isValid = formActivity.isValid();
                PNotificationManager.showTrayNotification("The form is valid? " + (isValid ? "YES" : "NO"));
View Full Code Here

            }
        });
        layout.add(validateButton);

        final PButton resetButton = new PButton("Reset");
        resetButton.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                formActivity.reset();
            }
View Full Code Here

        table.setWidget(1, 1, nameTextBox = new PTextBox("PonySDK"));
        table.setWidget(2, 0, new PLabel("Features"));
        table.setWidget(2, 1, featuresTextBox = new PTextBox("width=1280,height=800,resizable,status=1"));

        final PButton open = new PButton("Open new window");
        open.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                final String url = urlTextBox.getText();
                final String name = nameTextBox.getText();
View Full Code Here

        table2.setWidget(0, 1, popNameTextBox = new PTextBox("Popup"));
        table2.setWidget(1, 0, new PLabel("Features"));
        table2.setWidget(1, 1, popFeaturesTextBox = new PTextBox("width=500,height=300,resizable"));

        final PButton open2 = new PButton("Open new window");
        open2.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                final String disc = windows.size() == 0 ? "" : Integer.toString(windows.size());
                final String name = popNameTextBox.getText();
View Full Code Here

                windows.add(window);
            }
        });

        final PButton postHello = new PButton("Post message");
        postHello.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                for (final PWindow window : windows) {
                    window.acquire();
View Full Code Here

                }
            }
        });

        final PButton closeAllWindow = new PButton("Close all windows");
        closeAllWindow.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                for (final PWindow window : windows) {
                    window.close();
View Full Code Here

            script = PScript.get();
            rootLayoutPanel = PRootLayoutPanel.get();

            final PFlowPanel flow = new PFlowPanel();
            final PButton addMessage = new PButton("Add message");
            addMessage.addClickHandler(new PClickHandler() {

                @Override
                public void onClick(final PClickEvent event) {
                    flow.add(new PLabel("Hello " + (count++)));
                }
View Full Code Here

                public void onClick(final PClickEvent event) {
                    flow.add(new PLabel("Hello " + (count++)));
                }
            });
            final PButton clearMessage = new PButton("Clear message");
            clearMessage.addClickHandler(new PClickHandler() {

                @Override
                public void onClick(final PClickEvent event) {
                    for (int i = flow.getWidgetCount() - 1; i > 2; i--) {
                        flow.remove(i);
View Full Code Here

                        flow.remove(i);
                    }
                }
            });
            final PButton postMessage = new PButton("Post message");
            postMessage.addClickHandler(new PClickHandler() {

                @Override
                public void onClick(final PClickEvent event) {
                    MyWindow.this.postOpenerCommand(new SayHelloCommand());
                }
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.