/** * If set to true, if the {@link com.smartgwt.client.widgets.StatefulCanvas#getTitle title} of this button contains the * specified {@link com.smartgwt.client.widgets.Canvas#getAccessKey accessKey}, when the title is displayed to the user it * will be modified to include HTML to underline the accessKey.<br> Note that this property may cause titles that include * HTML (rather than simple strings) to be inappropriately modified, so should be disabled if your title string includes * HTML characters. * * @param hiliteAccessKey hiliteAccessKey Default value is null */ public void setHiliteAccessKey(Boolean hiliteAccessKey) { setAttribute("hiliteAccessKey", hiliteAccessKey, true); }
/** * 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); }
/** * Whether this component is selected. For some components, selection affects appearance. * Select this object. * * @param selected selected Default value is false * @see com.smartgwt.client.docs.State State overview and related methods */ public void setSelected(Boolean selected) { setAttribute("selected", selected, true); }
/** * Should we visibly change state when disabled? * * @param showDisabled showDisabled Default value is true * @see com.smartgwt.client.docs.State State overview and related methods */ public void setShowDisabled(Boolean showDisabled) { setAttribute("showDisabled", showDisabled, true); }
/** * 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); }
/** * If using an icon for this button, whether to switch the icon image on mouse rollover. * * @param showRollOverIcon showRollOverIcon 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 setShowRollOverIcon(Boolean showRollOverIcon) throws IllegalStateException { setAttribute("showRollOverIcon", showRollOverIcon, false); }
/** * The text title to display in this button. * Set the title. * * @param title new title. Default value is varies * @see com.smartgwt.client.docs.Basics Basics overview and related methods */ public void setTitle(String title) { setAttribute("title", title, true); }
/** * 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); }
/** * Horizontal padding to be applied to this widget's label. If this value is null, the label will be given a horizontal * padding of zero. <p> The specified amount of padding is applied to the left and right edges of the button, so the total * amount of padding is 2x the specified value. * * @param labelHPad labelHPad Default value is null */ public void setLabelHPad(Integer labelHPad) { setAttribute("labelHPad", labelHPad, true); }
/** * If this button is showing an icon should it be right or left aligned? * * @param iconAlign iconAlign 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 setIconAlign(String iconAlign) throws IllegalStateException { setAttribute("iconAlign", iconAlign, false); }
/** * 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>. * Changes the orientation of the icon relative to the text of the button. * * @param iconOrientation The new orientation of the icon relative to the text of the button.. Default value is "left" * @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 setIconOrientation(String iconOrientation) throws IllegalStateException { setAttribute("iconOrientation", iconOrientation, false); }
/** * Vertical padding to be applied to this widget's label. If this value is null, the label will be given a vertial padding * of zero. <p> The specified amount of padding is applied to the top and bottom edges of the button, so the total amount * of padding is 2x the specified value. * * @param labelVPad labelVPad Default value is null */ public void setLabelVPad(Integer labelVPad) { setAttribute("labelVPad", labelVPad, true); }
/** * String identifier for this canvas's mutually exclusive selection group. * <p><b>Note : </b> This is an advanced setting</p> * * @param radioGroup radioGroup Default value is null * @see com.smartgwt.client.docs.State State overview and related methods * @see <a href="http://www.smartclient.com/smartgwt/showcase/#buttons_category_toggle" target="examples">Radio / Toggle Behavior Example</a> */ public void setRadioGroup(String radioGroup) { setAttribute("radioGroup", radioGroup, true); }
/** * Should we visibly change state when the mouse goes down in this object? * * @param showDown showDown Default value is false * @see com.smartgwt.client.docs.State State overview and related methods */ public void setShowDown(Boolean showDown) { setAttribute("showDown", showDown, true); }
/** * 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 * * @param showFocusedIcon showFocusedIcon 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 setShowFocusedIcon(Boolean showFocusedIcon) throws IllegalStateException { setAttribute("showFocusedIcon", showFocusedIcon, false); }
/** * 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); }
/** * The base filename for the image. <P> If <code>img.state</code> is set, it's value will be appended to the URL before the * file extension. <P> For example, given an <code>src</code> of "findIcon.gif" and a state of "Disabled", the resulting * image name would be "findIcon_Disabled.gif". Compound states such as "Selected", "Focused" and "Over" or "Down" will * have an intervening underscore, resulting in, for example, <code>"findIcon_Selected_Down.gif"</code>. * * @param src src Default value is "[SKIN]/ImgButton/button.png" * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods * @see <a href="http://www.smartclient.com/smartgwt/showcase/#grid_appearance_category" target="examples">Appearance Example</a> */ public void setSrc(String src) { setAttribute("src", src, true); }
/** * 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. * * @param iconSize iconSize Default value is 16 * @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 setIconSize(int iconSize) throws IllegalStateException { setAttribute("iconSize", iconSize, false); }
/** * Behavior on state changes -- BUTTON, RADIO or CHECKBOX * Update the 'actionType' for this canvas (radio / checkbox / button) If the canvas is currently selected, and the passed in actionType is 'button' this method will deselect the canvas. * * @param actionType actionType Default value is "button" * @see com.smartgwt.client.docs.State State overview and related methods * @see <a href="http://www.smartclient.com/smartgwt/showcase/#buttons_category_toggle" target="examples">Radio / Toggle Behavior Example</a> */ public void setActionType(SelectionType actionType) { setAttribute("actionType", actionType.getValue(), true); }
/** * Vertical alignment of this component's title. * * @param valign valign Default value is Canvas.CENTER * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public void setValign(VerticalAlignment valign) { setAttribute("valign", valign.getValue(), true); }