Package com.ponysdk.ui.server.basic.event

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


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

        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


                final PDialogBox dialogBox1 = get("dialogBox1");
                final PButton close1 = new PButton("Close");
                close1.ensureDebugId("close1");
                dialogBox1.setWidget(close1);
                dialogBox1.addCloseHandler(eventsListener);
                close1.addClickHandler(new PClickHandler() {

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

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

        final PAnchor anchor = new PAnchor("And a link");
        anchor.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                PNotificationManager.showTrayNotification("Link clicked");
            }
View Full Code Here

        builGUI();
    }

    private void builGUI() {
        title.addStyleName(PonySDKTheme.COMPLEXLIST_HEADERCELLRENDERER_COMPLEX_SORTABLE);
        title.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                final SortingType nextSortingType = HeaderSortingHelper.getNextSortingType(sortingType);
                sort(nextSortingType);
View Full Code Here

    }

    protected void buildCaption(final String s) {
        caption = new PLabel(s);
        caption.addStyleName(PonySDKTheme.COMPLEXLIST_HEADERCELLRENDERER_COMPLEX_SORTABLE);
        caption.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                caption.addStyleName(HeaderSortingHelper.getAssociatedStyleName(sortingType));
                final SortingType nextSortingType = HeaderSortingHelper.getNextSortingType(sortingType);
View Full Code Here

                // up image
                final PImage upImage = new PImage(ARROW_UP_IMAGE_URL);
                upImage.setTitle("Move column up");
                buttonPanel.add(upImage);
                buttonPanel.setCellHorizontalAlignment(upImage, PHorizontalAlignment.ALIGN_LEFT);
                upImage.addClickHandler(new PClickHandler() {

                    @Override
                    public void onClick(final PClickEvent event) {
                        final int index = labels.indexOf(label) - 1;
                        labels.remove(label);
                        labels.add(index, label);
                        fireColumnMoved();
                        for (int row = 1; row <= labels.size(); row++) {
                            labelPanel.getRowFormatter().removeStyleName(row, PonySDKTheme.SIMPLELIST_SELECTEDROW);
                        }
                        labelPanel.getRowFormatter().addStyleName(index + 1, PonySDKTheme.SIMPLELIST_SELECTEDROW);
                    }
                });
            }
            if (i != labels.size()) {
                // down image
                final PImage downImage = new PImage(ARROW_DOWN_IMAGE_URL);
                downImage.setTitle("Move column down");
                buttonPanel.add(downImage);
                buttonPanel.setCellHorizontalAlignment(downImage, PHorizontalAlignment.ALIGN_RIGHT);
                downImage.addClickHandler(new PClickHandler() {

                    @Override
                    public void onClick(final PClickEvent event) {
                        final int index = labels.indexOf(label) + 1;
                        labels.remove(label);
                        labels.add(index, label);
                        fireColumnMoved();
                        for (int row = 1; row <= labels.size(); row++) {
                            labelPanel.getRowFormatter().removeStyleName(row, PonySDKTheme.SIMPLELIST_SELECTEDROW);
                        }
                        labelPanel.getRowFormatter().addStyleName(index + 1, PonySDKTheme.SIMPLELIST_SELECTEDROW);
                    }
                });
            }
            // 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

    private final PWidget widget;

    public SortableHeader(final PWidget widget, final String pojoPropertyKey) {
        this.widget = widget;
        this.widget.addStyleName(PonySDKTheme.COMPLEXLIST_HEADERCELLRENDERER_COMPLEX_SORTABLE);
        this.widget.addDomHandler(new PClickHandler() {

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

            public void onValueChange(final PValueChangeEvent<Date> event) {
                updateMainFormField();
            }
        });

        anchor.addClickHandler(new PClickHandler() {

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

    private static void showHumanizedNotification(final IsPWidget content) {
        final PPopupPanel popupPanel = new PPopupPanel(true);
        popupPanel.addStyleName(PonySDKTheme.NOTIFICATION);
        popupPanel.addStyleName(PonySDKTheme.NOTIFICATION_HUMANIZED);
        popupPanel.setWidget(content);
        popupPanel.addDomHandler(new PClickHandler() {

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

    private static void showWarningNotification(final IsPWidget content) {
        final PPopupPanel popupPanel = new PPopupPanel(true);
        popupPanel.addStyleName(PonySDKTheme.NOTIFICATION);
        popupPanel.addStyleName(PonySDKTheme.NOTIFICATION_WARNING);
        popupPanel.setWidget(content);
        popupPanel.addDomHandler(new PClickHandler() {

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

TOP

Related Classes of com.ponysdk.ui.server.basic.event.PClickHandler

Copyright © 2018 www.massapicom. 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.