public class FormItemIcon extends DataClass implements HasFormItemClickHandlers
factoryCreated, factoryProperties
Constructor and Description |
---|
FormItemIcon() |
FormItemIcon(com.google.gwt.core.client.JavaScriptObject jsObj) |
Modifier and Type | Method and Description |
---|---|
com.google.gwt.event.shared.HandlerRegistration |
addFormItemClickHandler(FormItemClickHandler handler)
Add a formItemClick handler.
|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getBaseStyle()
Base CSS style.
|
java.lang.Boolean |
getCanFocus()
Set to false to suppress all focus features for this icon.
|
Cursor |
getCursor()
Specifies the cursor image to display when the mouse pointer is over this icon.
|
java.lang.Boolean |
getDisabled()
Whether this icon is disabled.
|
Cursor |
getDisabledCursor()
Specifies the cursor image to display when the mouse pointer is over this icon if this icon is disabled.
|
java.lang.Boolean |
getDisableOnReadOnly()
If
FormItem.canEdit is set to false, should this
icon be disabled. |
AdvancedCriteria |
getEnableWhen()
Criteria to be evaluated to determine whether this icon should appear enabled.
|
java.lang.Integer |
getHeight()
If set, this property determines the height of this icon in px.
|
java.lang.Integer |
getHspace()
If set, this property determines the number of pixels space to be displayed on the left of this form item icon, or for
inline icons whose inlineIconAlign is Alignment.LEFT , on the right of this form item icon. |
PickListItemIconPlacement |
getIconPlacement()
For PickList items with
PickListItemIconPlacement set such that the pickList does not
render near-origin, should this icon be rendered inline within the formItem itself, or within the ComboBoxItem.pickerNavigationBar . |
java.lang.Boolean |
getInline()
When set, this icon is rendered inside the
textBox area of the FormItem (where input occurs in a TextItem , TextAreaItem or
ComboBoxItem ) as opposed to as a trailing icon. |
Alignment |
getInlineIconAlign()
Horizontal alignment for icons marked
inline . |
java.lang.String |
getName()
Identifier for this form item icon.
|
java.lang.Boolean |
getNeverDisable()
If
icon.neverDisable is true, when this form item is disabled, the icon will remain enabled. |
static FormItemIcon |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
java.lang.String |
getPrompt()
If set, this property will be displayed as a prompt (and tooltip text) for this form item icon.
|
java.lang.Boolean |
getShowDisabledOnFocus()
If show-on-focus behavior is enabled for this icon via
showOnFocus 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 the FormItem.showDisabledIconsOnFocus or
FormItem.showDisabledPickerIconOnFocus settings. |
java.lang.Boolean |
getShowError()
Whether this icon's image and/or
baseStyle
should change to an appropriate Error state when the item has validation errors. |
java.lang.Boolean |
getShowFocused()
Should this icon's image and/or
baseStyle
switch to the appropriate "Focused" value when the user puts focus on the form item or icon? |
java.lang.Boolean |
getShowFocusedWithItem()
If this icon will be updated to show focus (see
showFocused , 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. |
java.lang.Boolean |
getShowOnFocus()
Show this icon when its item gets focus, and hide it when it loses focus.
|
java.lang.Boolean |
getShowOver()
Should this icon's image and/or
baseStyle
switch to the appropriate "Over" value when the user rolls over or focuses on the icon? |
IconOverTrigger |
getShowOverWhen()
If
showOver or FormItem.showOverIcons is true, this property may be
set to customize when the 'over' styling is applied to the item. |
java.lang.Boolean |
getShowRTL()
|
java.lang.String |
getSrc()
If set, this property determines this icon's image source.
|
SCStatefulImgConfig |
getSrcAsSCStatefulImgConfig()
If set, this property determines this icon's image source.
|
java.lang.Integer |
getTabIndex()
TabIndex for this formItemIcon.
|
java.lang.String |
getText()
As an alternative to displaying an image, an
inline FormItemIcon can display a string of HTML where the icon's image would have appeared. |
AdvancedCriteria |
getVisibleWhen()
Criteria to be evaluated to determine whether this icon should be visible.
|
java.lang.Integer |
getWidth()
If set, this property determines the width of this icon in px.
|
int |
hashCode() |
void |
keyPress(java.lang.String keyName,
char character,
DynamicForm form,
FormItem item,
FormItemIcon icon)
StringMethod action to fire when this icon has focus and receives a keypress event.
|
FormItemIcon |
setBaseStyle(java.lang.String baseStyle)
Base CSS style.
|
FormItemIcon |
setCanFocus(java.lang.Boolean canFocus)
Set to false to suppress all focus features for this icon.
|
FormItemIcon |
setCursor(Cursor cursor)
Specifies the cursor image to display when the mouse pointer is over this icon.
|
FormItemIcon |
setDisabled(java.lang.Boolean disabled)
Whether this icon is disabled.
|
FormItemIcon |
setDisabledCursor(Cursor disabledCursor)
Specifies the cursor image to display when the mouse pointer is over this icon if this icon is disabled.
|
FormItemIcon |
setDisableOnReadOnly(java.lang.Boolean disableOnReadOnly)
If
FormItem.canEdit is set to false, should this
icon be disabled. |
FormItemIcon |
setEnableWhen(AdvancedCriteria enableWhen)
Criteria to be evaluated to determine whether this icon should appear enabled.
|
FormItemIcon |
setHeight(java.lang.Integer height)
If set, this property determines the height of this icon in px.
|
FormItemIcon |
setHspace(java.lang.Integer hspace)
If set, this property determines the number of pixels space to be displayed on the left of this form item icon, or for
inline icons whose inlineIconAlign is Alignment.LEFT , on the right of this form item icon. |
FormItemIcon |
setIconPlacement(PickListItemIconPlacement iconPlacement)
For PickList items with
PickListItemIconPlacement set such that the pickList does not
render near-origin, should this icon be rendered inline within the formItem itself, or within the ComboBoxItem.pickerNavigationBar . |
FormItemIcon |
setInline(java.lang.Boolean inline)
When set, this icon is rendered inside the
textBox area of the FormItem (where input occurs in a TextItem , TextAreaItem or
ComboBoxItem ) as opposed to as a trailing icon. |
FormItemIcon |
setInlineIconAlign(Alignment inlineIconAlign)
Horizontal alignment for icons marked
inline . |
FormItemIcon |
setName(java.lang.String name)
Identifier for this form item icon.
|
FormItemIcon |
setNeverDisable(java.lang.Boolean neverDisable)
If
icon.neverDisable is true, when this form item is disabled, the icon will remain enabled. |
FormItemIcon |
setPrompt(java.lang.String prompt)
If set, this property will be displayed as a prompt (and tooltip text) for this form item icon.
|
FormItemIcon |
setShowDisabledOnFocus(java.lang.Boolean showDisabledOnFocus)
If show-on-focus behavior is enabled for this icon via
showOnFocus 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 the FormItem.showDisabledIconsOnFocus or
FormItem.showDisabledPickerIconOnFocus settings. |
FormItemIcon |
setShowError(java.lang.Boolean showError)
Whether this icon's image and/or
baseStyle
should change to an appropriate Error state when the item has validation errors. |
FormItemIcon |
setShowFocused(java.lang.Boolean showFocused)
Should this icon's image and/or
baseStyle
switch to the appropriate "Focused" value when the user puts focus on the form item or icon? |
FormItemIcon |
setShowFocusedWithItem(java.lang.Boolean showFocusedWithItem)
If this icon will be updated to show focus (see
showFocused , 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.
|
FormItemIcon |
setShowOnFocus(java.lang.Boolean showOnFocus)
Show this icon when its item gets focus, and hide it when it loses focus.
|
FormItemIcon |
setShowOver(java.lang.Boolean showOver)
Should this icon's image and/or
baseStyle
switch to the appropriate "Over" value when the user rolls over or focuses on the icon? |
FormItemIcon |
setShowOverWhen(IconOverTrigger showOverWhen)
If
showOver or FormItem.showOverIcons is true, this property may be
set to customize when the 'over' styling is applied to the item. |
FormItemIcon |
setShowRTL(java.lang.Boolean showRTL)
|
FormItemIcon |
setSrc(SCStatefulImgConfig src)
If set, this property determines this icon's image source.
|
FormItemIcon |
setSrc(java.lang.String src)
If set, this property determines this icon's image source.
|
FormItemIcon |
setTabIndex(java.lang.Integer tabIndex)
TabIndex for this formItemIcon.
|
FormItemIcon |
setText(java.lang.String text)
As an alternative to displaying an image, an
inline FormItemIcon can display a string of HTML where the icon's image would have appeared. |
FormItemIcon |
setVisibleWhen(AdvancedCriteria visibleWhen)
Criteria to be evaluated to determine whether this icon should be visible.
|
FormItemIcon |
setWidth(java.lang.Integer width)
If set, this property determines the width of this icon in px.
|
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
getJsObj, isCreated, setJavaScriptObject, setJsObj
public FormItemIcon()
public FormItemIcon(com.google.gwt.core.client.JavaScriptObject jsObj)
public static FormItemIcon getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public FormItemIcon setBaseStyle(java.lang.String baseStyle)
this.showOver
is true, "Disabled" if the icon is
disabled, and "Focused". In addition, if showRTL
is enabled, then an "RTL" suffix will be added.
Note : This is an advanced setting
baseStyle
- New baseStyle value. Default value is nullFormItemIcon
instance, for chaining setter callsCSSStyleName
public java.lang.String getBaseStyle()
this.showOver
is true, "Disabled" if the icon is
disabled, and "Focused". In addition, if showRTL
is enabled, then an "RTL" suffix will be added.CSSStyleName
public FormItemIcon setCanFocus(java.lang.Boolean canFocus)
Note : This is an advanced setting
canFocus
- New canFocus value. Default value is nullFormItemIcon
instance, for chaining setter callspublic java.lang.Boolean getCanFocus()
public FormItemIcon setCursor(Cursor cursor)
See also disabledCursor
.
Note : This is an advanced setting
cursor
- New cursor value. Default value is Canvas.POINTERFormItemIcon
instance, for chaining setter callsCues overview and related methods
public Cursor getCursor()
See also disabledCursor
.
Cues overview and related methods
public FormItemIcon setDisabled(java.lang.Boolean disabled)
FormItem.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.disabled
- New disabled value. Default value is nullFormItemIcon
instance, for chaining setter callsFormItem.setIconDisabled(java.lang.String, boolean)
,
Appearance overview and related methods
public java.lang.Boolean getDisabled()
FormItem.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.FormItem.setIconDisabled(java.lang.String, boolean)
,
Appearance overview and related methods
public FormItemIcon setDisabledCursor(Cursor disabledCursor)
Note : This is an advanced setting
disabledCursor
- New disabledCursor value. Default value is Canvas.DEFAULTFormItemIcon
instance, for chaining setter callsCues overview and related methods
public Cursor getDisabledCursor()
Cues overview and related methods
public FormItemIcon setDisableOnReadOnly(java.lang.Boolean disableOnReadOnly)
FormItem.canEdit
is set to false, should this
icon be disabled. If unset this is determined by FormItem.disableIconsOnReadOnly
. Note that
if neverDisable
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
disableOnReadOnly
- New disableOnReadOnly value. Default value is nullFormItemIcon
instance, for chaining setter callspublic java.lang.Boolean getDisableOnReadOnly()
FormItem.canEdit
is set to false, should this
icon be disabled. If unset this is determined by FormItem.disableIconsOnReadOnly
. Note that
if neverDisable
is set to true, the icons
will be rendered enabled regardless of this setting and whether the item is editable.public FormItemIcon setEnableWhen(AdvancedCriteria enableWhen)
Criteria are evaluated against the
form's current values
as well as the current rule 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
allows shorthand formats
for defining criteria.
Note: A
FormItemIcon using enableWhen must have a name
defined
on its FormItem.
enableWhen
- New enableWhen value. Default value is nullFormItemIcon
instance, for chaining setter callsDynamic Rules
public AdvancedCriteria getEnableWhen()
Criteria are evaluated against the
form's current values
as well as the current rule 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
allows shorthand formats
for defining criteria.
Note: A
FormItemIcon using enableWhen must have a name
defined
on its FormItem.
Dynamic Rules
public FormItemIcon setHeight(java.lang.Integer height)
iconHeight
property will be used instead.height
- New height value. Default value is nullFormItemIcon
instance, for chaining setter callsFormItem.setIconHeight(int)
public java.lang.Integer getHeight()
iconHeight
property will be used instead.FormItem.getIconHeight()
public FormItemIcon setHspace(java.lang.Integer hspace)
inline
icons whose inlineIconAlign
is Alignment.LEFT
, on the right of this form item icon. Must be non-negative. If unset, the form
item's iconHSpace
will be used instead.hspace
- New hspace value. Default value is nullFormItemIcon
instance, for chaining setter callspublic java.lang.Integer getHspace()
inline
icons whose inlineIconAlign
is Alignment.LEFT
, on the right of this form item icon. Must be non-negative. If unset, the form
item's iconHSpace
will be used instead.public FormItemIcon setIconPlacement(PickListItemIconPlacement iconPlacement)
PickListItemIconPlacement
set such that the pickList does not
render near-origin, should this icon be rendered inline within the formItem itself, or within the ComboBoxItem.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.
iconPlacement
- New iconPlacement value. Default value is nullFormItemIcon
instance, for chaining setter callspublic PickListItemIconPlacement getIconPlacement()
PickListItemIconPlacement
set such that the pickList does not
render near-origin, should this icon be rendered inline within the formItem itself, or within the ComboBoxItem.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.
public FormItemIcon setInline(java.lang.Boolean inline)
textBox
area of the FormItem
(where input occurs in a TextItem
, TextAreaItem
or
ComboBoxItem
) 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 the textBox
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 a
TextItem
, TextAreaItem
or ComboBoxItem
. 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
.
inline
- New inline value. Default value is falseFormItemIcon
instance, for chaining setter callspublic java.lang.Boolean getInline()
textBox
area of the FormItem
(where input occurs in a TextItem
, TextAreaItem
or
ComboBoxItem
) 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 the textBox
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 a
TextItem
, TextAreaItem
or ComboBoxItem
. 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
.
public FormItemIcon setInlineIconAlign(Alignment inlineIconAlign)
inline
.
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 and
inlineIconAlign:"right"
results in the icon being placed on the left.
inlineIconAlign
- New inlineIconAlign value. Default value is nullFormItemIcon
instance, for chaining setter callspublic Alignment getInlineIconAlign()
inline
.
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 and
inlineIconAlign:"right"
results in the icon being placed on the left.
public FormItemIcon setName(java.lang.String name)
FormItem.getIcon()
.name
- New name value. Default value is nullFormItemIcon
instance, for chaining setter callsIdentifier
public java.lang.String getName()
FormItem.getIcon()
.Identifier
public FormItemIcon setNeverDisable(java.lang.Boolean neverDisable)
icon.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 see FormItem.disableIconsOnReadOnly
and disableOnReadOnly
Note : This is an advanced setting
neverDisable
- New neverDisable value. Default value is nullFormItemIcon
instance, for chaining setter callspublic java.lang.Boolean getNeverDisable()
icon.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 see FormItem.disableIconsOnReadOnly
and disableOnReadOnly
public FormItemIcon setPrompt(java.lang.String prompt)
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
prompt
- New prompt value. Default value is nullFormItemIcon
instance, for chaining setter callsFormItem.setCanHover(java.lang.Boolean)
,
FormItem.setIconPrompt(java.lang.String)
,
HTMLString
public java.lang.String getPrompt()
If unset the form
item's iconPrompt
property will be used instead.
Has no effect when FormItem.canHover
is set to false.
FormItem.getCanHover()
,
FormItem.getIconPrompt()
,
HTMLString
public FormItemIcon setShowDisabledOnFocus(java.lang.Boolean showDisabledOnFocus)
showOnFocus
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 the FormItem.showDisabledIconsOnFocus
or
FormItem.showDisabledPickerIconOnFocus
settings.
Note : This is an advanced setting
showDisabledOnFocus
- New showDisabledOnFocus value. Default value is nullFormItemIcon
instance, for chaining setter callspublic java.lang.Boolean getShowDisabledOnFocus()
showOnFocus
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 the FormItem.showDisabledIconsOnFocus
or
FormItem.showDisabledPickerIconOnFocus
settings.public FormItemIcon setShowError(java.lang.Boolean showError)
baseStyle
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
showError
- New showError value. Default value is nullFormItemIcon
instance, for chaining setter callsFormItem.setShowOverIcons(java.lang.Boolean)
public java.lang.Boolean getShowError()
baseStyle
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.
FormItem.getShowOverIcons()
public FormItemIcon setShowFocused(java.lang.Boolean showFocused)
baseStyle
switch to the appropriate "Focused" value when the user puts focus on the form item or icon?
Note : This is an advanced setting
showFocused
- New showFocused value. Default value is nullFormItemIcon
instance, for chaining setter callsFormItem.setShowFocusedIcons(java.lang.Boolean)
,
setShowFocusedWithItem(java.lang.Boolean)
public java.lang.Boolean getShowFocused()
baseStyle
switch to the appropriate "Focused" value when the user puts focus on the form item or icon?FormItem.getShowFocusedIcons()
,
getShowFocusedWithItem()
public FormItemIcon setShowFocusedWithItem(java.lang.Boolean showFocusedWithItem)
showFocused
, 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
showFocusedWithItem
- New showFocusedWithItem value. Default value is nullFormItemIcon
instance, for chaining setter callsFormItem.setShowFocusedIcons(java.lang.Boolean)
,
setShowFocused(java.lang.Boolean)
public java.lang.Boolean getShowFocusedWithItem()
showFocused
, 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.FormItem.getShowFocusedIcons()
,
getShowFocused()
public FormItemIcon setShowOnFocus(java.lang.Boolean showOnFocus)
FormItem.showIconsOnFocus
or
FormItem.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
showOnFocus
- New showOnFocus value. Default value is nullFormItemIcon
instance, for chaining setter callsFormItem.setIconShowOnFocus(java.lang.String, java.lang.Boolean)
public java.lang.Boolean getShowOnFocus()
FormItem.showIconsOnFocus
or
FormItem.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.FormItem.setIconShowOnFocus(java.lang.String, java.lang.Boolean)
public FormItemIcon setShowOver(java.lang.Boolean showOver)
baseStyle
switch to the appropriate "Over" value when the user rolls over or focuses on the icon? Note if FormItem.showOver
is true and showOverWhen
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 for inline
icons.
Note : This is an advanced setting
showOver
- New showOver value. Default value is nullFormItemIcon
instance, for chaining setter callsFormItem.setShowOverIcons(java.lang.Boolean)
public java.lang.Boolean getShowOver()
baseStyle
switch to the appropriate "Over" value when the user rolls over or focuses on the icon? Note if FormItem.showOver
is true and showOverWhen
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 for inline
icons.
FormItem.getShowOverIcons()
public FormItemIcon setShowOverWhen(IconOverTrigger showOverWhen)
showOver
or FormItem.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
showOverWhen
- New showOverWhen value. Default value is nullFormItemIcon
instance, for chaining setter callspublic IconOverTrigger getShowOverWhen()
showOver
or FormItem.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.public FormItemIcon setShowRTL(java.lang.Boolean showRTL)
src
and/or baseStyle
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
showRTL
- New showRTL value. Default value is nullFormItemIcon
instance, for chaining setter callspublic java.lang.Boolean getShowRTL()
src
and/or baseStyle
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.
public FormItemIcon setSrc(java.lang.String src)
defaultIconSrc
property
will be used instead.defaultIconSrc
this URL will be modified by adding "_Over" or "_Disabled"
if appropriate to show the icon's over or disabled state. If showRTL
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
a SCSpriteConfig
formatted string.
src
- New src value. Default value is nullFormItemIcon
instance, for chaining setter callsFormItem.setDefaultIconSrc(java.lang.String)
,
SCImgURL
,
Icons Examplepublic java.lang.String getSrc()
defaultIconSrc
property
will be used instead.defaultIconSrc
this URL will be modified by adding "_Over" or "_Disabled"
if appropriate to show the icon's over or disabled state. If showRTL
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
a SCSpriteConfig
formatted string.
FormItem.getDefaultIconSrc()
,
SCImgURL
,
Icons Examplepublic FormItemIcon setSrc(SCStatefulImgConfig src)
defaultIconSrc
property
will be used instead.defaultIconSrc
this URL will be modified by adding "_Over" or "_Disabled"
if appropriate to show the icon's over or disabled state. If showRTL
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
a SCSpriteConfig
formatted string.
src
- New src value. Default value is nullFormItemIcon
instance, for chaining setter callsFormItem.setDefaultIconSrc(java.lang.String)
,
SCImgURL
,
Icons Examplepublic SCStatefulImgConfig getSrcAsSCStatefulImgConfig()
defaultIconSrc
property
will be used instead.defaultIconSrc
this URL will be modified by adding "_Over" or "_Disabled"
if appropriate to show the icon's over or disabled state. If showRTL
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
a SCSpriteConfig
formatted string.
FormItem.getDefaultIconSrc()
,
SCImgURL
,
Icons Examplepublic FormItemIcon setTabIndex(java.lang.Integer tabIndex)
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
tabIndex
- New tabIndex value. Default value is nullFormItemIcon
instance, for chaining setter callspublic java.lang.Integer getTabIndex()
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
.
public FormItemIcon setText(java.lang.String text)
inline
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's defaultIconSrc
) 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
and height
.
Note : This is an advanced setting
text
- New text value. Default value is nullFormItemIcon
instance, for chaining setter callsHTMLString
,
Text Icons Examplepublic java.lang.String getText()
inline
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's defaultIconSrc
) 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
and height
.
HTMLString
,
Text Icons Examplepublic FormItemIcon setVisibleWhen(AdvancedCriteria visibleWhen)
Criteria are evaluated against the form's current values
as well as the current rule 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
allows shorthand formats
for defining criteria.
Note: A
FormItemIcon using visibleWhen must have a name
defined
on its FormItem.
visibleWhen
- New visibleWhen value. Default value is nullFormItemIcon
instance, for chaining setter callsDynamic Rules
public AdvancedCriteria getVisibleWhen()
Criteria are evaluated against the form's current values
as well as the current rule 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
allows shorthand formats
for defining criteria.
Note: A
FormItemIcon using visibleWhen must have a name
defined
on its FormItem.
Dynamic Rules
public FormItemIcon setWidth(java.lang.Integer width)
iconWidth
property will be used instead.width
- New width value. Default value is nullFormItemIcon
instance, for chaining setter callsFormItem.setIconWidth(int)
public java.lang.Integer getWidth()
iconWidth
property will be used instead.FormItem.getIconWidth()
public com.google.gwt.event.shared.HandlerRegistration addFormItemClickHandler(FormItemClickHandler 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 then FormItem.iconClick()
addFormItemClickHandler
in interface HasFormItemClickHandlers
handler
- the formItemClick handlerHandlerRegistration
used to remove this handlerpublic void keyPress(java.lang.String keyName, char character, DynamicForm form, FormItem item, FormItemIcon icon)
iconKeyPress
method will be fired instead (if specified).keyName
- Name of the key pressed.
See KeyName
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 iconpublic void setShowIfCondition(FormItemIfFunction showIf)
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 if FormItem.showIcon
or FormItem.hideIcon
is called, this method will be overridden.
handler
- the showIf handler