public class SCStatefulImgConfig extends DataClass
state of some components.
See the stateful images overview for more information.
Each attribute in this configuration object maps a state to a target URL.
Each URL may be specified in one of three ways
SCImgURL may be used to refer directly to an image file."#state:" prefix may be used to display media from another
specified state."#modifier:" prefix may be used to specify a modifier
string to apply to the base image.
{ _base:"button.png",
Over:"bright_button.png",
Focused:"#state:Over",
Selected:"#state:Over",
Disabled:"#modifier:_Disabled",
SelectedDisabled:"#state:Selected"
}
In this case
SCImgURL rules"bright_button.png")"_Disabled" suffix applied to the file name
("button_Disabled.png")"SelectedDisabled" entry would be used for the combined
"Selected" and "Disabled" states, and would
re-use the "Selected" state image (which in turn maps back to
the "Over" state, resolving to "bright_button.png")
The default set of standard states are explicitly documented, but this object format
is extensible.
A developer may specify additional attributes on a SCStatefulImgConfig beyond the
standard documented states and they may be picked up if a custom state is applied to
a component (via a call to StatefulCanvas.setState(), for
example).
In some cases, an icon may have only custom states - for example, a tree-folder icon
is always either opened or closed. In these cases, a _base entry is only
required if entries in the object use the #state or #modifier components.
focused and selected
states may be applied to a component in combination with other states. For example an ImgButton
marked both Selected and Disabled will look for media to
represent this combined state. To provide such media in a SCStatefulImgConfig,
use the combined state names (in this case SelectedDisabled).SelectedFocusedOver for example).
The SCStatefulImgConfig format may be sparse - developers may skip providing values for certain states (or combined states) in the SCStatefulImgConfig object. In this case the system will back off to using one of the state image entries that has been explicitly provided, according to the following rules:
| State(s) | Stateful image attributes to consider (in order of preference) |
Focused and Selected |
If both focused and selected states are applied, the system will use the first
(populated) value from the following attribute list:
|
Over or Down in combination with Focused
/ Selected |
System will check for a combined state attribute with the Focused / Selected state first. For example for Focused + Selected + Over, consider the following attributes:
|
All other states, including Disabled (in combination with
Focused / Selected) |
Check for a combined state attribute with the Focused / Selected state first. For example for Focused + Selected + "CustomState", consider the following attributes:
|
"_base" attribute will be used.factoryCreated, factoryProperties| Constructor and Description |
|---|
SCStatefulImgConfig() |
SCStatefulImgConfig(com.google.gwt.core.client.JavaScriptObject jsObj) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
get_base()
The base filename for the image.
|
java.lang.String |
getDisabled()
Image to display when the component is
disabled. |
java.lang.String |
getDown()
Image to display on
mouseDown. |
java.lang.String |
getFocused()
Image to display when the component is
focused. |
java.lang.String |
getFocusedDown()
Image to display when the component is
focused on mouse down. |
java.lang.String |
getFocusedOver()
|
static SCStatefulImgConfig |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
java.lang.String |
getOver()
Image to display on
roll over. |
java.lang.String |
getSelected()
Image to display when the component is
selected. |
java.lang.String |
getSelectedDisabled()
|
java.lang.String |
getSelectedDown()
Image to display when the component is
selected on mouse down. |
java.lang.String |
getSelectedFocused()
|
java.lang.String |
getSelectedFocusedDown()
|
java.lang.String |
getSelectedFocusedOver()
|
java.lang.String |
getSelectedOver()
|
SCStatefulImgConfig |
set_base(java.lang.String _base)
The base filename for the image.
|
SCStatefulImgConfig |
setDisabled(java.lang.String Disabled)
Image to display when the component is
disabled. |
SCStatefulImgConfig |
setDown(java.lang.String Down)
Image to display on
mouseDown. |
SCStatefulImgConfig |
setFocused(java.lang.String Focused)
Image to display when the component is
focused. |
SCStatefulImgConfig |
setFocusedDown(java.lang.String FocusedDown)
Image to display when the component is
focused on mouse down. |
SCStatefulImgConfig |
setFocusedOver(java.lang.String FocusedOver)
|
SCStatefulImgConfig |
setOver(java.lang.String Over)
Image to display on
roll over. |
SCStatefulImgConfig |
setSelected(java.lang.String Selected)
Image to display when the component is
selected. |
SCStatefulImgConfig |
setSelectedDisabled(java.lang.String SelectedDisabled)
|
SCStatefulImgConfig |
setSelectedDown(java.lang.String SelectedDown)
Image to display when the component is
selected on mouse down. |
SCStatefulImgConfig |
setSelectedFocused(java.lang.String SelectedFocused)
|
SCStatefulImgConfig |
setSelectedFocusedDown(java.lang.String SelectedFocusedDown)
|
SCStatefulImgConfig |
setSelectedFocusedOver(java.lang.String SelectedFocusedOver)
|
SCStatefulImgConfig |
setSelectedOver(java.lang.String SelectedOver)
|
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, setFactoryCreatedpublic SCStatefulImgConfig()
public SCStatefulImgConfig(com.google.gwt.core.client.JavaScriptObject jsObj)
public static SCStatefulImgConfig getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public SCStatefulImgConfig set_base(java.lang.String _base)
"#modifier:some_value" format. In some cases, an icon may have only
custom states - for example, a tree-folder icon is always either opened or closed, so a _base entry is not
required unless entries in the object use the #state or #modifier components - in this case, a warning
will be logged if no _base is set.
See SCStatefulImgConfig overview for further information.
_base - New _base value. Default value is nullSCStatefulImgConfig instance, for chaining setter callsSCImgURLpublic java.lang.String get_base()
"#modifier:some_value" format. In some cases, an icon may have only
custom states - for example, a tree-folder icon is always either opened or closed, so a _base entry is not
required unless entries in the object use the #state or #modifier components - in this case, a warning
will be logged if no _base is set.
See SCStatefulImgConfig overview for further information.
SCImgURLpublic SCStatefulImgConfig setDisabled(java.lang.String Disabled)
disabled. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the
format "#modifier:modifierString"SCStatefulImgConfig overview for further information.Disabled - New Disabled value. Default value is nullSCStatefulImgConfig instance, for chaining setter callspublic java.lang.String getDisabled()
disabled. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the
format "#modifier:modifierString"SCStatefulImgConfig overview for further information.public SCStatefulImgConfig setDown(java.lang.String Down)
mouseDown. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the
format "#modifier:modifierString"SCStatefulImgConfig overview for further information.Down - New Down value. Default value is nullSCStatefulImgConfig instance, for chaining setter callspublic java.lang.String getDown()
mouseDown. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the
format "#modifier:modifierString"SCStatefulImgConfig overview for further information.public SCStatefulImgConfig setFocused(java.lang.String Focused)
focused. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the
format "#modifier:modifierString"SCStatefulImgConfig overview for further information.Focused - New Focused value. Default value is nullSCStatefulImgConfig instance, for chaining setter callspublic java.lang.String getFocused()
focused. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the
format "#modifier:modifierString"SCStatefulImgConfig overview for further information.public SCStatefulImgConfig setFocusedDown(java.lang.String FocusedDown)
focused on mouse down. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the format
"#modifier:modifierString"SCStatefulImgConfig overview for further information.FocusedDown - New FocusedDown value. Default value is nullSCStatefulImgConfig instance, for chaining setter callspublic java.lang.String getFocusedDown()
focused on mouse down. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the format
"#modifier:modifierString"SCStatefulImgConfig overview for further information.public SCStatefulImgConfig setFocusedOver(java.lang.String FocusedOver)
focused on roll over. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the format
"#modifier:modifierString"SCStatefulImgConfig overview for further information.FocusedOver - New FocusedOver value. Default value is nullSCStatefulImgConfig instance, for chaining setter callspublic java.lang.String getFocusedOver()
focused on roll over. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the format
"#modifier:modifierString"SCStatefulImgConfig overview for further information.public SCStatefulImgConfig setOver(java.lang.String Over)
roll over. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the
format "#modifier:modifierString"SCStatefulImgConfig overview for further information.Over - New Over value. Default value is nullSCStatefulImgConfig instance, for chaining setter callspublic java.lang.String getOver()
roll over. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the
format "#modifier:modifierString"SCStatefulImgConfig overview for further information.public SCStatefulImgConfig setSelected(java.lang.String Selected)
selected. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the format
"#modifier:modifierString"SCStatefulImgConfig overview for further information.Selected - New Selected value. Default value is nullSCStatefulImgConfig instance, for chaining setter callspublic java.lang.String getSelected()
selected. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the format
"#modifier:modifierString"SCStatefulImgConfig overview for further information.public SCStatefulImgConfig setSelectedDisabled(java.lang.String SelectedDisabled)
selected and
disabled. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the format
"#modifier:modifierString"SCStatefulImgConfig overview for further information.SelectedDisabled - New SelectedDisabled value. Default value is nullSCStatefulImgConfig instance, for chaining setter callspublic java.lang.String getSelectedDisabled()
selected and
disabled. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the format
"#modifier:modifierString"SCStatefulImgConfig overview for further information.public SCStatefulImgConfig setSelectedDown(java.lang.String SelectedDown)
selected on mouse down. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the format
"#modifier:modifierString"SCStatefulImgConfig overview for further information.SelectedDown - New SelectedDown value. Default value is nullSCStatefulImgConfig instance, for chaining setter callspublic java.lang.String getSelectedDown()
selected on mouse down. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the format
"#modifier:modifierString"SCStatefulImgConfig overview for further information.public SCStatefulImgConfig setSelectedFocused(java.lang.String SelectedFocused)
selected and
focused. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the format
"#modifier:modifierString"SCStatefulImgConfig overview for further information.SelectedFocused - New SelectedFocused value. Default value is nullSCStatefulImgConfig instance, for chaining setter callspublic java.lang.String getSelectedFocused()
selected and
focused. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the format
"#modifier:modifierString"SCStatefulImgConfig overview for further information.public SCStatefulImgConfig setSelectedFocusedDown(java.lang.String SelectedFocusedDown)
selected and
focused on mouse down. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the format
"#modifier:modifierString"SCStatefulImgConfig overview for further information.SelectedFocusedDown - New SelectedFocusedDown value. Default value is nullSCStatefulImgConfig instance, for chaining setter callspublic java.lang.String getSelectedFocusedDown()
selected and
focused on mouse down. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the format
"#modifier:modifierString"SCStatefulImgConfig overview for further information.public SCStatefulImgConfig setSelectedFocusedOver(java.lang.String SelectedFocusedOver)
selected and
focused on roll over. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the format
"#modifier:modifierString"SCStatefulImgConfig overview for further information.SelectedFocusedOver - New SelectedFocusedOver value. Default value is nullSCStatefulImgConfig instance, for chaining setter callspublic java.lang.String getSelectedFocusedOver()
selected and
focused on roll over. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the format
"#modifier:modifierString"SCStatefulImgConfig overview for further information.public SCStatefulImgConfig setSelectedOver(java.lang.String SelectedOver)
selected on roll over. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the format
"#modifier:modifierString"SCStatefulImgConfig overview for further information.SelectedOver - New SelectedOver value. Default value is nullSCStatefulImgConfig instance, for chaining setter callspublic java.lang.String getSelectedOver()
selected on roll over. May be specified as
SCImgURL indicating the media to load"#state:otherStateName"_base media via the format
"#modifier:modifierString"SCStatefulImgConfig overview for further information.