Package com.smartgwt.client.widgets.form.fields.events

Examples of com.smartgwt.client.widgets.form.fields.events.ClickHandler


        spacer2.setHeight(5);

        ButtonItem ok = new ButtonItem("okButtonItem", MSG.common_button_ok());
        ok.setEndRow(false);
        ok.setAlign(Alignment.RIGHT);
        ok.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                if (validate(false)) {
                    AbstractNotificationSenderForm senderForm = (AbstractNotificationSenderForm) senderCanvasItem
                        .getCanvas();
                    senderForm.validate(new AsyncCallback<Void>() {
                        public void onSuccess(Void o) {
                            saveNewNotification();
                            closeFunction.run();
                        }

                        public void onFailure(Throwable t) {
                            //do nothing
                            //the sender form is supposed to warn the user about what is wrong
                            //with the supplied values.
                        }
                    });
                }
            }
        });

        ButtonItem cancel = new ButtonItem("cancelButtonItem", MSG.common_button_cancel());
        cancel.setStartRow(false);
        cancel.setAlign(Alignment.LEFT);
        cancel.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                closeFunction.run();
            }
        });
View Full Code Here


        failureIcon.setWidth(16);
        failureIcon.setHeight(16);

        form.setFields(anotherUserName, anotherUserPassword, verifyUserButton);

        verifyUserButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                //just checking the auth is ok, no other action is needed.
                checkAuthenticationAndDo(new AsyncCallback<Void>() {
                    public void onFailure(Throwable caught) {
                    }
View Full Code Here

    }

    protected void prepareWidget() {
        setPrompt(CoreGUI.getMessages().widget_colorPicker_tooltip());

        addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                ColorPicker picker = new ColorPicker();
                picker.setAllowComplexMode(false);
                if (currentColor != null) {
View Full Code Here

        form.setCellPadding(10);

        ButtonItem ok = new ButtonItem("ok", MSG.common_button_ok());
        ok.setStartRow(true);
        ok.setEndRow(false);
        ok.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                ok();
            }
        });
        ButtonItem cancel = new ButtonItem("cancel", MSG.common_button_cancel());
        cancel.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                cancel();
            }
        });
View Full Code Here

        ButtonItem addButton = new ButtonItem("add", MSG.view_dynagroup_exprBuilder_addExpression());
        addButton.setColSpan(2);
        addButton.setAlign(Alignment.CENTER);
        addButton.setStartRow(true);
        addButton.setEndRow(true);
        addButton.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                addExpression();
            }
        });
        ButtonItem closeButton = new ButtonItem("close", MSG.common_button_close());
        closeButton.setColSpan(2);
        closeButton.setAlign(Alignment.CENTER);
        closeButton.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                closeExpressionBuilder();
            }
        });
View Full Code Here

            MSG.view_alert_definition_notification_operation_editor_specific_pick_button());
        singleResourceButtonItem.setStartRow(false);
        singleResourceButtonItem.setEndRow(true);
        singleResourceButtonItem.setShowTitle(false);
        singleResourceButtonItem.setShowIfCondition(new ShowIfModeFunction(ResourceSelectionMode.SPECIFIC));
        singleResourceButtonItem.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                SingleResourcePicker singleResourcePicker;
                singleResourcePicker = new SingleResourcePicker(new OkHandler() {
                    public boolean ok(Set<Integer> resourceIdSelection) {
View Full Code Here

            formItems.add(lastOperation);
        }
        if (null != storageNode.getErrorMessage() || null != storageNode.getFailedOperation()) {
            lastOperationAck = new StaticTextItem("lastOpAck", "");
            lastOperationAck.setValue("<span style='color: #0099D3;'>" + MSG.common_button_ack() + "</span>");
            lastOperationAck.addClickHandler(new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    ackFailedOperation(storageNode);
                }
            });
View Full Code Here

                                                    LinkItem link = new LinkItem();
                                                    link.setLinkTitle(title);
                                                    link.setShowTitle(false);
                                                    link.setClipValue(false);
                                                    link.setWrap(true);
                                                    link.addClickHandler(new ClickHandler() {
                                                        @Override
                                                        public void onClick(ClickEvent event) {
                                                            ChartViewWindow window = new ChartViewWindow(title);
                                                            D3GroupGraphListView graphView = new D3GroupGraphListView
                                                                    (groupComposite.getResourceGroup(), oob.getDefinitionId(), true);
View Full Code Here

        metricsBaselineForm.setWidth("95%");

        // Baseline
        baselineText.setTitle(BASELINE_MEAN);
        LinkItem baselineLink = AbstractActivityView.newLinkItem(CHANGE_VALUE, null);
        baselineLink.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {
                newBaselineMeanText.show();
                newBaselineMeanText.setSelectOnFocus(true);
                newExpectedRangeHighText.hide();
                newExpectedRangeLowText.hide();

            }
        });
        newBaselineMeanText.setTitle(NEW_BASELINE_MEAN);
        newBaselineMeanText.addBlurHandler(new BlurHandler() {
            @Override
            public void onBlur(BlurEvent blurEvent) {
                hideBaselineEditingFields();
            }
        });
        PickerIcon cancelPicker = new PickerIcon(PickerIcon.CLEAR, new FormItemClickHandler() {
            public void onFormItemClick(FormItemIconClickEvent event) {
                hideBaselineEditingFields();
            }
        });
        newBaselineMeanText.setIcons(cancelPicker);
        newBaselineMeanText.addKeyUpHandler(new KeyUpHandler() {
            @Override
            public void onKeyUp(KeyUpEvent keyUpEvent) {
                if (keyUpEvent.getKeyName().equals("Enter")) {
                    hideBaselineEditingFields();
                    if (null != newBaselineMeanText.getValueAsString()) {
                        double newBaselineMean = Double.parseDouble(newBaselineMeanText.getValueAsString());
                        saveCustomBaselineMean(newBaselineMean);
                    }
                }

            }
        });

        // High Baseline
        expectedRangeHighText.setTitle(BASELINE_HIGH);
        LinkItem baselineHighLink = AbstractActivityView.newLinkItem(CHANGE_VALUE, null);
        baselineHighLink.addClickHandler(new ClickHandler() {

            @Override
            public void onClick(ClickEvent clickEvent) {
                // High cannot be below the low
                newBaselineMeanText.hide();
                newExpectedRangeHighText.show();
                newExpectedRangeHighText.setSelectOnFocus(true);
                newExpectedRangeLowText.hide();

            }
        });
        newExpectedRangeHighText.setTitle(NEW_BASELINE_HIGH);
        newExpectedRangeHighText.addBlurHandler(new BlurHandler() {
            @Override
            public void onBlur(BlurEvent blurEvent) {
                hideBaselineEditingFields();
            }
        });
        newExpectedRangeHighText.setIcons(cancelPicker);
        newExpectedRangeHighText.addKeyUpHandler(new KeyUpHandler() {
            @Override
            public void onKeyUp(KeyUpEvent keyUpEvent) {
                if (keyUpEvent.getKeyName().equals("Enter")) {
                    hideBaselineEditingFields();
                    if (null != newExpectedRangeHighText.getValueAsString()) {
                        double newBaselineHigh = Double.parseDouble(newExpectedRangeHighText.getValueAsString());
                        saveCustomBaselineHigh(newBaselineHigh);
                    }
                }

            }
        });

        // Low Baseline
        expectedRangeLowText.setTitle(BASELINE_LOW);
        LinkItem baselineLowLink = AbstractActivityView.newLinkItem(CHANGE_VALUE, null);
        baselineLowLink.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {
                newBaselineMeanText.hide();
                newExpectedRangeHighText.hide();
                newExpectedRangeLowText.show();
View Full Code Here

                link.setShowTitle(false);
                link.setClipValue(false);
                link.setWrap(true);
                if (!BrowserUtility.isBrowserPreIE9()) {

                    link.addClickHandler(new ClickHandler() {
                        @Override
                        public void onClick(ClickEvent event) {
                            showPopupWithChart(title, md);
                        }
                    });
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.form.fields.events.ClickHandler

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.