com.smartgwt.client.widgets

## Class StretchItem

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

-     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 and Description
    `StretchItem()`
    `StretchItem(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `StretchItem(java.lang.String name, int width, int height)`
    `StretchItem(java.lang.String name, int width, java.lang.String height)`
    `StretchItem(java.lang.String name, java.lang.String width, int height)`
    `StretchItem(java.lang.String name, java.lang.String width, java.lang.String height)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `getHeight()` The height of the image.
    `java.lang.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(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `java.lang.String` | `getSrc()` The URL of the media file for this StretchItem.
    `java.lang.Object` | `getWidth()` The width of the image.
    `void` | `setHeight(int height)` The height of the image.
    `void` | `setHeight(java.lang.String height)` The height of the image.
    `void` | `setName(java.lang.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.
    `void` | `setSrc(java.lang.String src)` The URL of the media file for this StretchItem.
    `void` | `setWidth(int width)` The width of the image.
    `void` | `setWidth(java.lang.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, 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

    - #### StretchItem

          public StretchItem()

    - #### StretchItem

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

    - #### StretchItem

          public StretchItem(java.lang.String name,
                     int width,
                     int height)

    - #### StretchItem

          public StretchItem(java.lang.String name,
                     int width,
                     java.lang.String height)

    - #### StretchItem

          public StretchItem(java.lang.String name,
                     java.lang.String width,
                     int height)

    - #### StretchItem

          public StretchItem(java.lang.String name,
                     java.lang.String width,
                     java.lang.String height)

  - ### Method Detail

    - #### getOrCreateRef

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

    - #### setHeight

          public void 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 (`vertical` is true).

      Parameters:
        `height` - Default value is -1

    - #### setHeight

          public void setHeight(java.lang.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 (`vertical` is true).

      Parameters:
        `height` - Default value is -1

    - #### setName

          public void setName(java.lang.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 `src` of "button.png" and a name of "stretch", the resulting URL would be "button_Over_stretch.png".

      Parameters:
        `name` - Default value is null

    - #### getName

          public java.lang.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 `src` of "button.png" and a name of "stretch", the resulting URL would be "button_Over_stretch.png".

      Returns:
        String

    - #### setSrc

          public void setSrc(java.lang.String src)

      The URL of the media file for this StretchItem.
      Parameters:
        `src` - See `SCImgURL` . Default value is null

    - #### getSrc

          public java.lang.String getSrc()

      The URL of the media file for this StretchItem.
      Returns:
        See `SCImgURL`

    - #### setWidth

          public void 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 (`vertical` is false).

      Parameters:
        `width` - Default value is -1

    - #### setWidth

          public void setWidth(java.lang.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 (`vertical` is false).

      Parameters:
        `width` - Default value is -1

    - #### getWidth

          public java.lang.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 java.lang.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