Examples of PButton


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

        final PTextBox placeHolder = new PTextBox();
        panel.add(new PLabel("Place holder : "));
        panel.add(placeHolder);

        final PButton button = new PButton("Set");
        button.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                textBox.setPlaceholder(placeHolder.getText());
                textBoxReadOnly.setPlaceholder(placeHolder.getText());
            }
        });
        panel.add(button);

        final PTextBox masked = new PTextBox();
        final PTextBox maskedTextBox = new PTextBox();
        final PTextBox replacement = new PTextBox();
        final PCheckBox showMask = new PCheckBox("Show mask");
        final PButton applyMaskButton = new PButton("Apply mask");
        applyMaskButton.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                if (masked.getText().isEmpty()) return;
View Full Code Here

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

    private int messageIndex = 1;

    public DefaultLoginPageView(final String title) {

        loginButton = new PButton(PString.get("activity.login.signin"));
        rememberMe = new PCheckBox(PString.get("activity.login.rememberme"));

        loginTextBox.setStyleName("pony-LoginPage-LoginTextBox");
        passwordTextBox.setStyleName("pony-LoginPage-PasswordTextBox");
        loginButton.addStyleName("pony-LoginPage-SubmitButton");
View Full Code Here

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

        complexListActivity.start(scrolPanel);

        // complexListActivity.getForm().addFormField(nameSearchField);
        // complexListActivity.getForm().addFormField(ageSearchField);

        final PButton addPonyButton = new PButton("Create new pony");
        addPonyButton.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                showCreatePonyPopup();
            }

        });
        addPonyButton.addStyleName(PonySDKTheme.BUTTON_GREEN);
        complexListView.getToolbarLayout().add(addPonyButton);

        // Load initial datas
        complexListActivity.refresh();
View Full Code Here

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

        final PVerticalPanel panel = new PVerticalPanel();

        // Send 'info' business event
        final PHorizontalPanel infoPanel = new PHorizontalPanel();
        final PTextBox textField = new PTextBox("This is an info event");
        final PButton ok = new PButton("send [INFO]");
        ok.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                final DemoBusinessEvent businessEvent = new DemoBusinessEvent(EventPageActivity.this);
                businessEvent.setBusinessMessage(textField.getText());
                fireEvent(businessEvent);
            }
        });

        infoPanel.add(textField);
        infoPanel.add(ok);

        // Send 'warn' business event
        final PHorizontalPanel warningPanel = new PHorizontalPanel();
        final PTextBox textField2 = new PTextBox("This is a warning event");
        final PButton ok2 = new PButton("send [WARN]");

        ok2.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                final DemoBusinessEvent businessEvent = new DemoBusinessEvent(EventPageActivity.this);
                businessEvent.setLevel(Level.WARNING);
                businessEvent.setBusinessMessage(textField2.getText());
                fireEvent(businessEvent);
            }
        });

        warningPanel.add(textField2);
        warningPanel.add(ok2);

        // Send 'error' business level
        final PHorizontalPanel errorPanel = new PHorizontalPanel();
        final PTextBox textField3 = new PTextBox("This is an error event");
        final PButton ok3 = new PButton("send [ERROR]");

        ok3.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                final DemoBusinessEvent businessEvent = new DemoBusinessEvent(EventPageActivity.this);
                businessEvent.setLevel(Level.ERROR);
                businessEvent.setBusinessMessage(textField3.getText());
                fireEvent(businessEvent);
            }
        });

        errorPanel.add(textField3);
        errorPanel.add(ok3);

        // Show 'tray' notification
        final PHorizontalPanel trayPanel = new PHorizontalPanel();
        final PTextBox textField4 = new PTextBox("This is a tray notification");
        final PButton ok4 = new PButton("show [TRAY]");

        ok4.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                PNotificationManager.notify(textField4.getText(), Notification.TRAY);
            }
View Full Code Here

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

        row = 0;
        layout = new PFlexTable();

        addLabel("Show a basic popup");
        final PButton anchor2 = addButton("Open");
        anchor2.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {

                final PPopupPanel popupPanel = new PPopupPanel();
                final PVerticalPanel content = new PVerticalPanel();
                final PButton closeButton = new PButton("Close");
                closeButton.addClickHandler(new PClickHandler() {

                    @Override
                    public void onClick(final PClickEvent clickEvent) {
                        popupPanel.hide();
                    }
                });
                content.add(new PLabel("A popup displayed relatively to the mouse click"));
                content.add(closeButton);
                content.setWidth("200px");
                content.setHeight("200px");
                popupPanel.setWidget(content);
                popupPanel.setPopupPosition(clickEvent.getClientX(), clickEvent.getClientY());
                popupPanel.show();
            }
        });

        addLabel("A draggable popup");
        final PButton anchor3 = addButton("Open");
        anchor3.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                final PClosableDialogBox dialogBox = new PClosableDialogBox("Custom caption");
                dialogBox.setDraggable(true);
                dialogBox.setContent(new PLabel("Content of a popup"));
                dialogBox.center();
            }
        });

        addLabel("A confirm dialog listenening on the close event");
        final PButton anchor4 = addButton("Open");
        anchor4.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                final POptionPane dialodBox = POptionPane.showConfirmDialog(new PActionHandler() {

                    @Override
                    public void onAction(final PDialogBox dialogBox, final String option) {
                        dialogBox.hide();
                    }
                }, "Your custom text");

                dialodBox.getDialogBox().addCloseHandler(new PCloseHandler() {

                    @Override
                    public void onClose(final PCloseEvent closeEvent) {
                        final DemoBusinessEvent event = new DemoBusinessEvent(this);
                        event.setBusinessMessage("Dialog box closed");
                        fireEvent(event);
                    }
                });
            }
        });

        addLabel("A confirm dialog listenening on the close event");
        final PButton anchor5 = addButton("Open");
        anchor5.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                POptionPane.showConfirmDialog(new PActionHandler() {

                    @Override
                    public void onAction(final PDialogBox dialogBox, final String option) {
                        dialogBox.hide();
                        final DemoBusinessEvent event = new DemoBusinessEvent(this);
                        event.setBusinessMessage("Option selected #" + option);
                        fireEvent(event);
                    }
                }, "Your custom text", "Your title", POptionType.YES_NO_CANCEL_OPTION);
            }
        });

        addLabel("PConfirmDialogBox");
        final PButton anchor6 = addButton("Open");
        anchor6.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                PConfirmDialog.show("Question ?", new PLabel("This is a confirm dialog box"));
            }
View Full Code Here

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

        layout.setWidget(row, 0, label);
        return label;
    }

    private PButton addButton(final String text) {
        final PButton button = new PButton(text);
        layout.setWidget(row++, 1, button);
        return button;
    }
View Full Code Here

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

        super.onFirstShowPage();

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

        panel.add(new PButton("Button 1"));
        panel.add(new PButton("Button 2"));
        panel.add(new PButton("Button 3"));
        panel.add(new PButton("Button 4"));

        examplePanel.setWidget(panel);
    }
View Full Code Here

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

        formLayout.setWidget(3, 3, grayPreview);
        formLayout.setWidget(4, 3, grayLightPreview);
        formLayout.setWidget(5, 3, grayLighterPreview);
        formLayout.setWidget(6, 3, whitePreview);

        final PButton validateButton = new PButton("Validate");
        validateButton.setStyleName("pony-PButton accent");
        validateButton.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                final boolean isValid = form.isValid();
                if (isValid) {
View Full Code Here

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

            public void onSelection(final PSelectionEvent<Integer> event) {
                PNotificationManager.showTrayNotification("onSelection, tab index : " + event.getSelectedItem());
            }
        });

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

            @Override
            public void onClick(final PClickEvent clickEvent) {
                addTabContent(tabPanel);
            }
        });

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

        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

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

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