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

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


       
    ButtonItem load = new ButtonItem("load","Load");
    load.setStartRow(false);
    load.setEndRow(false);
    load.setWidth("*");
    load.addClickHandler(new ClickHandler(){
      /* (non-Javadoc)
       * @see com.smartgwt.client.widgets.form.fields.events.ClickHandler#onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent)
       */
      public void onClick(ClickEvent event){
        request((String) URL.getValue(), Integer.valueOf((String) depth.getValue()));
      }
    });
       
    ButtonItem centre = new ButtonItem("centre","Centre");
    centre.setStartRow(false);
    centre.setEndRow(false);
    centre.setWidth("*");
    centre.addClickHandler(new ClickHandler(){
      /* (non-Javadoc)
       * @see com.smartgwt.client.widgets.form.fields.events.ClickHandler#onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent)
       */
      public void onClick(ClickEvent event){
        MindMap.get(MindMap.FOCUS_ID).centre();
      }
    });
   
    ButtonItem local = new ButtonItem("local","Local XML");
    local.setStartRow(false);
    local.setEndRow(false);
    local.setAutoFit(false);
    local.setWidth("*");
    local.addClickHandler(new ClickHandler(){
      /* (non-Javadoc)
       * @see com.smartgwt.client.widgets.form.fields.events.ClickHandler#onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent)
       */
      public void onClick(ClickEvent event){
        try{
View Full Code Here


       
    ButtonItem load = new ButtonItem("load","Load");
    load.setStartRow(false);
    load.setEndRow(false);
    load.setWidth("*");
    load.addClickHandler(new ClickHandler(){
      /* (non-Javadoc)
       * @see com.smartgwt.client.widgets.form.fields.events.ClickHandler#onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent)
       */
      public void onClick(ClickEvent event){
        request((String) URL.getValue(), Integer.valueOf((String) DEPTH.getValue()));
      }
    });
       
    ButtonItem centre = new ButtonItem("centre","Centre");
    centre.setStartRow(false);
    centre.setEndRow(false);
    centre.setWidth("*");
    centre.addClickHandler(new ClickHandler(){
      /* (non-Javadoc)
       * @see com.smartgwt.client.widgets.form.fields.events.ClickHandler#onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent)
       */
      public void onClick(ClickEvent event){
        MindMap.get(MindMap.FOCUS_ID).centre();
      }
    });
   
    ButtonItem local = new ButtonItem("local","Local XML");
    local.setStartRow(false);
    local.setEndRow(false);
    local.setAutoFit(false);
    local.setWidth("*");
    local.addClickHandler(new ClickHandler(){
      /* (non-Javadoc)
       * @see com.smartgwt.client.widgets.form.fields.events.ClickHandler#onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent)
       */
      public void onClick(ClickEvent event){
        try{
View Full Code Here

    private LinkItem createViewFileLink(final String hash, final String path, final int version) {
        LinkItem link = new LinkItem(hash + "_fileLink");
        link.setShowTitle(false);
        link.setLinkTitle("(view)");

        link.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {
                GWTServiceLookup.getDriftService().getDriftFileBits(hash, new AsyncCallback<String>() {
                    @Override
                    public void onFailure(Throwable caught) {
View Full Code Here

    private LinkItem createViewDiffLink(final Drift<?, ?> drift, final int oldVersion) {
        LinkItem viewDiffLink = new LinkItem("viewDiff");
        viewDiffLink.setLinkTitle("(view diff)");
        viewDiffLink.setShowTitle(false);

        viewDiffLink.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent clickEvent) {
                GWTServiceLookup.getDriftService().generateUnifiedDiff(drift, new AsyncCallback<FileDiffReport>() {
                    public void onFailure(Throwable caught) {
                        CoreGUI.getErrorHandler().handleError("Failed to generate diff.", caught);
                    }
View Full Code Here

        final StaticTextItem resultsValueItem = new StaticTextItem("resultsValue", "Results Value");
        final StaticTextItem resultsUnitItem = new StaticTextItem("resultsUnits", "Results Units");

        ButtonItem button = new ButtonItem("convertItem", "Convert");
        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                MeasurementUnits units = MeasurementUnits.valueOf(unitsMenu.getValueAsString());
                String value = textItem.getValueAsString();
                MeasurementNumericValueAndUnits vu = MeasurementParser.parse(value, units);
                resultsValueItem.setValue(vu.getValue().toString());
View Full Code Here

        uploadButton = new ButtonItem(MSG.view_upload_upload());
        uploadButton.setIcon(ImageManager.getUploadIcon());
        uploadButton.setStartRow(false);

        uploadButton.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {
                String selectedFile = textFile.getValueAsString();
                if (selectedFile != null && selectedFile.length() > 0) {
                    uploadButton.setShowIcons(true);
View Full Code Here

            errorLinkItem.setVAlign(VerticalAlignment.BOTTOM);
            errorLinkItem.setErrorOrientation(FormErrorOrientation.LEFT);
            errorLinkItem.setTitle(MSG.common_severity_error());
            errorLinkItem.setValue("<span style=\"text-decoration:underline;\">"
                + getShortErrorMessage(operationHistory) + "<span>");
            errorLinkItem.addClickHandler(new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    final Window winModal = new Window();
                    winModal.setTitle(MSG.common_title_details());
                    winModal.setOverflow(Overflow.VISIBLE);
View Full Code Here

            uploadButton = new ButtonItem(MSG.view_upload_upload());
            uploadButton.setColSpan(1);
            uploadButton.setStartRow(false);
            uploadButton.setAutoFit(true);
            uploadButton.setIcon(ImageManager.getUploadIcon());
            uploadButton.addClickHandler(new ClickHandler() {
                public void onClick(ClickEvent clickEvent) {
                    submitForm();
                }
            });
View Full Code Here

        final TextItem detailsMessageItem = new TextItem("detailsMessage", "Details or Root Cause Message");
        detailsMessageItem.setWidth(200);
        detailsMessageItem.setValue("The details or the inner-most exception message.");

        ButtonItem button = new ButtonItem("showMessage", "Show Message");
        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                EnumSet<Option> options = EnumSet.noneOf(Option.class);
                String[] optionsArray = optionMenu.getValues();
                if (optionsArray != null && optionsArray.length > 0) {
                    for (String optString : optionsArray) {
View Full Code Here

        advancedStartItem.setValidators(timeValidator);

        setButton = new ButtonItem(SET_ITEM, MSG.common_button_set());
        setButton.setStartRow(false);
        setButton.setEndRow(false);
        setButton.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                MetricRangePreferences prefs = new MetricRangePreferences();
                prefs.explicitBeginEnd = advanced;
                if (advanced) {
                    try {
                        if (validate()) {
                            prefs.begin = advancedStartItem.getValueAsDate().getTime();
                            prefs.end = advancedEndItem.getValueAsDate().getTime();
                            if (null != prefs.begin && null != prefs.end && prefs.begin > prefs.end) {
                                CoreGUI.getMessageCenter().notify(new Message(MSG.view_measureTable_startBeforeEnd()));
                            } else {
                                setMetricRangeProperties(prefs);
                            }
                        }
                    } catch (Exception ex) {
                        // some of the digits are not filled correctly
                        Map<String, String> errors = new HashMap<String, String>();
                        errors.put(ADVANCED_END_ITEM, "MM/DD/YYYY HH:MM");
                        errors.put(ADVANCED_START_ITEM, "MM/DD/YYYY HH:MM");
                        setErrors(errors, true);
                    }
                } else {
                    prefs.lastN = Integer.valueOf(simpleLastValuesItem.getValueAsString());
                    prefs.unit = Integer.valueOf(simpleLastUnitsItem.getValueAsString());
                    setMetricRangeProperties(prefs);
                }
            }

        });

        advancedSimpleButton = new ButtonItem(ADVANCED_BUTTON_ITEM, MSG.common_button_advanced());
        advancedSimpleButton.setStartRow(false);
        advancedSimpleButton.setEndRow(false);
        advancedSimpleButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent clickEvent) {
                advanced = !advanced;
                update();
            }
        });
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.