public interface SCSpriteConfig extends SCImgURL
SCImgURLformat for specifying sprited image configuration.
See also the "spriting" discussion in the
In order to generate HTML to render a properly scaled image sprite from a composite image
file, this format allows developers to specify the image source, native size and
offset of the sprite within the image, and the desired drawn size for the image.
spriteConfigs have the following format:
"sprite:<image URL>;offset:<Left>,<Top>;size:<Width>,<Height>;cssClass:<className>"Where supported, the
sprite:prefix is used to identify a specified
SCImgURLas a sprited image.
SCImgURLdirectory prefixes such as "[SKIN]" can be included in this URL.
offset:properties should specify the pixel size and position of the sprite within the composite image. Again these are not required and can be specified directly in the css class using
cssClass:denotes the css class to apply to the sprite. This is also optional - a sprite can be specified with an image URL and explicit sizing and offset coordinates, in which case no css class is actually required.
Sprited image configuration and "stateful" images
Many image URLs in Smart GWT are "stateful", meaning that the actual URL used to fetch an image will vary according to the component's state (eg, "Disabled"), generally, by adding a suffix to the image URL.
Component image attributes which support "stateful" suffixes are not guaranteed to always support having their value set to a SCSpriteConfig string, as special handling is required both to ensure the stateful suffix is incorporated into the generated HTML correctly and that logic to update the images state at runtime handles this HTML being present in the DOM rather than a simple <img...> element.
Where these are supported they will be documented as such. The handling will in these cases is as follows:
"_"characters as described in
"_"characters), as with standard