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

Examples of com.smartgwt.client.widgets.form.fields.FormItemIcon


    fileNameItem.setName("filename");
    fileNameItem.setTitle(messages.printPrefsFileName());
    fileNameItem.setValue(mapWidget.getMapModel().getMapInfo().getId() + ".pdf");

    // progress indicator
    barIcon = new FormItemIcon();
    barIcon.setHeight(15);
    barIcon.setWidth(214);
    statusText = new StaticTextItem(messages.printPrefsStatus());
    statusText.setIcons(barIcon);
    barIcon.setSrc("[ISOMORPHIC]/geomajas/plugin/printing/pleasewait-blank.gif");
View Full Code Here


    final PickerIcon clearIcon = new PickerIcon(PickerIcon.CLEAR);
    textItem.setIcons(findIcon, clearIcon);

    textItem.addIconClickHandler(new IconClickHandler() {
      public void onIconClick(IconClickEvent iconClickEvent) {
        FormItemIcon icon = iconClickEvent.getIcon();
        if (clearIcon.getSrc().equals(icon.getSrc())) {
          presenter.clearLocation();
        } else {
          presenter.goToLocation((String) textItem.getValue());
        }
      }
View Full Code Here

        super(name, title, handler);
    }

    protected void addHandlers() {

        final FormItemIcon blankIcon = createBlankIcon();
        final FormItemIcon editIcon = createEditIcon();

        // if we are not in edit-mode, we want to show the edit icon, but only if the mouse hovers over us
        this.innerForm.addMouseOutHandler(new MouseOutHandler() {
            public void onMouseOut(MouseOutEvent event) {
                if (!isEditing()) {
View Full Code Here

            }
        });
    }

    protected FormItem prepareStaticFormItem() {
        FormItemIcon blankIcon = createBlankIcon();
        FormItem item = instantiateStaticFormItem();
        item.setShowTitle(false);
        item.setIcons(blankIcon);
        item.setIconVAlign(VerticalAlignment.CENTER);
        item.setIconHeight(16);
View Full Code Here

        return item;
    }

    protected FormItem prepareEditFormItem() {
        FormItemIcon cancelIcon = createCancelIcon();
        FormItemIcon approveIcon = createApproveIcon();
        FormItem item = instantiateEditFormItem();
        item.setShowTitle(false);
        item.setIcons(approveIcon, cancelIcon);
        item.setIconVAlign(VerticalAlignment.CENTER);
        item.setIconHeight(16);
View Full Code Here

        return item;
    }

    protected FormItemIcon createEditIcon() {
        FormItemIcon editIcon = new FormItemIcon();
        editIcon.setSrc(ImageManager.getEditIcon());
        editIcon.setPrompt(MSG.common_button_edit()); // TODO have better message?
        editIcon.addFormItemClickHandler(new FormItemClickHandler() {
            public void onFormItemClick(FormItemIconClickEvent event) {
                // should never get here if read-only (the icon is hidden) but just to be sure, check read-only status again
                if (!isReadOnly()) {
                    switchToEditMode();
                }
View Full Code Here

        });
        return editIcon;
    }

    protected FormItemIcon createApproveIcon() {
        FormItemIcon approveIcon = new FormItemIcon();
        approveIcon.setSrc(ImageManager.getApproveIcon());
        approveIcon.setPrompt(MSG.common_button_ok()); // TODO have better message?
        approveIcon.addFormItemClickHandler(new FormItemClickHandler() {
            public void onFormItemClick(FormItemIconClickEvent event) {
                if (EditableFormItem.this.innerForm.validate(false)) {
                    Object newValue = event.getItem().getValue();
                    setApprovedNewValue(newValue);
                    switchToStaticMode();
View Full Code Here

        });
        return approveIcon;
    }

    protected FormItemIcon createCancelIcon() {
        FormItemIcon cancelIcon = new FormItemIcon();
        cancelIcon.setSrc(ImageManager.getCancelIcon());
        cancelIcon.setPrompt(MSG.common_button_cancel()); // TODO have better message?
        cancelIcon.addFormItemClickHandler(new FormItemClickHandler() {
            public void onFormItemClick(FormItemIconClickEvent event) {
                switchToStaticMode();
            }
        });
        return cancelIcon;
View Full Code Here

        });
        return cancelIcon;
    }

    protected FormItemIcon createBlankIcon() {
        FormItemIcon blankIcon = new FormItemIcon();
        blankIcon.setSrc("blank.png");
        return blankIcon;
    }
View Full Code Here

        return row;
    }

    public static StaticTextItem newTextItemIcon(String imageSrc, String mouseOver) {
        StaticTextItem iconItem = new StaticTextItem();
        FormItemIcon img = new FormItemIcon();
        img.setSrc(imageSrc);
        img.setWidth(16);
        img.setHeight(16);
        if (mouseOver != null) {
            img.setPrompt(mouseOver);
        }
        iconItem.setIcons(img);
        iconItem.setShowTitle(false);
        return iconItem;
    }
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.form.fields.FormItemIcon

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.