Class FormItemIcon
- All Implemented Interfaces:
HasHandlers
,HasFormItemClickHandlers
- Direct Known Subclasses:
PickerIcon
-
Field Summary
Fields inherited from class com.smartgwt.client.core.DataClass
factoryCreated, factoryProperties
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdd a formItemClick handler.boolean
Base CSS style.Set to false to suppress all focus features for this icon.Specifies the cursor image to display when the mouse pointer is over this icon.Whether this icon is disabled.Specifies the cursor image to display when the mouse pointer is over this icon if this icon is disabled.IfFormItem.canEdit
is set to false, should this icon be disabled.Criteria to be evaluated to determine whether this icon should appear enabled.If set, this property determines the height of this icon in px.If set, this property determines the number of pixels space to be displayed on the left of this form item icon, or forinline
icons whoseinlineIconAlign
isAlignment.LEFT
, on the right of this form item icon.For PickList items withPickListItemIconPlacement
set such that the pickList does not render near-origin, should this icon be rendered inline within the formItem itself, or within theComboBoxItem.pickerNavigationBar
.When set, this icon is rendered inside thetextBox
area of theFormItem
(where input occurs in aTextItem
,TextAreaItem
orComboBoxItem
) as opposed to as a trailing icon.Horizontal alignment for icons markedinline
.getName()
Identifier for this form item icon.Ificon.neverDisable
is true, when this form item is disabled, the icon will remain enabled.static FormItemIcon
getOrCreateRef
(JavaScriptObject jsObj) If set, this property will be displayed as a prompt (and tooltip text) for this form item icon.If show-on-focus behavior is enabled for this icon viashowOnFocus
or related properties at the item level, and this icon is marked as disabled, should it be shown on focus? If unset, will be derived from theFormItem.showDisabledIconsOnFocus
orFormItem.showDisabledPickerIconOnFocus
settings.Whether this icon's image and/orbaseStyle
should change to an appropriate Error state when the item has validation errors.Should this icon's image and/orbaseStyle
switch to the appropriate "Focused" value when the user puts focus on the form item or icon?If this icon will be updated to show focus (seeshowFocused
,FormItem.showFocusedIcons
), this property governs whether the focused state should be shown when the item as a whole receives focus or just if the icon receives focus.Show this icon when its item gets focus, and hide it when it loses focus.Should this icon's image and/orbaseStyle
switch to the appropriate "Over" value when the user rolls over or focuses on the icon?IfshowOver
orFormItem.showOverIcons
is true, this property may be set to customize when the 'over' styling is applied to the item.getSrc()
If set, this property determines this icon's image source.If set, this property determines this icon's image source.TabIndex for this formItemIcon.getText()
As an alternative to displaying an image, aninline
FormItemIcon
can display a string of HTML where the icon's image would have appeared.Criteria to be evaluated to determine whether this icon should be visible.getWidth()
If set, this property determines the width of this icon in px.int
hashCode()
void
keyPress
(String keyName, char character, DynamicForm form, FormItem item, FormItemIcon icon) StringMethod action to fire when this icon has focus and receives a keypress event.setBaseStyle
(String baseStyle) Base CSS style.setCanFocus
(Boolean canFocus) Set to false to suppress all focus features for this icon.Specifies the cursor image to display when the mouse pointer is over this icon.setDisabled
(Boolean disabled) Whether this icon is disabled.setDisabledCursor
(Cursor disabledCursor) Specifies the cursor image to display when the mouse pointer is over this icon if this icon is disabled.setDisableOnReadOnly
(Boolean disableOnReadOnly) IfFormItem.canEdit
is set to false, should this icon be disabled.setEnableWhen
(AdvancedCriteria enableWhen) Criteria to be evaluated to determine whether this icon should appear enabled.If set, this property determines the height of this icon in px.If set, this property determines the number of pixels space to be displayed on the left of this form item icon, or forinline
icons whoseinlineIconAlign
isAlignment.LEFT
, on the right of this form item icon.setIconPlacement
(PickListItemIconPlacement iconPlacement) For PickList items withPickListItemIconPlacement
set such that the pickList does not render near-origin, should this icon be rendered inline within the formItem itself, or within theComboBoxItem.pickerNavigationBar
.When set, this icon is rendered inside thetextBox
area of theFormItem
(where input occurs in aTextItem
,TextAreaItem
orComboBoxItem
) as opposed to as a trailing icon.setInlineIconAlign
(Alignment inlineIconAlign) Horizontal alignment for icons markedinline
.Identifier for this form item icon.setNeverDisable
(Boolean neverDisable) Ificon.neverDisable
is true, when this form item is disabled, the icon will remain enabled.If set, this property will be displayed as a prompt (and tooltip text) for this form item icon.setShowDisabledOnFocus
(Boolean showDisabledOnFocus) If show-on-focus behavior is enabled for this icon viashowOnFocus
or related properties at the item level, and this icon is marked as disabled, should it be shown on focus? If unset, will be derived from theFormItem.showDisabledIconsOnFocus
orFormItem.showDisabledPickerIconOnFocus
settings.setShowError
(Boolean showError) Whether this icon's image and/orbaseStyle
should change to an appropriate Error state when the item has validation errors.setShowFocused
(Boolean showFocused) Should this icon's image and/orbaseStyle
switch to the appropriate "Focused" value when the user puts focus on the form item or icon?setShowFocusedWithItem
(Boolean showFocusedWithItem) If this icon will be updated to show focus (seeshowFocused
,FormItem.showFocusedIcons
), this property governs whether the focused state should be shown when the item as a whole receives focus or just if the icon receives focus.void
setShowIfCondition
(FormItemIfFunction showIf) Set showIf condition.setShowOnFocus
(Boolean showOnFocus) Show this icon when its item gets focus, and hide it when it loses focus.setShowOver
(Boolean showOver) Should this icon's image and/orbaseStyle
switch to the appropriate "Over" value when the user rolls over or focuses on the icon?setShowOverWhen
(IconOverTrigger showOverWhen) IfshowOver
orFormItem.showOverIcons
is true, this property may be set to customize when the 'over' styling is applied to the item.setShowRTL
(Boolean showRTL) If set, this property determines this icon's image source.If set, this property determines this icon's image source.setTabIndex
(Integer tabIndex) TabIndex for this formItemIcon.As an alternative to displaying an image, aninline
FormItemIcon
can display a string of HTML where the icon's image would have appeared.setVisibleWhen
(AdvancedCriteria visibleWhen) Criteria to be evaluated to determine whether this icon should be visible.If set, this property determines the width of this icon in px.Methods inherited from class com.smartgwt.client.core.DataClass
applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated
Methods inherited from class com.smartgwt.client.core.JsObject
getJsObj, isCreated, setJavaScriptObject, setJsObj
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
-
Constructor Details
-
FormItemIcon
public FormItemIcon() -
FormItemIcon
-
-
Method Details
-
getOrCreateRef
-
setBaseStyle
Base CSS style. If set, as the component changes state and/or is focused, suffixes will be added to the base style. Possible suffixes include "Over" if the user mouses over the icon andthis.showOver
is true, "Disabled" if the icon is disabled, and "Focused". In addition, ifshowRTL
is enabled, then an "RTL" suffix will be added.Note : This is an advanced setting
- Parameters:
baseStyle
- New baseStyle value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls- See Also:
-
getBaseStyle
Base CSS style. If set, as the component changes state and/or is focused, suffixes will be added to the base style. Possible suffixes include "Over" if the user mouses over the icon andthis.showOver
is true, "Disabled" if the icon is disabled, and "Focused". In addition, ifshowRTL
is enabled, then an "RTL" suffix will be added.- Returns:
- Current baseStyle value. Default value is null
- See Also:
-
setCanFocus
Set to false to suppress all focus features for this icon. Clicking the icon will not apply focus to the icon or to the form item.Note : This is an advanced setting
- Parameters:
canFocus
- New canFocus value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls
-
getCanFocus
Set to false to suppress all focus features for this icon. Clicking the icon will not apply focus to the icon or to the form item.- Returns:
- Current canFocus value. Default value is null
-
setCursor
Specifies the cursor image to display when the mouse pointer is over this icon. It corresponds to the CSS cursor attribute. See Cursor type for different cursors.See also
disabledCursor
.Note : This is an advanced setting
- Parameters:
cursor
- New cursor value. Default value is Canvas.POINTER- Returns:
FormItemIcon
instance, for chaining setter calls- See Also:
-
getCursor
Specifies the cursor image to display when the mouse pointer is over this icon. It corresponds to the CSS cursor attribute. See Cursor type for different cursors.See also
disabledCursor
.- Returns:
- Current cursor value. Default value is Canvas.POINTER
- See Also:
-
setDisabled
Whether this icon is disabled. Can be updated at runtime via theFormItem.setIconDisabled()
method. Note that if the formItem containing this icon is disabled, the icon will behave in a disabled manner regardless of the setting of the icon.disabled property.- Parameters:
disabled
- New disabled value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls- See Also:
-
getDisabled
Whether this icon is disabled. Can be updated at runtime via theFormItem.setIconDisabled()
method. Note that if the formItem containing this icon is disabled, the icon will behave in a disabled manner regardless of the setting of the icon.disabled property.- Returns:
- Current disabled value. Default value is null
- See Also:
-
setDisabledCursor
Specifies the cursor image to display when the mouse pointer is over this icon if this icon is disabled. It corresponds to the CSS cursor attribute. See Cursor type for different cursors.Note : This is an advanced setting
- Parameters:
disabledCursor
- New disabledCursor value. Default value is Canvas.DEFAULT- Returns:
FormItemIcon
instance, for chaining setter calls- See Also:
-
getDisabledCursor
Specifies the cursor image to display when the mouse pointer is over this icon if this icon is disabled. It corresponds to the CSS cursor attribute. See Cursor type for different cursors.- Returns:
- Current disabledCursor value. Default value is Canvas.DEFAULT
- See Also:
-
setDisableOnReadOnly
IfFormItem.canEdit
is set to false, should this icon be disabled. If unset this is determined byFormItem.disableIconsOnReadOnly
. Note that ifneverDisable
is set to true, the icons will be rendered enabled regardless of this setting and whether the item is editable.Note : This is an advanced setting
- Parameters:
disableOnReadOnly
- New disableOnReadOnly value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls
-
getDisableOnReadOnly
IfFormItem.canEdit
is set to false, should this icon be disabled. If unset this is determined byFormItem.disableIconsOnReadOnly
. Note that ifneverDisable
is set to true, the icons will be rendered enabled regardless of this setting and whether the item is editable.- Returns:
- Current disableOnReadOnly value. Default value is null
-
setEnableWhen
Criteria to be evaluated to determine whether this icon should appear enabled.Criteria are evaluated against the
form's current values
as well as the currentrule context
. Criteria are re-evaluated every time form values or the rule context changes, whether by end user action or by programmatic calls.A basic criteria uses textMatchStyle:"exact". When specified in
Component XML
this property allowsshorthand formats
for defining criteria.Note: A FormItemIcon using enableWhen must have a
name
defined on its FormItem.- Parameters:
enableWhen
- New enableWhen value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls- See Also:
-
getEnableWhen
Criteria to be evaluated to determine whether this icon should appear enabled.Criteria are evaluated against the
form's current values
as well as the currentrule context
. Criteria are re-evaluated every time form values or the rule context changes, whether by end user action or by programmatic calls.A basic criteria uses textMatchStyle:"exact". When specified in
Component XML
this property allowsshorthand formats
for defining criteria.Note: A FormItemIcon using enableWhen must have a
name
defined on its FormItem.- Returns:
- Current enableWhen value. Default value is null
- See Also:
-
setHeight
If set, this property determines the height of this icon in px. If unset the form item'siconHeight
property will be used instead.- Parameters:
height
- New height value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls- See Also:
-
getHeight
If set, this property determines the height of this icon in px. If unset the form item'siconHeight
property will be used instead.- Returns:
- Current height value. Default value is null
- See Also:
-
setHspace
If set, this property determines the number of pixels space to be displayed on the left of this form item icon, or forinline
icons whoseinlineIconAlign
isAlignment.LEFT
, on the right of this form item icon. Must be non-negative. If unset, the form item'siconHSpace
will be used instead.- Parameters:
hspace
- New hspace value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls
-
getHspace
If set, this property determines the number of pixels space to be displayed on the left of this form item icon, or forinline
icons whoseinlineIconAlign
isAlignment.LEFT
, on the right of this form item icon. Must be non-negative. If unset, the form item'siconHSpace
will be used instead.- Returns:
- Current hspace value. Default value is null
-
setIconPlacement
For PickList items withPickListItemIconPlacement
set such that the pickList does not render near-origin, should this icon be rendered inline within the formItem itself, or within theComboBoxItem.pickerNavigationBar
.If not explicitly specified at the icon level, this will be picked up from PickList.iconPlacement.
For mobile browsing with limited available screen space, icons rendered in the navigation bar may be easier for the user to interact with.
- Parameters:
iconPlacement
- New iconPlacement value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls
-
getIconPlacement
For PickList items withPickListItemIconPlacement
set such that the pickList does not render near-origin, should this icon be rendered inline within the formItem itself, or within theComboBoxItem.pickerNavigationBar
.If not explicitly specified at the icon level, this will be picked up from PickList.iconPlacement.
For mobile browsing with limited available screen space, icons rendered in the navigation bar may be easier for the user to interact with.
- Returns:
- Current iconPlacement value. Default value is null
-
setInline
When set, this icon is rendered inside thetextBox
area of theFormItem
(where input occurs in aTextItem
,TextAreaItem
orComboBoxItem
) as opposed to as a trailing icon.Use
inlineIconAlign
to control alignment of the icon. Multiple icons can be inlined on both the left and right side of thetextBox
area.hspace
is honored for spacing between multiple adjacent icons.Inline icons are not supported in Internet Explorer 6, or when the
FormItem
is not aTextItem
,TextAreaItem
orComboBoxItem
. When unsupported, the icon will fall back to non-inline mode.The
picker icon
, if any, cannot be inlined.As an alternative to displaying an image, an inline icon may display a string of HTML instead. See
text
.- Parameters:
inline
- New inline value. Default value is false- Returns:
FormItemIcon
instance, for chaining setter calls
-
getInline
When set, this icon is rendered inside thetextBox
area of theFormItem
(where input occurs in aTextItem
,TextAreaItem
orComboBoxItem
) as opposed to as a trailing icon.Use
inlineIconAlign
to control alignment of the icon. Multiple icons can be inlined on both the left and right side of thetextBox
area.hspace
is honored for spacing between multiple adjacent icons.Inline icons are not supported in Internet Explorer 6, or when the
FormItem
is not aTextItem
,TextAreaItem
orComboBoxItem
. When unsupported, the icon will fall back to non-inline mode.The
picker icon
, if any, cannot be inlined.As an alternative to displaying an image, an inline icon may display a string of HTML instead. See
text
.- Returns:
- Current inline value. Default value is false
-
setInlineIconAlign
Horizontal alignment for icons markedinline
.By default, the first icon that specifies inline is aligned left, and the second and all subsequent icons to the right.
"center"
alignment is invalid and will be ignored.In RTL mode, the alignment is automatically mirrored;
inlineIconAlign:"left"
results in the icon being placed on the right andinlineIconAlign:"right"
results in the icon being placed on the left.- Parameters:
inlineIconAlign
- New inlineIconAlign value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls
-
getInlineIconAlign
Horizontal alignment for icons markedinline
.By default, the first icon that specifies inline is aligned left, and the second and all subsequent icons to the right.
"center"
alignment is invalid and will be ignored.In RTL mode, the alignment is automatically mirrored;
inlineIconAlign:"left"
results in the icon being placed on the right andinlineIconAlign:"right"
results in the icon being placed on the left.- Returns:
- Current inlineIconAlign value. Default value is null
-
setName
Identifier for this form item icon. This identifier (if set) should be unique within this form item and may be used to get a pointer to the icon object viaFormItem.getIcon()
.- Parameters:
name
- New name value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls- See Also:
-
getName
Identifier for this form item icon. This identifier (if set) should be unique within this form item and may be used to get a pointer to the icon object viaFormItem.getIcon()
.- Returns:
- Current name value. Default value is null
- See Also:
-
setNeverDisable
Ificon.neverDisable
is true, when this form item is disabled, the icon will remain enabled. Note that disabling the entire form will disable all items, together with their icons including those marked as neverDisable - this property only has an effect if the form is enabled and a specific item is disabled within it.If this property is true, the icons will also remain enabled if a form item is marked as
canEdit:false
. For finer grained control over whether icons are enabled for read-only icons seeFormItem.disableIconsOnReadOnly
anddisableOnReadOnly
Note : This is an advanced setting
- Parameters:
neverDisable
- New neverDisable value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls
-
getNeverDisable
Ificon.neverDisable
is true, when this form item is disabled, the icon will remain enabled. Note that disabling the entire form will disable all items, together with their icons including those marked as neverDisable - this property only has an effect if the form is enabled and a specific item is disabled within it.If this property is true, the icons will also remain enabled if a form item is marked as
canEdit:false
. For finer grained control over whether icons are enabled for read-only icons seeFormItem.disableIconsOnReadOnly
anddisableOnReadOnly
- Returns:
- Current neverDisable value. Default value is null
-
setPrompt
If set, this property will be displayed as a prompt (and tooltip text) for this form item icon.If unset the form item's
iconPrompt
property will be used instead.Has no effect when
FormItem.canHover
is set to false.Note : This is an advanced setting
- Parameters:
prompt
- New prompt value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls- See Also:
-
getPrompt
If set, this property will be displayed as a prompt (and tooltip text) for this form item icon.If unset the form item's
iconPrompt
property will be used instead.Has no effect when
FormItem.canHover
is set to false.- Returns:
- Current prompt value. Default value is null
- See Also:
-
setShowDisabledOnFocus
If show-on-focus behavior is enabled for this icon viashowOnFocus
or related properties at the item level, and this icon is marked as disabled, should it be shown on focus? If unset, will be derived from theFormItem.showDisabledIconsOnFocus
orFormItem.showDisabledPickerIconOnFocus
settings.Note : This is an advanced setting
- Parameters:
showDisabledOnFocus
- New showDisabledOnFocus value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls
-
getShowDisabledOnFocus
If show-on-focus behavior is enabled for this icon viashowOnFocus
or related properties at the item level, and this icon is marked as disabled, should it be shown on focus? If unset, will be derived from theFormItem.showDisabledIconsOnFocus
orFormItem.showDisabledPickerIconOnFocus
settings.- Returns:
- Current showDisabledOnFocus value. Default value is null
-
setShowError
Whether this icon's image and/orbaseStyle
should change to an appropriate Error state when the item has validation errors.When set to true and the item has errors, appends Error to the image src and/or
baseStyle
. If other physical states apply, such as Over, that state is also appended, reulting in a suffix of, for example, ErrorOver.Note : This is an advanced setting
- Parameters:
showError
- New showError value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls- See Also:
-
getShowError
Whether this icon's image and/orbaseStyle
should change to an appropriate Error state when the item has validation errors.When set to true and the item has errors, appends Error to the image src and/or
baseStyle
. If other physical states apply, such as Over, that state is also appended, reulting in a suffix of, for example, ErrorOver.- Returns:
- Current showError value. Default value is null
- See Also:
-
setShowFocused
Should this icon's image and/orbaseStyle
switch to the appropriate "Focused" value when the user puts focus on the form item or icon?Note : This is an advanced setting
- Parameters:
showFocused
- New showFocused value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls- See Also:
-
getShowFocused
Should this icon's image and/orbaseStyle
switch to the appropriate "Focused" value when the user puts focus on the form item or icon?- Returns:
- Current showFocused value. Default value is null
- See Also:
-
setShowFocusedWithItem
If this icon will be updated to show focus (seeshowFocused
,FormItem.showFocusedIcons
), this property governs whether the focused state should be shown when the item as a whole receives focus or just if the icon receives focus. If this property is unset, default behavior is to show focused state when the item receives focus.Note : This is an advanced setting
- Parameters:
showFocusedWithItem
- New showFocusedWithItem value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls- See Also:
-
getShowFocusedWithItem
If this icon will be updated to show focus (seeshowFocused
,FormItem.showFocusedIcons
), this property governs whether the focused state should be shown when the item as a whole receives focus or just if the icon receives focus. If this property is unset, default behavior is to show focused state when the item receives focus.- Returns:
- Current showFocusedWithItem value. Default value is null
- See Also:
-
setShowOnFocus
Show this icon when its item gets focus, and hide it when it loses focus. If non-null, overrides the default behavior specified byFormItem.showIconsOnFocus
orFormItem.showPickerIconOnFocus
, as appropriate. This feature allows space to be saved in the form for items not being interacted with, and helps draw attention to the item currently in focus.Note : This is an advanced setting
- Parameters:
showOnFocus
- New showOnFocus value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls- See Also:
-
getShowOnFocus
Show this icon when its item gets focus, and hide it when it loses focus. If non-null, overrides the default behavior specified byFormItem.showIconsOnFocus
orFormItem.showPickerIconOnFocus
, as appropriate. This feature allows space to be saved in the form for items not being interacted with, and helps draw attention to the item currently in focus.- Returns:
- Current showOnFocus value. Default value is null
- See Also:
-
setShowOver
Should this icon's image and/orbaseStyle
switch to the appropriate "Over" value when the user rolls over or focuses on the icon?Note if
FormItem.showOver
is true andshowOverWhen
is set to "textBox", this icon will show over state when the user rolls over the text box (or control table, if visible) for the item. This is most commonly used forinline
icons.Note : This is an advanced setting
- Parameters:
showOver
- New showOver value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls- See Also:
-
getShowOver
Should this icon's image and/orbaseStyle
switch to the appropriate "Over" value when the user rolls over or focuses on the icon?Note if
FormItem.showOver
is true andshowOverWhen
is set to "textBox", this icon will show over state when the user rolls over the text box (or control table, if visible) for the item. This is most commonly used forinline
icons.- Returns:
- Current showOver value. Default value is null
- See Also:
-
setShowOverWhen
IfshowOver
orFormItem.showOverIcons
is true, this property may be set to customize when the 'over' styling is applied to the item. If unset, rollover styling will be applied when the user is over the icon only.Note : This is an advanced setting
- Parameters:
showOverWhen
- New showOverWhen value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls
-
getShowOverWhen
IfshowOver
orFormItem.showOverIcons
is true, this property may be set to customize when the 'over' styling is applied to the item. If unset, rollover styling will be applied when the user is over the icon only.- Returns:
- Current showOverWhen value. Default value is null
-
setShowRTL
Should this icon'ssrc
and/orbaseStyle
switch to the appropriate RTL value when the FormItem is in RTL mode? If true, then the image URL for all states will have "_rtl" added before the extension. Also, if baseStyle is set, all style names will have an "RTL" suffix. This should only be enabled if RTL media is available.For example, if an icon's src is "[SKINIMG]formItemIcons/myFormIcon.png" and the baseStyle is "myFormIcon", then in the "Down" state, Smart GWT will use "[SKINIMG]formItemIcons/myFormIcon_Down_rtl.png" for the image source and "myFormIconDownRTL" for the style name.
Note : This is an advanced setting
- Parameters:
showRTL
- New showRTL value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls
-
getShowRTL
Should this icon'ssrc
and/orbaseStyle
switch to the appropriate RTL value when the FormItem is in RTL mode? If true, then the image URL for all states will have "_rtl" added before the extension. Also, if baseStyle is set, all style names will have an "RTL" suffix. This should only be enabled if RTL media is available.For example, if an icon's src is "[SKINIMG]formItemIcons/myFormIcon.png" and the baseStyle is "myFormIcon", then in the "Down" state, Smart GWT will use "[SKINIMG]formItemIcons/myFormIcon_Down_rtl.png" for the image source and "myFormIconDownRTL" for the style name.
- Returns:
- Current showRTL value. Default value is null
-
setSrc
If set, this property determines this icon's image source. If unset the form item'sdefaultIconSrc
property will be used instead.
As withdefaultIconSrc
this URL will be modified by adding "_Over" or "_Disabled" if appropriate to show the icon's over or disabled state. IfshowRTL
is enabled, then "_rtl" will be added to the source URL before the extension.The special value "blank" means that no image will be shown for this icon. This is particularly useful together with
baseStyle
to implement spriting of the different icon states.For an
inline
FormItemIcon
,text
may be specified to show a string of HTML instead of an image.Spriting
can be used for this image, by setting this property to aSCSpriteConfig
formatted string.- Parameters:
src
- New src value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls- See Also:
-
getSrc
If set, this property determines this icon's image source. If unset the form item'sdefaultIconSrc
property will be used instead.
As withdefaultIconSrc
this URL will be modified by adding "_Over" or "_Disabled" if appropriate to show the icon's over or disabled state. IfshowRTL
is enabled, then "_rtl" will be added to the source URL before the extension.The special value "blank" means that no image will be shown for this icon. This is particularly useful together with
baseStyle
to implement spriting of the different icon states.For an
inline
FormItemIcon
,text
may be specified to show a string of HTML instead of an image.Spriting
can be used for this image, by setting this property to aSCSpriteConfig
formatted string.- Returns:
- Current src value. Default value is null
- See Also:
-
setSrc
If set, this property determines this icon's image source. If unset the form item'sdefaultIconSrc
property will be used instead.
As withdefaultIconSrc
this URL will be modified by adding "_Over" or "_Disabled" if appropriate to show the icon's over or disabled state. IfshowRTL
is enabled, then "_rtl" will be added to the source URL before the extension.The special value "blank" means that no image will be shown for this icon. This is particularly useful together with
baseStyle
to implement spriting of the different icon states.For an
inline
FormItemIcon
,text
may be specified to show a string of HTML instead of an image.Spriting
can be used for this image, by setting this property to aSCSpriteConfig
formatted string.- Parameters:
src
- New src value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls- See Also:
-
getSrcAsSCStatefulImgConfig
If set, this property determines this icon's image source. If unset the form item'sdefaultIconSrc
property will be used instead.
As withdefaultIconSrc
this URL will be modified by adding "_Over" or "_Disabled" if appropriate to show the icon's over or disabled state. IfshowRTL
is enabled, then "_rtl" will be added to the source URL before the extension.The special value "blank" means that no image will be shown for this icon. This is particularly useful together with
baseStyle
to implement spriting of the different icon states.For an
inline
FormItemIcon
,text
may be specified to show a string of HTML instead of an image.Spriting
can be used for this image, by setting this property to aSCSpriteConfig
formatted string.- Returns:
- Current src value. Default value is null
- See Also:
-
setTabIndex
TabIndex for this formItemIcon.Set to -1 to remove the icon from the tab order, but be cautious doing so: if the icon triggers important application functionality that cannot otherwise be accessed via the keyboard, it would be a violation of accessibility standard to remove the icon from the tab order.
Any usage other than setting to -1 is extremely advanced in the same way as using
FormItem.globalTabIndex
.Note : This is an advanced setting
- Parameters:
tabIndex
- New tabIndex value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls
-
getTabIndex
TabIndex for this formItemIcon.Set to -1 to remove the icon from the tab order, but be cautious doing so: if the icon triggers important application functionality that cannot otherwise be accessed via the keyboard, it would be a violation of accessibility standard to remove the icon from the tab order.
Any usage other than setting to -1 is extremely advanced in the same way as using
FormItem.globalTabIndex
.- Returns:
- Current tabIndex value. Default value is null
-
setText
As an alternative to displaying an image, aninline
FormItemIcon
can display a string of HTML where the icon's image would have appeared. This enables advanced customizations such as using text, icon font symbols, Unicode dingbats and emoji, and/or SVG in place of an image.Setting an inline icon's text property will cause the HTML to be used instead of an image, as long as the browser and form item support inline icons.
This property only has an effect on inline icons. If the inline property is false, or the browser or form item does not support inline icons, then the image specified by
src
(or the form item'sdefaultIconSrc
) will be used.Typically, the HTML is styled via
baseStyle
.Auto-sizing of the HTML is not supported; the HTML will be clipped to the icon's
width
andheight
.Note : This is an advanced setting
- Parameters:
text
- New text value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls- See Also:
-
getText
As an alternative to displaying an image, aninline
FormItemIcon
can display a string of HTML where the icon's image would have appeared. This enables advanced customizations such as using text, icon font symbols, Unicode dingbats and emoji, and/or SVG in place of an image.Setting an inline icon's text property will cause the HTML to be used instead of an image, as long as the browser and form item support inline icons.
This property only has an effect on inline icons. If the inline property is false, or the browser or form item does not support inline icons, then the image specified by
src
(or the form item'sdefaultIconSrc
) will be used.Typically, the HTML is styled via
baseStyle
.Auto-sizing of the HTML is not supported; the HTML will be clipped to the icon's
width
andheight
.- Returns:
- Current text value. Default value is null
- See Also:
-
setVisibleWhen
Criteria to be evaluated to determine whether this icon should be visible.Criteria are evaluated against the
form's current values
as well as the currentrule context
. Criteria are re-evaluated every time form values or the rule context changes, whether by end user action or by programmatic calls.A basic criteria uses textMatchStyle:"exact". When specified in
Component XML
this property allowsshorthand formats
for defining criteria.Note: A FormItemIcon using visibleWhen must have a
name
defined on its FormItem.- Parameters:
visibleWhen
- New visibleWhen value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls- See Also:
-
getVisibleWhen
Criteria to be evaluated to determine whether this icon should be visible.Criteria are evaluated against the
form's current values
as well as the currentrule context
. Criteria are re-evaluated every time form values or the rule context changes, whether by end user action or by programmatic calls.A basic criteria uses textMatchStyle:"exact". When specified in
Component XML
this property allowsshorthand formats
for defining criteria.Note: A FormItemIcon using visibleWhen must have a
name
defined on its FormItem.- Returns:
- Current visibleWhen value. Default value is null
- See Also:
-
setWidth
If set, this property determines the width of this icon in px. If unset the form item'siconWidth
property will be used instead.- Parameters:
width
- New width value. Default value is null- Returns:
FormItemIcon
instance, for chaining setter calls- See Also:
-
getWidth
If set, this property determines the width of this icon in px. If unset the form item'siconWidth
property will be used instead.- Returns:
- Current width value. Default value is null
- See Also:
-
addFormItemClickHandler
Add a formItemClick handler.Click handler for this icon.
This event may be cancelled. If this event is not cancelled by the icon-level click handler, it may also be handled at the FormItem level via
FormItem.pickerIconClick()
[for the picker icon only], and thenFormItem.iconClick()
- Specified by:
addFormItemClickHandler
in interfaceHasFormItemClickHandlers
- Parameters:
handler
- the formItemClick handler- Returns:
HandlerRegistration
used to remove this handler
-
keyPress
public void keyPress(String keyName, char character, DynamicForm form, FormItem item, FormItemIcon icon) StringMethod action to fire when this icon has focus and receives a keypress event. If unset the form item'siconKeyPress
method will be fired instead (if specified).- Parameters:
keyName
- Name of the key pressed. SeeKeyName
character
- character produced by the keypressform
- The Dynamic Form to which this icon's item belongs.item
- The Form Item containing this iconicon
- A pointer to the form item icon
-
equals
-
hashCode
public int hashCode() -
setShowIfCondition
Set showIf condition.If specified,
icon.showIf
will be evaluated when the form item is drawn or redrawn. Return true if the icon should be visible, or false if it should be hidden. Note that ifFormItem.showIcon
orFormItem.hideIcon
is called, this method will be overridden.- Parameters:
handler
- the showIf handler
-