Package com.smartgwt.client.widgets

# Class StretchItem

java.lang.Object
com.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.widgets.StretchItem

All Implemented Interfaces:
  `HasHandlers`

public class StretchItem extends DataClass
An object representing one of the image segments displayed by a `StretchImg`. Each item of a StretchImg's `items` array is a StretchItem.

- ## 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
  Description
  `StretchItem()`
  `StretchItem(JavaScriptObject jsObj)`
  `StretchItem(String name, int width, int height)`
  `StretchItem(String name, int width, String height)`
  `StretchItem(String name, String width, int height)`
  `StretchItem(String name, String width, String height)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `getHeight()`
  The height of the image.
  `String`
  `getHSrc()`
  The URL of the media file for this StretchItem if the parent `StretchImg` is `not vertical` and `src` is unset.
  `String`
  `getName()`
  A string that is appended as a suffix to the StretchImg's `src` URL in order to fetch the media file for this StretchItem, if a separate `src` is not provided.
  `static StretchItem`
  `getOrCreateRef(JavaScriptObject jsObj)`
  `String`
  `getSrc()`
  The URL of the media file for this StretchItem.
  `String`
  `getVSrc()`
  The URL of the media file for this StretchItem if the parent `StretchImg` is `vertical` and `src` is unset.
  `Object`
  `getWidth()`
  The width of the image.
  `StretchItem`
  `setHeight(int height)`
  The height of the image.
  `StretchItem`
  `setHeight(String height)`
  The height of the image.
  `StretchItem`
  `setHSrc(String hSrc)`
  The URL of the media file for this StretchItem if the parent `StretchImg` is `not vertical` and `src` is unset.
  `StretchItem`
  `setName(String name)`
  A string that is appended as a suffix to the StretchImg's `src` URL in order to fetch the media file for this StretchItem, if a separate `src` is not provided.
  `StretchItem`
  `setSrc(String src)`
  The URL of the media file for this StretchItem.
  `StretchItem`
  `setVSrc(String vSrc)`
  The URL of the media file for this StretchItem if the parent `StretchImg` is `vertical` and `src` is unset.
  `StretchItem`
  `setWidth(int width)`
  The width of the image.
  `StretchItem`
  `setWidth(String width)`
  The width of the image.

  ### 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

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

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

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

- ## Constructor Details

  - ### StretchItem

    public StretchItem()

  - ### StretchItem

    public StretchItem(JavaScriptObject jsObj)

  - ### StretchItem

    public StretchItem(String name, int width, int height)

  - ### StretchItem

    public StretchItem(String name, int width, String height)

  - ### StretchItem

    public StretchItem(String name, String width, int height)

  - ### StretchItem

    public StretchItem(String name, String width, String height)

- ## Method Details

  - ### getOrCreateRef

    public static StretchItem getOrCreateRef(JavaScriptObject jsObj)

  - ### setHeight

    public StretchItem setHeight(int height)
    The height of the image. This can either be a number (for the number of pixels tall), the string "*" (remaining space, divided amongst all items that specify height:"*"), or the name of a property on the StretchImg component, such as "capSize" for the StretchImg's `capSize`.

    NOTE: The height is only used if the StretchImg stacks its images vertically (`StretchImg.vertical` is true).

    Parameters:
      `height` - New height value. Default value is null
    Returns:
      `StretchItem` instance, for chaining setter calls

  - ### setHeight

    public StretchItem setHeight(String height)
    The height of the image. This can either be a number (for the number of pixels tall), the string "*" (remaining space, divided amongst all items that specify height:"*"), or the name of a property on the StretchImg component, such as "capSize" for the StretchImg's `capSize`.

    NOTE: The height is only used if the StretchImg stacks its images vertically (`StretchImg.vertical` is true).

    Parameters:
      `height` - New height value. Default value is null
    Returns:
      `StretchItem` instance, for chaining setter calls

  - ### setHSrc

    public StretchItem setHSrc(String hSrc)
    The URL of the media file for this StretchItem if the parent `StretchImg` is `not vertical` and `src` is unset.
    Parameters:
      `hSrc` - New hSrc value. Default value is null
    Returns:
      `StretchItem` instance, for chaining setter calls
    See Also:
      - `SCImgURL`

  - ### getHSrc

    public String getHSrc()
    The URL of the media file for this StretchItem if the parent `StretchImg` is `not vertical` and `src` is unset.
    Returns:
      Current hSrc value. Default value is null
    See Also:
      - `SCImgURL`

  - ### setName

    public StretchItem setName(String name)
    A string that is appended as a suffix to the StretchImg's `src` URL in order to fetch the media file for this StretchItem, if a separate `src` is not provided. Note that the special name "blank", possibly suffixed by one or more digits which are used to differentiate blank items, means no image will be shown for this StretchItem.

    For example, for a StretchImg in "Over" state with a `StretchImg.src` of "button.png" and a name of "stretch", the resulting URL would be "button_Over_stretch.png".

    Parameters:
      `name` - New name value. Default value is null
    Returns:
      `StretchItem` instance, for chaining setter calls

  - ### getName

    public String getName()
    A string that is appended as a suffix to the StretchImg's `src` URL in order to fetch the media file for this StretchItem, if a separate `src` is not provided. Note that the special name "blank", possibly suffixed by one or more digits which are used to differentiate blank items, means no image will be shown for this StretchItem.

    For example, for a StretchImg in "Over" state with a `StretchImg.src` of "button.png" and a name of "stretch", the resulting URL would be "button_Over_stretch.png".

    Returns:
      Current name value. Default value is null

  - ### setSrc

    public StretchItem setSrc(String src)
    The URL of the media file for this StretchItem.
    Parameters:
      `src` - New src value. Default value is null
    Returns:
      `StretchItem` instance, for chaining setter calls
    See Also:
      - `SCImgURL`

  - ### getSrc

    public String getSrc()
    The URL of the media file for this StretchItem.
    Returns:
      Current src value. Default value is null
    See Also:
      - `SCImgURL`

  - ### setVSrc

    public StretchItem setVSrc(String vSrc)
    The URL of the media file for this StretchItem if the parent `StretchImg` is `vertical` and `src` is unset.
    Parameters:
      `vSrc` - New vSrc value. Default value is null
    Returns:
      `StretchItem` instance, for chaining setter calls
    See Also:
      - `SCImgURL`

  - ### getVSrc

    public String getVSrc()
    The URL of the media file for this StretchItem if the parent `StretchImg` is `vertical` and `src` is unset.
    Returns:
      Current vSrc value. Default value is null
    See Also:
      - `SCImgURL`

  - ### setWidth

    public StretchItem setWidth(int width)
    The width of the image. This can either be a number (for the number of pixels wide), the string "*" (remaining space, divided amongst all items that specify width:"*"), or the name of a property on the StretchImg component, such as "capSize" for the StretchImg's `capSize`.

    NOTE: The width is only used if the StretchImg stacks its images horizontally (`StretchImg.vertical` is false).

    Parameters:
      `width` - New width value. Default value is null
    Returns:
      `StretchItem` instance, for chaining setter calls

  - ### setWidth

    public StretchItem setWidth(String width)
    The width of the image. This can either be a number (for the number of pixels wide), the string "*" (remaining space, divided amongst all items that specify width:"*"), or the name of a property on the StretchImg component, such as "capSize" for the StretchImg's `capSize`.

    NOTE: The width is only used if the StretchImg stacks its images horizontally (`StretchImg.vertical` is false).

    Parameters:
      `width` - New width value. Default value is null
    Returns:
      `StretchItem` instance, for chaining setter calls

  - ### getWidth

    public Object getWidth()
    The width of the image. This can either be a number (for the number of pixels wide), the string "*" (remaining space, divided amongst all items that specify width:"*"), or the name of a property on the StretchImg component, such as "capSize" for the StretchImg's `capSize`.

    NOTE: The width is only used if the StretchImg stacks its images horizontally (`vertical` is false).

    Returns:
      Integer or String

  - ### getHeight

    public Object getHeight()
    The height of the image. This can either be a number (for the number of pixels tall), the string "*" (remaining space, divided amongst all items that specify height:"*"), or the name of a property on the StretchImg component, such as "capSize" for the StretchImg's `capSize`.

    NOTE: The height is only used if the StretchImg stacks its images vertically (`vertical` is true).

    Returns:
      Integer or String