/** * Should we visibly change state when the mouse goes down in this object? * * * @return Boolean * @see com.smartgwt.client.docs.State State overview and related methods */ public Boolean getShowDown() { return getAttributeAsBoolean("showDown"); }
/** * Pixels between icon and title text. * * * @return int * @see com.smartgwt.client.docs.ButtonIcon ButtonIcon overview and related methods */ public int getIconSpacing() { return getAttributeAsInt("iconSpacing"); }
/** * Optional icon to be shown with the button title text. <P> Specify as the partial URL to an image, relative to the * imgDir of this component. * * * @return String * @see com.smartgwt.client.docs.ButtonIcon ButtonIcon overview and related methods */ public String getIcon() { return getAttributeAsString("icon"); }
/** * If using an icon for this button, whether to switch the icon image if the button becomes disabled. * * @param showDisabledIcon showDisabledIcon Default value is true * @throws IllegalStateException this property cannot be changed after the component has been created * @see com.smartgwt.client.docs.ButtonIcon ButtonIcon overview and related methods */ public void setShowDisabledIcon(Boolean showDisabledIcon) throws IllegalStateException { setAttribute("showDisabledIcon", showDisabledIcon, false); }
/** * Add a iconClick handler. * <p> * If this button is showing an {@link com.smartgwt.client.widgets.StretchImgButton#getIcon icon}, a separate click handler * for the icon may be defined as <code>this.iconClick</code>. Returning false will suppress the standard button click * handling code. * * @param handler the iconClick handler * @return {@link HandlerRegistration} used to remove this handler */ public HandlerRegistration addIconClickHandler(com.smartgwt.client.widgets.events.IconClickHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.events.IconClickEvent.getType()) == 0) setupIconClickEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.events.IconClickEvent.getType()); }
/** * Behavior on state changes -- BUTTON, RADIO or CHECKBOX * * * @return Return the 'actionType' for this canvas (radio / checkbox / button) * @see com.smartgwt.client.docs.State State overview and related methods */ public SelectionType getActionType() { return EnumUtil.getEnum(SelectionType.values(), getAttribute("actionType")); }
public static StretchImgButton getOrCreateRef(JavaScriptObject jsObj) { if(jsObj == null) return null; BaseWidget obj = BaseWidget.getRef(jsObj); if(obj != null) { return (StretchImgButton) obj; } else { return new StretchImgButton(jsObj); } }
/** * If using an icon for this button, whether to switch the icon image when the button becomes selected. * * @param showSelectedIcon showSelectedIcon Default value is false * @throws IllegalStateException this property cannot be changed after the component has been created * @see com.smartgwt.client.docs.ButtonIcon ButtonIcon overview and related methods */ public void setShowSelectedIcon(Boolean showSelectedIcon) throws IllegalStateException { setAttribute("showSelectedIcon", showSelectedIcon, false); }
/** * Horizontal alignment of this component's title. * * * @return Alignment * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public Alignment getAlign() { return EnumUtil.getEnum(Alignment.values(), getAttribute("align")); }
/** * Optional icon to be shown with the button title text. <P> Specify as the partial URL to an image, relative to the * imgDir of this component. * Change the icon being shown next to the title text. * * @param icon URL of new icon. Default value is null * @see com.smartgwt.client.docs.ButtonIcon ButtonIcon overview and related methods */ public void setIcon(String icon) { setAttribute("icon", icon, true); }
/** * If using an icon for this button, whether to switch the icon image if the button becomes disabled. * * * @return Boolean * @see com.smartgwt.client.docs.ButtonIcon ButtonIcon overview and related methods */ public Boolean getShowDisabledIcon() { return getAttributeAsBoolean("showDisabledIcon"); }
/** * Specifies a skinImgDir to apply to the label containing the title of this StretchImgButton. May be null in which case * <code>this.skinImgDir</code> will be applied to the label as well. <P> Note that icons displayed in the title may make * use of the skin img dir set here * * * @return String */ public String getLabelSkinImgDir() { return getAttributeAsString("labelSkinImgDir"); }
/** * How big are the end pieces by default * * * @return int * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public int getCapSize() { return getAttributeAsInt("capSize"); }
/** * Vertical alignment of this component's title. * * * @return VerticalAlignment * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public VerticalAlignment getValign() { return EnumUtil.getEnum(VerticalAlignment.values(), getAttribute("valign")); }
/** * Width in pixels of the icon image. <P> If unset, defaults to <code>iconSize</code> * * @param iconWidth iconWidth Default value is null * @throws IllegalStateException this property cannot be changed after the component has been created * @see com.smartgwt.client.docs.ButtonIcon ButtonIcon overview and related methods */ public void setIconWidth(Integer iconWidth) throws IllegalStateException { setAttribute("iconWidth", iconWidth, false); }
/** * If using an icon for this button, whether to switch the icon image when the button receives focus. <P> If {@link * com.smartgwt.client.widgets.StatefulCanvas#getShowFocusedAsOver showFocusedAsOver} is true, the <code>"Over"</code> icon * will be displayed when the canvas has focus, otherwise a separate <code>"Focused"</code> icon will be displayed * * * @return Boolean * @see com.smartgwt.client.docs.ButtonIcon ButtonIcon overview and related methods */ public Boolean getShowFocusedIcon() { return getAttributeAsBoolean("showFocusedIcon"); }
/** * If this button is showing an icon should it appear to the left or right of the title? valid options are * <code>"left"</code> and <code>"right"</code>. * * * @return String * @see com.smartgwt.client.docs.ButtonIcon ButtonIcon overview and related methods */ public String getIconOrientation() { return getAttributeAsString("iconOrientation"); }
/** * Size in pixels of the icon image. <P> The <code>iconWidth</code> and <code>iconHeight</code> properties can be used to * configure width and height separately. * * * @return int * @see com.smartgwt.client.docs.ButtonIcon ButtonIcon overview and related methods */ public int getIconSize() { return getAttributeAsInt("iconSize"); }
/** * Current "state" of this widget. StatefulCanvases will have a different appearance based on their current state. By * default this is handled by changing the css className applied to the StatefulCanvas - see {@link * com.smartgwt.client.widgets.StatefulCanvas#getBaseStyle baseStyle} for a description of how this is done.<P> For {@link * com.smartgwt.client.widgets.Img} or {@link com.smartgwt.client.widgets.StretchImg} based subclasses of StatefulCanvas, * the appearance may also be updated by changing the src of the rendered image. See {@link * com.smartgwt.client.widgets.Img#getSrc src} and {@link com.smartgwt.client.widgets.StretchImgButton#getSrc src} for a * description of how the URL is modified to reflect the state of the widget in this case. * * * @return Return the state of this StatefulCanvas * @see com.smartgwt.client.types.State * @see com.smartgwt.client.docs.State State overview and related methods */ public State getState() { return EnumUtil.getEnum(State.values(), getAttribute("state")); }
/** * Specifies a skinImgDir to apply to the label containing the title of this StretchImgButton. May be null in which case * <code>this.skinImgDir</code> will be applied to the label as well. <P> Note that icons displayed in the title may make * use of the skin img dir set here * setter for {@link com.smartgwt.client.widgets.StretchImgButton#getLabelSkinImgDir labelSkinImgDir}. * <p><b>Note : </b> This is an advanced setting</p> * * @param labelSkinImgDir new skin img dir to apply to the label holding title text for this widget.. Default value is null */ public void setLabelSkinImgDir(String labelSkinImgDir) { setAttribute("labelSkinImgDir", labelSkinImgDir, true); }