Package com.ponysdk.ui.server.basic

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


                public void onClick(final PClickEvent event) {
                    MyWindow.this.postOpenerCommand(new SayHelloCommand());
                }
            });
            final PButton execJs = new PButton("Exec javascript");
            execJs.addClickHandler(new PClickHandler() {

                @Override
                public void onClick(final PClickEvent event) {
                    script.execute("alert('from the popup');");
                }
View Full Code Here


        super.onFirstShowPage();

        label = new PLabel("0");

        final PButton scheduleRepeatingButton = new PButton("Start");
        scheduleRepeatingButton.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                timer.scheduleRepeating(Integer.valueOf(textBox.getText()));
            }
View Full Code Here

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

        // 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
            public void onClick(final PClickEvent event) {
                final PTerminalScheduledCommand deferred1 = new PTerminalScheduledCommand() {
View Full Code Here

        for (final String option : options) {
            final PButton button = new PButton();
            button.setText(option);
            button.ensureDebugId("optionpane[" + option + "]");
            button.addClickHandler(new PClickHandler() {

                @Override
                public void onClick(final PClickEvent clickEvent) {
                    handler.onAction(dialogBox, option);
                }
View Full Code Here

            }
        });

        final PButton button = new PButton("Add Tab");
        button.setStyleProperty("margin", "10px");
        button.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                addTabContent(tabPanel);
            }
View Full Code Here

            }
        });

        final PButton addCustomTabButton = new PButton("Add Tab (custom tab)");
        addCustomTabButton.setStyleProperty("margin", "10px");
        addCustomTabButton.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                addCustomTabContent(tabPanel);
            }
View Full Code Here

        });

        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

        controlsPanel.setWidth("100%");

        if (cancelCaption != null) {
            final PButton cancelButton = new PButton();
            cancelButton.setText(cancelCaption);
            cancelButton.addClickHandler(new PClickHandler() {

                @Override
                public void onClick(final PClickEvent clickEvent) {
                    if (confirmDialogHandler != null) {
                        confirmDialogHandler.onCancel();
View Full Code Here

            confirmDialog.setCancelButton(cancelButton);
        }
        if (okCaption != null) {
            final PButton okButton = new PButton();
            okButton.setText(okCaption);
            okButton.addClickHandler(new PClickHandler() {

                @Override
                public void onClick(final PClickEvent clickEvent) {
                    if (confirmDialogHandler != null) {
                        if (confirmDialogHandler.onOK(confirmDialog)) confirmDialog.hide();
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.