Examples of PClickHandler


Examples of com.ponysdk.ui.server.basic.event.PClickHandler

        currentFormActivityPanel = new PSimplePanel();
        verticalPanel.add(currentFormActivityPanel);

        final PHorizontalPanel horizontalPanel = new PHorizontalPanel();
        verticalPanel.add(horizontalPanel);
        next.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                if (currentFormActivity.isValid() && index != (formActivities.size() - 1)) {
                    currentFormActivityPanel.clear();
                    for (final WizardActivityHandler handler : wizardActivityHandlers) {
                        handler.onNext(currentFormActivity);
                    }
                    index++;
                    currentFormActivity = formActivities.get(index);
                    currentFormActivity.start(currentFormActivityPanel);
                    update();
                }

            }
        });
        horizontalPanel.add(previous);
        previous.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                if (index != 0) {
                    currentFormActivityPanel.clear();
                    for (final WizardActivityHandler handler : wizardActivityHandlers) {
                        handler.onPrevious(currentFormActivity);
                    }
                    index--;
                    currentFormActivity = formActivities.get(index);
                    currentFormActivity.start(currentFormActivityPanel);
                    update();
                }
            }
        });
        horizontalPanel.add(next);
        horizontalPanel.add(finish);
        horizontalPanel.add(cancel);
        finish.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                boolean valid = true;
                for (final FormActivity activity : formActivities) {
                    if (!activity.isValid()) valid = false;
                }
                if (valid) {
                    for (final WizardActivityHandler handler : wizardActivityHandlers) {
                        handler.onFinish(currentFormActivity);
                    }
                }
            }
        });
        cancel.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent arg0) {
                container.hide();
            }
View Full Code Here

Examples of com.ponysdk.ui.server.basic.event.PClickHandler

    private PWidget buildCustomToolbar(final PRichTextArea richTextArea) {

        final PTextBox color = new PTextBox();
        color.setPlaceholder("Color");
        final PButton update = new PButton("Set back color");
        update.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                final String c = color.getValue();
                richTextArea.getFormatter().setBackColor(c);
View Full Code Here

Examples of com.ponysdk.ui.server.basic.event.PClickHandler

    }

    @Override
    public IsPWidget render0(final int row, final String value) {
        final PAnchor anchor = new PAnchor(value);
        anchor.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                UIContext.fireEvent(new PlaceChangeRequestEvent(PlaceChangeCellRenderer.this, place));
            }
View Full Code Here

Examples of com.ponysdk.ui.server.basic.event.PClickHandler

        formLayout.setWidget(3, 1, formFieldComponent8);
        formLayout.setWidget(4, 0, formFieldComponent9);
        formLayout.setWidget(4, 1, formFieldComponent10);

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

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

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

            @Override
            public void onClick(final PClickEvent clickEvent) {
                form.reset();
                PNotificationManager.showHumanizedNotification("The form has been reseted");
View Full Code Here

Examples of com.ponysdk.ui.server.basic.event.PClickHandler

        panel.setTitle("caption");
        final PWidget unselectedWidget = unselected.asWidget();
        panel.add(unselectedWidget);
        switchButton = new PButton("<>");
        formFieldComponent.setCaption(caption);
        switchButton.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                selectValues.clear();
                for (int i = 1; i < unselected.getItemCount(); i++) {
View Full Code Here

Examples of com.ponysdk.ui.server.basic.event.PClickHandler

            final PRadioButton radioButton = new PRadioButton(caption, item);
            if (debugID != null) {
                radioButton.ensureDebugId(debugID + "[" + item + "]");
            }

            radioButton.addClickHandler(new PClickHandler() {

                @Override
                public void onClick(PClickEvent event) {
                    selectItem(item);
                }
View Full Code Here

Examples of com.ponysdk.ui.server.basic.event.PClickHandler

        final PFlowPanel panel = new PFlowPanel();

        final PButton downloadImageButton = new PButton("Download Pony image");

        downloadImageButton.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                final StreamResource streamResource = new StreamResource();
                streamResource.open(new StreamHandler() {
View Full Code Here

Examples of com.ponysdk.ui.server.basic.event.PClickHandler

            public void onKeyPress(final PKeyPressEvent keyPressEvent) {
                doLogin();
            }
        }, PKeyPressEvent.TYPE);

        loginPageView.getLoginButton().addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                doLogin();
            }
View Full Code Here

Examples of com.ponysdk.ui.server.basic.event.PClickHandler

        panel.add(signOutAnchor);
        popup.setWidget(panel);

        signOutAnchor.ensureDebugId("sign_out_anchor");
        signOutAnchor.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                optionsAnchor.removeStyleName(PonySDKTheme.HEADER_ACCOUNT_MENU_SELECTED);
                popup.hide();

                final POptionPane optionPane = POptionPane.showConfirmDialog(new PActionHandler() {

                    @Override
                    public void onAction(final PDialogBox dialogBox, final String option) {
                        if (POption.YES_OPTION.equals(option)) {
                            dialogBox.hide();
                            final UserLoggedOutEvent userLoggedOutEvent = new UserLoggedOutEvent(this, userLogged);
                            fireEvent(userLoggedOutEvent);
                        } else {
                            dialogBox.hide();
                        }
                    }
                }, "Really logout user " + userLogged.getName() + " ?", "Sign out", POptionType.YES_NO_OPTION);

                optionPane.getDialogBox().ensureDebugId("sign_out_dialog");
            }
        });

        optionsAnchor.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                if (popup.isShowing()) {
                    popup.hide();
View Full Code Here

Examples of com.ponysdk.ui.server.basic.event.PClickHandler

        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);
            }
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.