com.smartgwt.client.widgets.layout

## Class SectionStackSection

- java.lang.Object
- - com.smartgwt.client.core.JsObject
  - - com.smartgwt.client.core.DataClass
    - - com.smartgwt.client.core.RefDataClass
      - - com.smartgwt.client.widgets.layout.SectionStackSection

-     public class SectionStackSection
      extends RefDataClass

  Section descriptor used by a SectionStack to describe a section of items which are shown or hidden together along with their associated header.

  A section header (see `sectionHeaderClass`) is created from this descriptor when the SectionStack is drawn. Any changes after creation must be made to the section header: `SectionStack.getSectionHeader`.

  Additional SectionHeader properties set on the SectionStackSection not explicitly documented such as "iconAlign" or "prompt" is supported - use `setAttribute()`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected SectionStack` | `stack` Once a SectionStackSection has been applied to a SectionStack, this method may be used to return a pointer to the SectionStack in which this section header is embedded.

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

      `id`

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

      `jsObj`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SectionStackSection()`
    `SectionStackSection(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `SectionStackSection(java.lang.String title)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addItem(Canvas item)`
    `java.lang.Boolean` | `getCanTabToHeader()` If true, the header for this Section will be included in the page's tab order for accessibility.
    `java.lang.Boolean` | `getClipTitle()` If the title for this section header is too large for the available space, should the title be clipped?
    `Canvas[]` | `getControls()`
    `java.lang.String` | `getIcon()` Base filename of the icon that represents open and closed states.
    `java.lang.String` | `getID()` Optional ID for the section.
    `Canvas[]` | `getItems()` Return the items in this SectionStackSection
    `java.lang.String` | `getName()` Identifier for the section.
    `static SectionStackSection` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `SectionHeader` | `getSectionHeader()` Once a SectionStackSection has been applied to a SectionStack, this method may be used to return a pointer to the SectionHeader for this section
    `SectionStack` | `getSectionStack()`
    `java.lang.Boolean` | `getShowClippedTitleOnHover()` If true and the title is clipped, then a hover containing the full title of this section header is enabled.
    `java.lang.String` | `getTitle()` Title to show for the section
    `void` | `setAriaRole(java.lang.String ariaRole)` Specify the ariaRole for this SectionStackSection.
    `void` | `setAriaState(java.lang.String stateName, java.lang.Object stateValue)` Specify an ariaState for this SectionStackSection.
    `void` | `setCanCollapse(java.lang.Boolean canCollapse)` This attribute controls whether or not the expand/collapse UI control is shown on the header of this section.
    `void` | `setCanDropBefore(java.lang.Boolean canDropBefore)` When explicitly set to false, disallows drop before this member in the Layout.
    `void` | `setCanReorder(java.lang.Boolean canReorder)` If set to false, then this sectionHeader will not be able to be dragged to perform a drag reorder, if `canReorderSections` is true.
    `void` | `setCanTabToHeader(java.lang.Boolean canTabToHeader)` If true, the header for this Section will be included in the page's tab order for accessibility.
    `void` | `setClipTitle(java.lang.Boolean clipTitle)` If the title for this section header is too large for the available space, should the title be clipped?
    `void` | `setControls(Canvas... controls)` Custom controls to be shown on top of this section header.
    `void` | `setExpanded(java.lang.Boolean expanded)` Sections default to the collapsed state unless `showHeader` is set to `false` in which case they default to the expanded state.
    `void` | `setHidden(java.lang.Boolean hidden)` Sections default to the visible state.
    `void` | `setIcon(java.lang.String icon)` Base filename of the icon that represents open and closed states.
    `void` | `setID(java.lang.String ID)` Optional ID for the section.
    `void` | `setItems(Canvas... items)` List of Canvases that constitute the section.
    `void` | `setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `void` | `setName(java.lang.String name)` Identifier for the section.
    `void` | `setResizeable(java.lang.Boolean resizeable)` If set to false, then the items in this section will not be resized by sectionHeader repositioning.
    `void` | `setShowClippedTitleOnHover(java.lang.Boolean showClippedTitleOnHover)` If true and the title is clipped, then a hover containing the full title of this section header is enabled.
    `void` | `setShowHeader(java.lang.Boolean showHeader)` If true, a header will be shown for this section.
    `void` | `setTitle(java.lang.String title)` Title to show for the section
    `void` | `setTitleHoverFormatter(TitleHoverFormatter formatter)` Provide a custom implementation of `SectionHeader.titleHoverHTML(java.lang.String)`.

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

      `getRef, getRef, internalSetID`

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

      `doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, getJsObj, 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`

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

      `equals, hashCode, isCreated, setJsObj`

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

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

- - ### Field Detail

    - #### stack

          protected SectionStack stack

      Once a SectionStackSection has been applied to a SectionStack, this method may be used to return a pointer to the SectionStack in which this section header is embedded.

  - ### Constructor Detail

    - #### SectionStackSection

          public SectionStackSection()

    - #### SectionStackSection

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

    - #### SectionStackSection

          public SectionStackSection(java.lang.String title)

  - ### Method Detail

    - #### getOrCreateRef

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

    - #### setJavaScriptObject

          public void setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### setCanCollapse

          public void setCanCollapse(java.lang.Boolean canCollapse)

      This attribute controls whether or not the expand/collapse UI control is shown on the header of this section. Any section can still be expanded/collapsed programmatically, regardless of this setting.
      Parameters:
        `canCollapse` - canCollapse Default value is true
      See Also:
        Expand / Collapse Example

    - #### setCanDropBefore

          public void setCanDropBefore(java.lang.Boolean canDropBefore)

      When explicitly set to false, disallows drop before this member in the Layout.
      Parameters:
        `canDropBefore` - canDropBefore Default value is null
      See Also:
        `Layout`, `LayoutMember overview and related methods`

    - #### setCanReorder

          public void setCanReorder(java.lang.Boolean canReorder)

      If set to false, then this sectionHeader will not be able to be dragged to perform a drag reorder, if `canReorderSections` is true. You can also disable dropping other sections before this one by setting `canDropBefore` to false.
      Parameters:
        `canReorder` - canReorder Default value is null

    - #### setCanTabToHeader

          public void setCanTabToHeader(java.lang.Boolean canTabToHeader)

      If true, the header for this Section will be included in the page's tab order for accessibility. May also be set at the `SectionStack` level via `canTabToHeaders`.

      See `Accessibility`.

      Parameters:
        `canTabToHeader` - canTabToHeader Default value is null

    - #### getCanTabToHeader

          public java.lang.Boolean getCanTabToHeader()

      If true, the header for this Section will be included in the page's tab order for accessibility. May also be set at the `SectionStack` level via `canTabToHeaders`.

      See `Accessibility`.

      Returns:
        Boolean

    - #### setClipTitle

          public void setClipTitle(java.lang.Boolean clipTitle)

      If the title for this section header is too large for the available space, should the title be clipped?

      This feature is supported only in browsers that support the CSS UI text-overflow property (IE6+, Firefox 7+, Safari, Chrome, Opera 9+).

      Parameters:
        `clipTitle` - clipTitle Default value is true

    - #### getClipTitle

          public java.lang.Boolean getClipTitle()

      If the title for this section header is too large for the available space, should the title be clipped?

      This feature is supported only in browsers that support the CSS UI text-overflow property (IE6+, Firefox 7+, Safari, Chrome, Opera 9+).

      Returns:
        Boolean

    - #### setIcon

          public void setIcon(java.lang.String icon)

      Base filename of the icon that represents open and closed states. The default settings also change the icon for disabled sections, so a total of four images are required (opened, closed, Disabled_opened, Disabled_closed).

      Not shown if `canCollapse` is false.

      Parameters:
        `icon` - . See `SCImgURL`. Default value is "[SKIN]SectionHeader/opener.gif"

    - #### getIcon

          public java.lang.String getIcon()

      Base filename of the icon that represents open and closed states. The default settings also change the icon for disabled sections, so a total of four images are required (opened, closed, Disabled_opened, Disabled_closed).

      Not shown if `canCollapse` is false.

      Returns:
        . See `SCImgURL`

    - #### setName

          public void setName(java.lang.String name)

      Identifier for the section. This can be used later in calls to `SectionStack` APIs such as `SectionStack.expandSection` and `SectionStack.collapseSection`. Note that if no name is specified for the section, one will be auto-generated when the section is created. This property should be a string which may be used as a valid JavaScript identifier (should start with a letter and not contain space or special characters such as "*").
      Parameters:
        `name` - . See `String`. Default value is null

    - #### getName

          public java.lang.String getName()

      Identifier for the section. This can be used later in calls to `SectionStack` APIs such as `SectionStack.expandSection` and `SectionStack.collapseSection`. Note that if no name is specified for the section, one will be auto-generated when the section is created. This property should be a string which may be used as a valid JavaScript identifier (should start with a letter and not contain space or special characters such as "*").
      Returns:
        . See `String`

    - #### setResizeable

          public void setResizeable(java.lang.Boolean resizeable)

      If set to false, then the items in this section will not be resized by sectionHeader repositioning. You may also set this flag directly on any of the items in any section to cause that item to not be resizeable.
      Parameters:
        `resizeable` - resizeable Default value is null
      See Also:
        Resize Sections Example

    - #### setShowClippedTitleOnHover

          public void setShowClippedTitleOnHover(java.lang.Boolean showClippedTitleOnHover)

      If true and the title is clipped, then a hover containing the full title of this section header is enabled.
      Parameters:
        `showClippedTitleOnHover` - showClippedTitleOnHover Default value is true

    - #### getShowClippedTitleOnHover

          public java.lang.Boolean getShowClippedTitleOnHover()

      If true and the title is clipped, then a hover containing the full title of this section header is enabled.
      Returns:
        Boolean

    - #### setShowHeader

          public void setShowHeader(java.lang.Boolean showHeader)

      If true, a header will be shown for this section. If false, no header will be shown.
      Parameters:
        `showHeader` - showHeader Default value is true

    - #### setTitle

          public void setTitle(java.lang.String title)

      Title to show for the section
      Parameters:
        `title` - title Default value is null

    - #### getTitle

          public java.lang.String getTitle()

      Title to show for the section
      Returns:
        String

    - #### setExpanded

          public void setExpanded(java.lang.Boolean expanded)

      Sections default to the collapsed state unless `showHeader` is set to `false` in which case they default to the expanded state. This attribute allows you to explicitly control the expand/collapse state of the section by overriding the above default behavior.
      Parameters:
        `expanded` - expanded Default value is false

    - #### setHidden

          public void setHidden(java.lang.Boolean hidden)

      Sections default to the visible state. This attribute allows you to explicitly control the visible/hidden state of the section by overriding the above default behavior.
      Parameters:
        `hidden` - hidden Default value is false

    - #### setItems

          public void setItems(Canvas... items)

      List of Canvases that constitute the section. These Canvases will be shown and hidden together.
      Parameters:
        `items` - list of Canvases that constitute the section

    - #### getItems

          public Canvas[] getItems()

      Return the items in this SectionStackSection
      Returns:
        the items in this SectionStackSection

    - #### addItem

          public void addItem(Canvas item)

    - #### setControls

          public void setControls(Canvas... controls)

      Custom controls to be shown on top of this section header. Note this property can not be updated once the SectionStackSection has been applied applied to a live SectionStack and initialized in the Browser.

      If you need to dynamically change what controls are displayed to the user, we would recommend embedding the controls in a Layout or similar container. This will allow you to show/hide or add/remove members at runtime by manipulating the existing control(s) set up at init time.

      Parameters:
        `controls` -

    - #### getControls

          public Canvas[] getControls()

    - #### getSectionStack

          public SectionStack getSectionStack()

    - #### getSectionHeader

          public SectionHeader getSectionHeader()

      Once a SectionStackSection has been applied to a SectionStack, this method may be used to return a pointer to the SectionHeader for this section
      Returns:
        the SectionHeader for the section

    - #### getID

          public java.lang.String getID()

      Optional ID for the section. If `useGlobalSectionIDs` is true, this property will be applied to the generated SectionStackHeader widget as a standard widget ID, meaning it should be unique within a page.

      Backcompat Note: Section stack sections may be uniquely identified within a stack via the `name` attribute (introduced in Jan 2010). Prior to this, the section ID attribute was used in this way (and would not be applied to the section header as a widget ID). For backwards compatibility this is still supported: If `section.name` is unspecified for a section but `section.ID` is set, the ID will be used as a default name attribute for the section. For backwards compatibility we also disable the standard behavior of having the `section.ID` being applied to the generated section header (thereby avoiding the page-level uniqueness requirement) by defaulting `useGlobalSectionIDs` to false.

      Returns:
        String

    - #### setID

          public void setID(java.lang.String ID)

      Optional ID for the section. If `useGlobalSectionIDs` is true, this property will be applied to the generated SectionStackHeader widget as a standard widget ID, meaning it should be unique within a page.

      Backcompat Note: Section stack sections may be uniquely identified within a stack via the `name` attribute (introduced in Jan 2010). Prior to this, the section ID attribute was used in this way (and would not be applied to the section header as a widget ID). For backwards compatibility this is still supported: If `section.name` is unspecified for a section but `section.ID` is set, the ID will be used as a default name attribute for the section. For backwards compatibility we also disable the standard behavior of having the `section.ID` being applied to the generated section header (thereby avoiding the page-level uniqueness requirement) by defaulting `useGlobalSectionIDs` to false.

      Parameters:
        `ID` - ID Default value is null

    - #### setAriaRole

          public void setAriaRole(java.lang.String ariaRole)

      Specify the ariaRole for this SectionStackSection. This role will be applied to the SectionHeader for the section. See `Accessibility`
      Parameters:
        `ariaRole` -

    - #### setAriaState

          public void setAriaState(java.lang.String stateName,
                          java.lang.Object stateValue)

      Specify an ariaState for this SectionStackSection. This state will be applied to the SectionHeader for the section. See `Accessibility`
      Parameters:
        `stateName` -
        `stateValue` -

    - #### setTitleHoverFormatter

          public void setTitleHoverFormatter(TitleHoverFormatter formatter)

      Provide a custom implementation of `SectionHeader.titleHoverHTML(java.lang.String)`.