Class SectionStackSection
- All Implemented Interfaces:
HasHandlers
A SectionStackSection
can't be modified once it's been added to a SectionStack
, which creates its section header (by default a SectionHeader
, but see SectionStack.sectionHeaderClass
). After that,
you must call the appropriate SectionStack
method to modify a section property, or the section header
getter method to get the updated property value. As a convenience, we route several SectionStackSection
setter methods to the SectionStack
for you after the
SectionStackSection
has been added to it, but with the exception of items
, you'll always get the original property values
when calling a getter directly on a SectionStackSection
.
Additional SectionHeader properties set on the
SectionStackSection not explicitly documented, such as "iconAlign" or "prompt", are supported - use
setAttribute()
.
-
Field Summary
Modifier and TypeFieldDescriptionprotected SectionStack
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.DataClass
factoryCreated, factoryProperties
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a new Canvas to this section, at the end.Is this section closeable?If true, the header for this Section will be included in the page's tab order for accessibility.If the title for this section header is too large for the available space, should the title be clipped?Icon src for theclose button
ifcanClose
is true.Pixel width/height for this sectionscloseIcon
.
If unsetSectionStack.closeSectionIconSize
will be used.Canvas[]
Custom controls to be shown on top of this section header.Allows properties for the header (aSectionHeader
orImgSectionHeader
subclass) to be set on the section before it's added to theSectionStack
.Allows properties for the header (aSectionHeader
orImgSectionHeader
subclass) to be set on the section before it's added to theSectionStack
.getIcon()
Base filename of the icon that represents open and closed states.getID()
Optional ID for the section.Canvas[]
getItems()
Return the items in this SectionStackSectiongetName()
Identifier for the section.static SectionStackSection
getOrCreateRef
(JavaScriptObject jsObj) Once a SectionStackSection has been applied to a SectionStack, this method may be used to return a pointer to the SectionHeader for this sectionIf true and the title is clipped, then a hover containing the full title of this section header is enabled.getTitle()
Title to show for the sectionvoid
setAriaRole
(String ariaRole) Specify the ariaRole for this SectionStackSection.void
setAriaState
(String stateName, Object stateValue) Specify an ariaState for this SectionStackSection.setCanClose
(Boolean canClose) Is this section closeable?setCanCollapse
(Boolean canCollapse) This attribute controls whether or not the expand/collapse UI control is shown on the header of this section.setCanDropBefore
(Boolean canDropBefore) When explicitly set to false, disallows drop before this member in the Layout.setCanReorder
(Boolean canReorder) If set to false, then this sectionHeader will not be able to be dragged to perform a drag reorder, ifSectionStack.canReorderSections
is true.setCanTabToHeader
(Boolean canTabToHeader) If true, the header for this Section will be included in the page's tab order for accessibility.setClipTitle
(Boolean clipTitle) If the title for this section header is too large for the available space, should the title be clipped?setCloseIcon
(String closeIcon) Icon src for theclose button
ifcanClose
is true.setCloseIconSize
(Integer closeIconSize) Pixel width/height for this sectionscloseIcon
.
If unsetSectionStack.closeSectionIconSize
will be used.setControls
(Canvas... controls) Custom controls to be shown on top of this section header.setDestroyOnRemove
(Boolean destroyOnRemove) void
setExpanded
(Boolean expanded) Sections default to the collapsed state unlessshowHeader
is set tofalse
in which case they default to the expanded state.setHeaderProperties
(ImgSectionHeader headerProperties) Allows properties for the header (aSectionHeader
orImgSectionHeader
subclass) to be set on the section before it's added to theSectionStack
.setHeaderProperties
(SectionHeader headerProperties) Allows properties for the header (aSectionHeader
orImgSectionHeader
subclass) to be set on the section before it's added to theSectionStack
.void
Sections default to the visible state.Base filename of the icon that represents open and closed states.void
Optional ID for the section.void
Assign a new set of Canvases to this section.Identifier for the section.setResizeable
(Boolean resizeable) If set to false, then the items in this section will not be resized by sectionHeader repositioning.setShowClippedTitleOnHover
(Boolean showClippedTitleOnHover) If true and the title is clipped, then a hover containing the full title of this section header is enabled.setShowHeader
(Boolean showHeader) If true, a header will be shown for this section.void
Title to show for the sectionvoid
setTitleHoverFormatter
(TitleHoverFormatter formatter) Provide a custom implementation ofSectionHeader.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
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
-
Field Details
-
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 Details
-
SectionStackSection
public SectionStackSection() -
SectionStackSection
-
SectionStackSection
-
-
Method Details
-
getOrCreateRef
-
setCanClose
Is this section closeable?Closeable sections show a
SectionStack.closeSectionButton
which will invokeSectionStack.closeSection()
when clicked.This property overrides the default
SectionStack.canCloseSections
setting.- Parameters:
canClose
- New canClose value. Default value is null- Returns:
SectionStackSection
instance, for chaining setter calls
-
getCanClose
Is this section closeable?Closeable sections show a
SectionStack.closeSectionButton
which will invokeSectionStack.closeSection()
when clicked.This property overrides the default
SectionStack.canCloseSections
setting.- Returns:
- Current canClose value. Default value is null
-
setCanCollapse
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
- New canCollapse value. Default value is true- Returns:
SectionStackSection
instance, for chaining setter calls- See Also:
-
setCanDropBefore
When explicitly set to false, disallows drop before this member in the Layout.- Parameters:
canDropBefore
- New canDropBefore value. Default value is null- Returns:
SectionStackSection
instance, for chaining setter calls- See Also:
-
setCanReorder
If set to false, then this sectionHeader will not be able to be dragged to perform a drag reorder, ifSectionStack.canReorderSections
is true. You can also disable dropping other sections before this one by settingcanDropBefore
to false.- Parameters:
canReorder
- New canReorder value. Default value is null- Returns:
SectionStackSection
instance, for chaining setter calls
-
setCanTabToHeader
If true, the header for this Section will be included in the page's tab order for accessibility. May also be set at theSectionStack
level viaSectionStack.canTabToHeaders
.See
Accessibility
.- Parameters:
canTabToHeader
- New canTabToHeader value. Default value is null- Returns:
SectionStackSection
instance, for chaining setter calls
-
getCanTabToHeader
If true, the header for this Section will be included in the page's tab order for accessibility. May also be set at theSectionStack
level viaSectionStack.canTabToHeaders
.See
Accessibility
.- Returns:
- Current canTabToHeader value. Default value is null
-
setClipTitle
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
- New clipTitle value. Default value is true- Returns:
SectionStackSection
instance, for chaining setter calls
-
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:
- Current clipTitle value. Default value is true
-
setCloseIcon
Icon src for theclose button
ifcanClose
is true.If specified this takes precedence over
SectionStack.closeSectionIcon
.- Parameters:
closeIcon
- New closeIcon value. Default value is null- Returns:
SectionStackSection
instance, for chaining setter calls- See Also:
-
getCloseIcon
Icon src for theclose button
ifcanClose
is true.If specified this takes precedence over
SectionStack.closeSectionIcon
.- Returns:
- Current closeIcon value. Default value is null
- See Also:
-
setCloseIconSize
Pixel width/height for this sectionscloseIcon
.
If unsetSectionStack.closeSectionIconSize
will be used.- Parameters:
closeIconSize
- New closeIconSize value. Default value is null- Returns:
SectionStackSection
instance, for chaining setter calls
-
getCloseIconSize
Pixel width/height for this sectionscloseIcon
.
If unsetSectionStack.closeSectionIconSize
will be used.- Returns:
- Current closeIconSize value. Default value is null
-
setControls
Custom controls to be shown on top of this section header.These controls are shown in the
SectionHeader.controlsLayout
.Note that this is an init-time property. 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.
For
canClose:true
sections, aclose icon
will be added to the section controls automatically.- Parameters:
controls
- New controls value. Default value is null- Returns:
SectionStackSection
instance, for chaining setter calls- See Also:
-
getControls
Custom controls to be shown on top of this section header.These controls are shown in the
SectionHeader.controlsLayout
.Note that this is an init-time property. 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.
For
canClose:true
sections, aclose icon
will be added to the section controls automatically.- Returns:
- Current controls value. Default value is null
- See Also:
-
setDestroyOnRemove
Should theitems
bedestroyed
if this section isremoved
? The section header itself and any controls will always be destroyed.- Parameters:
destroyOnRemove
- New destroyOnRemove value. Default value is false- Returns:
SectionStackSection
instance, for chaining setter calls
-
setHeaderProperties
Allows properties for the header (aSectionHeader
orImgSectionHeader
subclass) to be set on the section before it's added to theSectionStack
.- Parameters:
headerProperties
- New headerProperties value. Default value is null- Returns:
SectionStackSection
instance, for chaining setter calls- See Also:
-
getHeaderProperties
Allows properties for the header (aSectionHeader
orImgSectionHeader
subclass) to be set on the section before it's added to theSectionStack
.- Returns:
- Current headerProperties value. Default value is null
- See Also:
-
setHeaderProperties
Allows properties for the header (aSectionHeader
orImgSectionHeader
subclass) to be set on the section before it's added to theSectionStack
.- Parameters:
headerProperties
- New headerProperties value. Default value is null- Returns:
SectionStackSection
instance, for chaining setter calls- See Also:
-
getHeaderPropertiesAsImgSectionHeader
Allows properties for the header (aSectionHeader
orImgSectionHeader
subclass) to be set on the section before it's added to theSectionStack
.- Returns:
- Current headerProperties value. Default value is null
- See Also:
-
setIcon
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
- New icon value. Default value is "[SKIN]SectionHeader/opener.gif"- Returns:
SectionStackSection
instance, for chaining setter calls- See Also:
-
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:
- Current icon value. Default value is "[SKIN]SectionHeader/opener.gif"
- See Also:
-
setName
Identifier for the section. This can be used later in calls toSectionStack
APIs such asSectionStack.expandSection()
andSectionStack.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
- New name value. Default value is null- Returns:
SectionStackSection
instance, for chaining setter calls
-
getName
Identifier for the section. This can be used later in calls toSectionStack
APIs such asSectionStack.expandSection()
andSectionStack.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:
- Current name value. Default value is null
-
setResizeable
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
- New resizeable value. Default value is null- Returns:
SectionStackSection
instance, for chaining setter calls- See Also:
-
setShowClippedTitleOnHover
If true and the title is clipped, then a hover containing the full title of this section header is enabled.- Parameters:
showClippedTitleOnHover
- New showClippedTitleOnHover value. Default value is true- Returns:
SectionStackSection
instance, for chaining setter calls
-
getShowClippedTitleOnHover
If true and the title is clipped, then a hover containing the full title of this section header is enabled.- Returns:
- Current showClippedTitleOnHover value. Default value is true
-
setShowHeader
If true, a header will be shown for this section. If false, no header will be shown.- Parameters:
showHeader
- New showHeader value. Default value is true- Returns:
SectionStackSection
instance, for chaining setter calls
-
setTitle
Title to show for the section- Parameters:
title
- title Default value is null
-
getTitle
Title to show for the section- Returns:
- String
-
setExpanded
Sections default to the collapsed state unlessshowHeader
is set tofalse
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
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
Assign a new set of Canvases to this section. These Canvases will be shown and hidden together.- Parameters:
items
- list of Canvases that constitute the section
-
getItems
Return the items in this SectionStackSection- Returns:
- the items in this SectionStackSection
-
addItem
Adds a new Canvas to this section, at the end.- Parameters:
new
- Canvas to add as item
-
getSectionStack
-
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
Optional ID for the section. IfuseGlobalSectionIDs
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: Ifsection.name
is unspecified for a section butsection.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 thesection.ID
being applied to the generated section header (thereby avoiding the page-level uniqueness requirement) by defaultinguseGlobalSectionIDs
to false.- Returns:
- String
-
setID
Optional ID for the section. IfuseGlobalSectionIDs
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: Ifsection.name
is unspecified for a section butsection.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 thesection.ID
being applied to the generated section header (thereby avoiding the page-level uniqueness requirement) by defaultinguseGlobalSectionIDs
to false.- Parameters:
ID
- ID Default value is null
-
setAriaRole
Specify the ariaRole for this SectionStackSection. This role will be applied to the SectionHeader for the section. SeeAccessibility
- Parameters:
ariaRole
-
-
setAriaState
Specify an ariaState for this SectionStackSection. This state will be applied to the SectionHeader for the section. SeeAccessibility
- Parameters:
stateName
-stateValue
-
-
setTitleHoverFormatter
Provide a custom implementation ofSectionHeader.titleHoverHTML(java.lang.String)
.
-