Package com.ponysdk.ui.server.basic

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


        final PVerticalPanel bodyLayout = new PVerticalPanel();
        bodyLayout.setSizeFull();

        final PButton button = new PButton("Remove last row");
        button.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent clickEvent) {
                table.removeRow(table.getRowCount() - 1);
            }
View Full Code Here


        bodyLayout.add(button);
        bodyLayout.add(table);

        final PButton scheduleButton = new PButton("Schedule");
        scheduleButton.addClickHandler(new PClickHandler() {

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

    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

    }

    @Override
    public void addAction(final String caption, final PClickHandler clickHandler) {
        final PButton button = new PButton(caption);
        button.addClickHandler(clickHandler);
        toolbarLayout.add(button);
    }

    @Override
    public void clearList() {
View Full Code Here

        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"));
View Full Code Here

                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

        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

        final PTextBox name = new PTextBox();
        name.setPlaceholder("Cookie name");
        final PTextBox value = new PTextBox();
        name.setPlaceholder("Cookie value");
        final PButton add = new PButton("Add");
        add.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                UIContext.get().getCookies().setCookie(name.getValue(), value.getValue());
            }
View Full Code Here

        });

        final PTextBox name2 = new PTextBox();
        name2.setPlaceholder("Cookie name");
        final PButton remove = new PButton("Remove");
        remove.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                UIContext.get().getCookies().removeCookie(name2.getValue());
            }
View Full Code Here

                });
            }
            // add erase button for custom column
            if (label.custom) {
                final PButton eraseButton = new PButton("Erase");
                eraseButton.addClickHandler(new PClickHandler() {

                    @Override
                    public void onClick(final PClickEvent event) {
                        eventBus.fireEvent(new RemoveColumnDescriptorEvent(PreferenceForm.this, label.getText(), tableName));
                        labels.remove(label);
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.