com.smartgwt.client.widgets

## Class SCStatefulImgConfig

- java.lang.Object
- - com.smartgwt.client.core.JsObject
  - - com.smartgwt.client.core.DataClass
    - - com.smartgwt.client.widgets.SCStatefulImgConfig

- All Implemented Interfaces:
    com.google.gwt.event.shared.HasHandlers

      public class SCStatefulImgConfig
      extends DataClass

  A configuration object containing image URLs for a set of possible images to display based on the `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

  - a standard `SCImgURL` may be used to refer directly to an image file.
  - the `"#state:"` prefix may be used to display media from another specified state.
  - the `"#modifier:"` prefix may be used to specify a modifier string to apply to the `base image`.
    The modifier will be applied to the base file name before the file type suffix.
  For example, consider a stateful image config with the following properties:

        {    _base:"button.png",
             Over:"bright_button.png",
             Focused:"#state:Over",
             Selected:"#state:Over",
             Disabled:"#modifier:_Disabled",
             SelectedDisabled:"#state:Selected"
        }

  In this case
  - the base image URL and the the "Over" state image URL would be determined using the standard `SCImgURL` rules
  - the "Focused" and "Selected" state images would re-use the "Over" state image (`"bright_button.png"`)
  - the "Disabled" state image would be the base state image with a `"_Disabled"` suffix applied to the file name (`"button_Disabled.png"`)
  - the `"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).

  ### Combined states and missing entries:

  The `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`).
  If a component is both Selected and Focused, three-part combined states are also possible (Selected + Focused + Over gives `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: "FocusedSelected" "Focused" "Selected"
  `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: "FocusedSelectedOver" "FocusedOver" "SelectedOver" If no combined state entry is specified, back off to considering just the Focused / Selected state: "FocusedSelected" "Focused" "Selected" If no focused / selected state entry is present in the config object, look for an entry for the unmodified state name "Over"
  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: "FocusedSelectedCustomState" "FocusedCustomState" "SelectedCustomState" If no combined state entry is specified, back off to considering just the unmodified state name "CustomState" If there is no explicit entry for the state name, use the Focused / Selected state without a state name: "FocusedSelected" "Focused" "Selected"

  If no entry can be found for the specified state / combined states using the above approach, the `"_base"` attribute will be used.

- - ### Field Summary

    - ### Fields inherited from class com.smartgwt.client.core.DataClass

      `factoryCreated, factoryProperties`

    - ### Fields inherited from class com.smartgwt.client.core.JsObject

      `jsObj`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SCStatefulImgConfig()`
    `SCStatefulImgConfig(com.google.gwt.core.client.JavaScriptObject jsObj)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    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()` Image to display when the component is `focused` on `roll over`.
    `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()` Image to display when the component is `selected` and `disabled`.
    `java.lang.String` | `getSelectedDown()` Image to display when the component is `selected` on `mouse down`.
    `java.lang.String` | `getSelectedFocused()` Image to display when the component is `selected` and `focused`.
    `java.lang.String` | `getSelectedFocusedDown()` Image to display when the component is `selected` and `focused` on `mouse down`.
    `java.lang.String` | `getSelectedFocusedOver()` Image to display when the component is `selected` and `focused` on `roll over`.
    `java.lang.String` | `getSelectedOver()` Image to display when the component is `selected` on `roll over`.
    `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)` Image to display when the component is `focused` on `roll over`.
    `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)` Image to display when the component is `selected` and `disabled`.
    `SCStatefulImgConfig` | `setSelectedDown(java.lang.String SelectedDown)` Image to display when the component is `selected` on `mouse down`.
    `SCStatefulImgConfig` | `setSelectedFocused(java.lang.String SelectedFocused)` Image to display when the component is `selected` and `focused`.
    `SCStatefulImgConfig` | `setSelectedFocusedDown(java.lang.String SelectedFocusedDown)` Image to display when the component is `selected` and `focused` on `mouse down`.
    `SCStatefulImgConfig` | `setSelectedFocusedOver(java.lang.String SelectedFocusedOver)` Image to display when the component is `selected` and `focused` on `roll over`.
    `SCStatefulImgConfig` | `setSelectedOver(java.lang.String SelectedOver)` Image to display when the component is `selected` on `roll over`.

    - ### Methods inherited from class com.smartgwt.client.core.DataClass

      `applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, 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

      `equals, getJsObj, hashCode, isCreated, setJavaScriptObject, setJsObj`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SCStatefulImgConfig

          public SCStatefulImgConfig()

    - #### SCStatefulImgConfig

          public SCStatefulImgConfig(com.google.gwt.core.client.JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

          public static SCStatefulImgConfig getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### set_base

          public SCStatefulImgConfig set_base(java.lang.String _base)

      The base filename for the image. This will be used if no state is applied to the stateful component displaying this image, or if no explicit entry exists for a state that is applied.
      It will also be used as a base file name for entries specified using the `"#modifier:some_value"` format.

      See `SCStatefulImgConfig overview` for further information.

      Parameters:
        `_base` - New _base value. Default value is null
      Returns:
        `SCStatefulImgConfig` instance, for chaining setter calls
      See Also:
        `SCImgURL`

    - #### get_base

          public java.lang.String get_base()

      The base filename for the image. This will be used if no state is applied to the stateful component displaying this image, or if no explicit entry exists for a state that is applied.
      It will also be used as a base file name for entries specified using the `"#modifier:some_value"` format.

      See `SCStatefulImgConfig overview` for further information.

      Returns:
        Current _base value. Default value is null
      See Also:
        `SCImgURL`

    - #### setDisabled

          public SCStatefulImgConfig setDisabled(java.lang.String Disabled)

      Image to display when the component is `disabled`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Parameters:
        `Disabled` - New Disabled value. Default value is null
      Returns:
        `SCStatefulImgConfig` instance, for chaining setter calls

    - #### getDisabled

          public java.lang.String getDisabled()

      Image to display when the component is `disabled`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Returns:
        Current Disabled value. Default value is null

    - #### setDown

          public SCStatefulImgConfig setDown(java.lang.String Down)

      Image to display on `mouseDown`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Parameters:
        `Down` - New Down value. Default value is null
      Returns:
        `SCStatefulImgConfig` instance, for chaining setter calls

    - #### getDown

          public java.lang.String getDown()

      Image to display on `mouseDown`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Returns:
        Current Down value. Default value is null

    - #### setFocused

          public SCStatefulImgConfig setFocused(java.lang.String Focused)

      Image to display when the component is `focused`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Parameters:
        `Focused` - New Focused value. Default value is null
      Returns:
        `SCStatefulImgConfig` instance, for chaining setter calls

    - #### getFocused

          public java.lang.String getFocused()

      Image to display when the component is `focused`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Returns:
        Current Focused value. Default value is null

    - #### setFocusedDown

          public SCStatefulImgConfig setFocusedDown(java.lang.String FocusedDown)

      Image to display when the component is `focused` on `mouse down`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Parameters:
        `FocusedDown` - New FocusedDown value. Default value is null
      Returns:
        `SCStatefulImgConfig` instance, for chaining setter calls

    - #### getFocusedDown

          public java.lang.String getFocusedDown()

      Image to display when the component is `focused` on `mouse down`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Returns:
        Current FocusedDown value. Default value is null

    - #### setFocusedOver

          public SCStatefulImgConfig setFocusedOver(java.lang.String FocusedOver)

      Image to display when the component is `focused` on `roll over`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Parameters:
        `FocusedOver` - New FocusedOver value. Default value is null
      Returns:
        `SCStatefulImgConfig` instance, for chaining setter calls

    - #### getFocusedOver

          public java.lang.String getFocusedOver()

      Image to display when the component is `focused` on `roll over`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Returns:
        Current FocusedOver value. Default value is null

    - #### setOver

          public SCStatefulImgConfig setOver(java.lang.String Over)

      Image to display on `roll over`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Parameters:
        `Over` - New Over value. Default value is null
      Returns:
        `SCStatefulImgConfig` instance, for chaining setter calls

    - #### getOver

          public java.lang.String getOver()

      Image to display on `roll over`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Returns:
        Current Over value. Default value is null

    - #### setSelected

          public SCStatefulImgConfig setSelected(java.lang.String Selected)

      Image to display when the component is `selected`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Parameters:
        `Selected` - New Selected value. Default value is null
      Returns:
        `SCStatefulImgConfig` instance, for chaining setter calls

    - #### getSelected

          public java.lang.String getSelected()

      Image to display when the component is `selected`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Returns:
        Current Selected value. Default value is null

    - #### setSelectedDisabled

          public SCStatefulImgConfig setSelectedDisabled(java.lang.String SelectedDisabled)

      Image to display when the component is `selected` and `disabled`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Parameters:
        `SelectedDisabled` - New SelectedDisabled value. Default value is null
      Returns:
        `SCStatefulImgConfig` instance, for chaining setter calls

    - #### getSelectedDisabled

          public java.lang.String getSelectedDisabled()

      Image to display when the component is `selected` and `disabled`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Returns:
        Current SelectedDisabled value. Default value is null

    - #### setSelectedDown

          public SCStatefulImgConfig setSelectedDown(java.lang.String SelectedDown)

      Image to display when the component is `selected` on `mouse down`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Parameters:
        `SelectedDown` - New SelectedDown value. Default value is null
      Returns:
        `SCStatefulImgConfig` instance, for chaining setter calls

    - #### getSelectedDown

          public java.lang.String getSelectedDown()

      Image to display when the component is `selected` on `mouse down`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Returns:
        Current SelectedDown value. Default value is null

    - #### setSelectedFocused

          public SCStatefulImgConfig setSelectedFocused(java.lang.String SelectedFocused)

      Image to display when the component is `selected` and `focused`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Parameters:
        `SelectedFocused` - New SelectedFocused value. Default value is null
      Returns:
        `SCStatefulImgConfig` instance, for chaining setter calls

    - #### getSelectedFocused

          public java.lang.String getSelectedFocused()

      Image to display when the component is `selected` and `focused`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Returns:
        Current SelectedFocused value. Default value is null

    - #### setSelectedFocusedDown

          public SCStatefulImgConfig setSelectedFocusedDown(java.lang.String SelectedFocusedDown)

      Image to display when the component is `selected` and `focused` on `mouse down`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Parameters:
        `SelectedFocusedDown` - New SelectedFocusedDown value. Default value is null
      Returns:
        `SCStatefulImgConfig` instance, for chaining setter calls

    - #### getSelectedFocusedDown

          public java.lang.String getSelectedFocusedDown()

      Image to display when the component is `selected` and `focused` on `mouse down`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Returns:
        Current SelectedFocusedDown value. Default value is null

    - #### setSelectedFocusedOver

          public SCStatefulImgConfig setSelectedFocusedOver(java.lang.String SelectedFocusedOver)

      Image to display when the component is `selected` and `focused` on `roll over`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Parameters:
        `SelectedFocusedOver` - New SelectedFocusedOver value. Default value is null
      Returns:
        `SCStatefulImgConfig` instance, for chaining setter calls

    - #### getSelectedFocusedOver

          public java.lang.String getSelectedFocusedOver()

      Image to display when the component is `selected` and `focused` on `roll over`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Returns:
        Current SelectedFocusedOver value. Default value is null

    - #### setSelectedOver

          public SCStatefulImgConfig setSelectedOver(java.lang.String SelectedOver)

      Image to display when the component is `selected` on `roll over`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Parameters:
        `SelectedOver` - New SelectedOver value. Default value is null
      Returns:
        `SCStatefulImgConfig` instance, for chaining setter calls

    - #### getSelectedOver

          public java.lang.String getSelectedOver()

      Image to display when the component is `selected` on `roll over`.

      May be specified as

      - A `SCImgURL` indicating the media to load
      - A reference to another entry in this SCStatefulImgConfig via the format `"#state:otherStateName"`
      - A modifier to apply to the `_base` media via the format `"#modifier:modifierString"`
      See `SCStatefulImgConfig overview` for further information.
      Returns:
        Current SelectedOver value. Default value is null