com.smartgwt.client.widgets.layout
Class SectionStack

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.smartgwt.client.widgets.BaseWidget
              extended by com.smartgwt.client.widgets.Canvas
                  extended by com.smartgwt.client.widgets.layout.Layout
                      extended by com.smartgwt.client.widgets.layout.VLayout
                          extended by com.smartgwt.client.widgets.layout.SectionStack
All Implemented Interfaces:
HasHandlers, EventListener, HasClickHandlers, HasDoubleClickHandlers, HasDragMoveHandlers, HasDragRepositionMoveHandlers, HasDragRepositionStartHandlers, HasDragRepositionStopHandlers, HasDragResizeMoveHandlers, HasDragResizeStartHandlers, HasDragResizeStopHandlers, HasDragStartHandlers, HasDragStopHandlers, HasDropHandlers, HasDropMoveHandlers, HasDropOutHandlers, HasDropOverHandlers, HasFocusChangedHandlers, HasHoverHandlers, HasHoverHiddenHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseStillDownHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasResizedHandlers, HasRightMouseDownHandlers, HasScrolledHandlers, HasShowContextMenuHandlers, com.smartgwt.client.widgets.layout.events.HasSectionHeaderClickHandlers

public class SectionStack
extends VLayout
implements com.smartgwt.client.widgets.layout.events.HasSectionHeaderClickHandlers

A container that manages a list of sections of widgets, each with a header. Sometimes called an "Accordion".

SectionStack can be configured so that only one section is visible at a time (similar to MS Outlook's left-hand Nav), or to allow multiple sections to be visible and share the available space.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.smartgwt.client.widgets.BaseWidget
config, configOnly, id, isElementSet, scClassName
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
SectionStack()
           
SectionStack(JavaScriptObject jsObj)
           
 
Method Summary
 void addSection(SectionStackSection section)
          Add a section to the SectionStack.
 void addSection(SectionStackSection section, int position)
          Add a section to the SectionStack.
 HandlerRegistration addSectionHeaderClickHandler(com.smartgwt.client.widgets.layout.events.SectionHeaderClickHandler handler)
          Add a onSectionHeaderClick handler.
 void collapseSection(int index)
          Collapse a section.
 void collapseSection(String sectionID)
          Collapse a section.
protected  JavaScriptObject create()
           
 void expandSection(int index)
          Expands a section.
 void expandSection(String sectionID)
          Expands a section.
 Boolean getAnimateSections()
          If true, sections are animated during expand/collapse and addition/removal of SectionItems is likewise animated.
 Boolean getCanResizeSections()
          Whether sections can be drag resized by the user dragging the section header.
 Boolean getCanTabToHeaders()
          If true, the headers for the sections (if shown) will be included in the page's tab order for accessibility.
 int getHeaderHeight()
          Height of headers for sections.
 int getItemEndIndent()
          Size, in pixels, of indentation of all member items relative to the end of the alignment axis.
 int getItemIndent()
          Size, in pixels, of indentation of all member items.
 int getItemStartIndent()
          Size, in pixels, of indentation of all member items relative to the start of the alignment axis.
static SectionStack getOrCreateRef(JavaScriptObject jsObj)
           
 Overflow getOverflow()
          Normal Overflow settings can be used on layouts, for example, an overflow:auto Layout will scroll if sections are resized to exceed the specified size, whereas an overflow:visible Layout will grow to accomodate the resized sections.
 Boolean getScrollSectionIntoView()
          If an expanded or shown section expands past the current viewport and this property is true, then the viewport will auto-scroll to fit as much of the section content into the viewport without scrolling the top of the section out of the viewport.
 SectionStackSection getSection(int index)
          Return the SectionHeader for a section.
 SectionStackSection getSection(String sectionID)
          Return the SectionStackSection for a section.
 String getSectionHeaderClass()
          Name of the Canvas subclass to use as a header that labels the section and allows showing and hiding.
 int getSectionNumber(String sectionID)
          Returns the position of the specified section in the SectionStack.
 SectionStackSection[] getSections()
           
 Boolean getShowExpandControls()
          Whether to show the Expand/Collapse controls in the headers of sections.
 VisibilityMode getVisibilityMode()
          Whether multiple sections can be visible at once
 void hideSection(int index)
          Hides a section.
 void hideSection(String sectionID)
          Hides a section.
 void moveSection(int index, int position)
          Moves the specified section to a new position in the SectionStack order.
 void moveSection(String sectionID, int position)
          Moves the specified section to a new position in the SectionStack order.
 void removeSection(int index)
          Remove a section from the SectionStack.
 void removeSection(String sectionID)
          Remove a section from the SectionStack.
 void sectionHeaderClick(Canvas sectionHeader)
          Method intended to be called by the sectionHeader when it is clicked on.
 boolean sectionIsExpanded(int index)
          Returns true if the specified section is expanded, false if it is collapsed.
 boolean sectionIsExpanded(String sectionID)
          Returns true if the specified section is expanded, false if it is collapsed.
 boolean sectionIsVisible(int index)
          Returns true if the specified section is visible, false if it is not.
 boolean sectionIsVisible(String sectionID)
          Returns true if the specified section is visible, false if it is not.
 void setAnimateSections(Boolean animateSections)
          If true, sections are animated during expand/collapse and addition/removal of SectionItems is likewise animated.
 void setCanResizeSections(Boolean canResizeSections)
          Whether sections can be drag resized by the user dragging the section header.
 void setCanTabToHeaders(Boolean canTabToHeaders)
          If true, the headers for the sections (if shown) will be included in the page's tab order for accessibility.
 void setHeaderHeight(int headerHeight)
          Height of headers for sections.
 void setItemEndIndent(int itemEndIndent)
          Size, in pixels, of indentation of all member items relative to the end of the alignment axis.
 void setItemIndent(int itemIndent)
          Size, in pixels, of indentation of all member items.
 void setItemStartIndent(int itemStartIndent)
          Size, in pixels, of indentation of all member items relative to the start of the alignment axis.
 void setOverflow(Overflow overflow)
          Normal Overflow settings can be used on layouts, for example, an overflow:auto Layout will scroll if sections are resized to exceed the specified size, whereas an overflow:visible Layout will grow to accomodate the resized sections.
 void setScrollSectionIntoView(Boolean scrollSectionIntoView)
          If an expanded or shown section expands past the current viewport and this property is true, then the viewport will auto-scroll to fit as much of the section content into the viewport without scrolling the top of the section out of the viewport.
 void setSectionHeaderClass(String sectionHeaderClass)
          Name of the Canvas subclass to use as a header that labels the section and allows showing and hiding.
 void setSectionProperties(int section, SectionStackSection properties)
          Set arbitrary properties for a particular section in this SectionStack.
 void setSectionProperties(String section, SectionStackSection properties)
          Set arbitrary properties for a particular section in this SectionStack.
 void setSections(SectionStackSection... sections)
           
 void setSectionTitle(int index, String newTitle)
          Changes the title of a Section Header.
 void setSectionTitle(String sectionID, String newTitle)
          Changes the title of a Section Header.
 void setShowExpandControls(Boolean showExpandControls)
          Whether to show the Expand/Collapse controls in the headers of sections.
 void setVisibilityMode(VisibilityMode visibilityMode)
          Whether multiple sections can be visible at once
 void showSection(int index)
          Shows a section.
 void showSection(String sectionID)
          Shows a section.
 
Methods inherited from class com.smartgwt.client.widgets.layout.Layout
addMember, addMember, addMember, addMember, addMemberPostCreate, addMemberPostCreate, addMemberPreCreate, addMemberPreCreate, getAnimateMembers, getAnimateMemberTime, getCanDropComponents, getDefaultResizeBars, getDropComponent, getDropLineThickness, getDropPosition, getEnforcePolicy, getHPolicy, getLayoutBottomMargin, getLayoutLeftMargin, getLayoutMargin, getLayoutRightMargin, getLayoutTopMargin, getLeaveScrollbarGap, getManagePercentBreadth, getMember, getMember, getMemberDefaultBreadth, getMemberNumber, getMemberNumber, getMemberOffset, getMemberOverlap, getMembers, getMembersMargin, getMinMemberSize, getPaddingAsLayoutMargin, getResizeBarClass, getResizeBarSize, getReverseOrder, getShowDragPlaceHolder, getStackZIndex, getVertical, getVPolicy, hasMember, hideDropLine, hideMember, hideMember, membersChanged, onInit, reflow, reflow, reflowNow, removeMember, removeMembers, reorderMember, reorderMembers, setAlign, setAlign, setAnimateMembers, setAnimateMemberTime, setCanDropComponents, setDefaultLayoutAlign, setDefaultLayoutAlign, setDefaultResizeBars, setDropLineProperties, setDropLineThickness, setEnforcePolicy, setHPolicy, setLayoutBottomMargin, setLayoutLeftMargin, setLayoutMargin, setLayoutRightMargin, setLayoutTopMargin, setLeaveScrollbarGap, setManagePercentBreadth, setMemberOverlap, setMembers, setMembersMargin, setMinMemberSize, setPaddingAsLayoutMargin, setPlaceHolderDefaults, setPlaceHolderProperties, setResizeBarClass, setResizeBarSize, setReverseOrder, setShowDragPlaceHolder, setStackZIndex, setVertical, setVisibleMember, setVPolicy, showMember, showMember
 
Methods inherited from class com.smartgwt.client.widgets.Canvas
addChild, addChild, addChild, addClickHandler, addDoubleClickHandler, addDragMoveHandler, addDragRepositionMoveHandler, addDragRepositionStartHandler, addDragRepositionStopHandler, addDragResizeMoveHandler, addDragResizeStartHandler, addDragResizeStopHandler, addDragStartHandler, addDragStopHandler, addDropHandler, addDropMoveHandler, addDropOutHandler, addDropOverHandler, addFocusChangedHandler, addHoverHandler, addHoverHiddenHandler, addKeyDownHandler, addKeyPressHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseStillDownHandler, addMouseUpHandler, addMouseWheelHandler, addPeer, addPeer, addResizedHandler, addRightMouseDownHandler, addScrolledHandler, addShowContextMenuHandler, addStyleName, adjustForContent, animateFade, animateFade, animateFade, animateHide, animateHide, animateHide, animateMove, animateMove, animateMove, animateMove, animateRect, animateRect, animateRect, animateResize, animateResize, animateResize, animateScroll, animateScroll, animateScroll, animateShow, animateShow, animateShow, blur, bringToFront, clear, clickMaskUp, clickMaskUp, contains, contains, containsEvent, containsFocus, containsPoint, containsPoint, convertToCanvasArray, disable, enable, focus, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowTime, getAnimateTime, getAppImgDir, getAutoShowParent, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBottom, getById, getCanAcceptDrop, getCanDrag, getCanDragReposition, getCanDragResize, getCanDragScroll, getCanDrop, getCanDropBefore, getCanFocus, getCanHover, getCanSelectText, getChildren, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getContents, getContextMenu, getCursor, getDataPath, getDefaultHeight, getDefaultWidth, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragOpacity, getDragRepositionCursor, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragType, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getExtraSpace, getFullDataPath, getGroupTitle, getHeight, getHeightAsString, getHoverAlign, getHoverDelay, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapOrigin, getHSnapOrigin, getHSnapPosition, getHSnapPosition, getHtmlPosition, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getLeft, getLeftAsString, getMargin, getMatchElement, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getMouseStillDownDelay, getMouseStillDownInitialDelay, getNextZIndex, getNoDoubleClicks, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getParentElement, getPercentBox, getPosition, getPrefix, getPrompt, getRect, getRedrawOnResize, getResizeBarTarget, getRight, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowDepth, getShadowImage, getShadowOffset, getShadowSoftness, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowResizeBar, getShowShadow, getSkinImgDir, getSnapAxis, getSnapEdge, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapResizeToGrid, getSnapTo, getSnapToGrid, getSnapVDirection, getSnapVGap, getStyleName, getTabIndex, getTitle, getTooltip, getTop, getTopAsString, getValuesManager, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWidth, getVSnapOrigin, getVSnapOrigin, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideContextMenu, imgHTML, imgHTML, imgHTML, intersects, isDirty, isDisabled, isDrawn, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, markForDestroy, markForRedraw, markForRedraw, moveAbove, moveBelow, moveBy, moveTo, parentResized, redraw, redraw, removeChild, removeChild, resizeBy, resizeTo, resizeTo, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowTime, setAnimateTime, setAppImgDir, setAutoHeight, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBottom, setCanAcceptDrop, setCanDrag, setCanDragReposition, setCanDragResize, setCanDragScroll, setCanDrop, setCanDropBefore, setCanFocus, setCanHover, setCanSelectText, setChildren, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setContents, setContextMenu, setCursor, setDataPath, setDefaultHeight, setDefaultWidth, setDisabled, setDisabledCursor, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragOpacity, setDragRepositionCursor, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragType, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setExtraSpace, setGroupTitle, setHeight, setHeight, setHeight100, setHoverAlign, setHoverDelay, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlPosition, setImage, setImage, setIsGroup, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeft, setLeft, setMargin, setMatchElement, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setMouseStillDownDelay, setMouseStillDownInitialDelay, setNoDoubleClicks, setOpacity, setPadding, setPageLeft, setPageTop, setParentElement, setPercentBox, setPosition, setPrefix, setPrompt, setRect, setRect, setRedrawOnResize, setResizeBarTarget, setResizeFrom, setRight, setScrollbarSize, setShadowDepth, setShadowImage, setShadowOffset, setShadowSoftness, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowResizeBar, setShowShadow, setSkinImgDir, setSmoothFade, setSnapAxis, setSnapEdge, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToGrid, setSnapTo, setSnapToGrid, setSnapVDirection, setSnapVGap, setStyleName, setTabIndex, setTitle, setTooltip, setTop, setTop, setValuesManager, setVisibility, setVisible, setWidth, setWidth, setWidth100, setZIndex, shouldDragScroll, show, showClickMask, showNextTo, showNextTo, showPrintPreview, updateHover, updateHover, updateShadow, visibleAtPoint, visibleAtPoint, willAcceptDrop
 
Methods inherited from class com.smartgwt.client.widgets.BaseWidget
addDrawHandler, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getElement, getElement, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, hashCode, isConfigOnly, isCreated, onDestroy, onDraw, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setDragTracker, setElement, setHtmlElement, setID, setNullProperty, setPosition, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, toString
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addDomHandler, addHandler, delegateEvent, doAttachChildren, doDetachChildren, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setPixelSize, setSize, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

SectionStack

public SectionStack()

SectionStack

public SectionStack(JavaScriptObject jsObj)
Method Detail

getOrCreateRef

public static SectionStack getOrCreateRef(JavaScriptObject jsObj)

create

protected JavaScriptObject create()
Overrides:
create in class VLayout

setOverflow

public void setOverflow(Overflow overflow)
                 throws IllegalStateException
Normal Overflow settings can be used on layouts, for example, an overflow:auto Layout will scroll if sections are resized to exceed the specified size, whereas an overflow:visible Layout will grow to accomodate the resized sections.

Overrides:
setOverflow in class Layout
Parameters:
overflow - overflow Default value is "hidden"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getOverflow

public Overflow getOverflow()
Normal Overflow settings can be used on layouts, for example, an overflow:auto Layout will scroll if sections are resized to exceed the specified size, whereas an overflow:visible Layout will grow to accomodate the resized sections.

Overrides:
getOverflow in class Layout
Returns:
Overflow

setSectionHeaderClass

public void setSectionHeaderClass(String sectionHeaderClass)
                           throws IllegalStateException
Name of the Canvas subclass to use as a header that labels the section and allows showing and hiding. The default class can be skinned, or trivial subclasses created to allow different appearances for headers in different SectionStacks.

Very advanced developers can use the following information to create custom header classes.

The SectionStack will instantiate this class, giving the following properties on init:

From then on, when the sectionHeader is clicked on, it should call sectionHeaderClick(com.smartgwt.client.widgets.Canvas).
Whenever the section is hidden or shown, sectionHeader.setExpanded(true|false) will be called if implemented.

Note : This is an advanced setting

Parameters:
sectionHeaderClass - sectionHeaderClass Default value is "SectionHeader"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getSectionHeaderClass

public String getSectionHeaderClass()
Name of the Canvas subclass to use as a header that labels the section and allows showing and hiding. The default class can be skinned, or trivial subclasses created to allow different appearances for headers in different SectionStacks.

Very advanced developers can use the following information to create custom header classes.

The SectionStack will instantiate this class, giving the following properties on init:

From then on, when the sectionHeader is clicked on, it should call sectionHeaderClick(com.smartgwt.client.widgets.Canvas).
Whenever the section is hidden or shown, sectionHeader.setExpanded(true|false) will be called if implemented.

Returns:
String

setHeaderHeight

public void setHeaderHeight(int headerHeight)
                     throws IllegalStateException
Height of headers for sections.

Parameters:
headerHeight - headerHeight Default value is 20
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getHeaderHeight

public int getHeaderHeight()
Height of headers for sections.

Returns:
int

setCanResizeSections

public void setCanResizeSections(Boolean canResizeSections)
                          throws IllegalStateException
Whether sections can be drag resized by the user dragging the section header.

Note that, with canResizeSections:true, not all sections can be resized: sections that contain only 'autofitting' components or that are marked with 'section.resizeable:false' will not be resizeable.

Note : This is an advanced setting

Parameters:
canResizeSections - canResizeSections Default value is true
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getCanResizeSections

public Boolean getCanResizeSections()
Whether sections can be drag resized by the user dragging the section header.

Note that, with canResizeSections:true, not all sections can be resized: sections that contain only 'autofitting' components or that are marked with 'section.resizeable:false' will not be resizeable.

Returns:
Boolean

setCanTabToHeaders

public void setCanTabToHeaders(Boolean canTabToHeaders)
                        throws IllegalStateException
If true, the headers for the sections (if shown) will be included in the page's tab order for accessibility.

Note : This is an advanced setting

Parameters:
canTabToHeaders - canTabToHeaders Default value is false
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getCanTabToHeaders

public Boolean getCanTabToHeaders()
If true, the headers for the sections (if shown) will be included in the page's tab order for accessibility.

Returns:
Boolean

setScrollSectionIntoView

public void setScrollSectionIntoView(Boolean scrollSectionIntoView)
                              throws IllegalStateException
If an expanded or shown section expands past the current viewport and this property is true, then the viewport will auto-scroll to fit as much of the section content into the viewport without scrolling the top of the section out of the viewport.

Parameters:
scrollSectionIntoView - scrollSectionIntoView Default value is true
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getScrollSectionIntoView

public Boolean getScrollSectionIntoView()
If an expanded or shown section expands past the current viewport and this property is true, then the viewport will auto-scroll to fit as much of the section content into the viewport without scrolling the top of the section out of the viewport.

Returns:
Boolean

setAnimateSections

public void setAnimateSections(Boolean animateSections)
If true, sections are animated during expand/collapse and addition/removal of SectionItems is likewise animated.

Parameters:
animateSections - animateSections Default value is null

getAnimateSections

public Boolean getAnimateSections()
If true, sections are animated during expand/collapse and addition/removal of SectionItems is likewise animated.

Returns:
Boolean

setVisibilityMode

public void setVisibilityMode(VisibilityMode visibilityMode)
Whether multiple sections can be visible at once

Parameters:
visibilityMode - visibilityMode Default value is "mutex"

getVisibilityMode

public VisibilityMode getVisibilityMode()
Whether multiple sections can be visible at once

Returns:
VisibilityMode

setItemIndent

public void setItemIndent(int itemIndent)
Size, in pixels, of indentation of all member items. Items will be offset and reduced in width by this amount. Overridden by itemStartIndent or itemEndIndent. Setting itemIndent is equivalent to setting itemStartIndent to the same amount and itemEndIndent to 0.

Parameters:
itemIndent - itemIndent Default value is 0

getItemIndent

public int getItemIndent()
Size, in pixels, of indentation of all member items. Items will be offset and reduced in width by this amount. Overridden by itemStartIndent or itemEndIndent. Setting itemIndent is equivalent to setting itemStartIndent to the same amount and itemEndIndent to 0.

Returns:
int

setItemStartIndent

public void setItemStartIndent(int itemStartIndent)
Size, in pixels, of indentation of all member items relative to the start of the alignment axis. For instance, for left-aligned members, itemStartIndent specifies indentation for every item from the left side of the section stack. Overrides itemIndent.

Parameters:
itemStartIndent - itemStartIndent Default value is undefined

getItemStartIndent

public int getItemStartIndent()
Size, in pixels, of indentation of all member items relative to the start of the alignment axis. For instance, for left-aligned members, itemStartIndent specifies indentation for every item from the left side of the section stack. Overrides itemIndent.

Returns:
int

setItemEndIndent

public void setItemEndIndent(int itemEndIndent)
Size, in pixels, of indentation of all member items relative to the end of the alignment axis. For instance, for left-aligned members, itemStartIndent specifies indentation for every item from the right side of the section stack.

Parameters:
itemEndIndent - itemEndIndent Default value is undefined

getItemEndIndent

public int getItemEndIndent()
Size, in pixels, of indentation of all member items relative to the end of the alignment axis. For instance, for left-aligned members, itemStartIndent specifies indentation for every item from the right side of the section stack.

Returns:
int

setShowExpandControls

public void setShowExpandControls(Boolean showExpandControls)
Whether to show the Expand/Collapse controls in the headers of sections. If false, hides the expand/collapse controls and, instead, treats a click anywhere on the header as if it were a click on the expand control.

Parameters:
showExpandControls - showExpandControls Default value is true

getShowExpandControls

public Boolean getShowExpandControls()
Whether to show the Expand/Collapse controls in the headers of sections. If false, hides the expand/collapse controls and, instead, treats a click anywhere on the header as if it were a click on the expand control.

Returns:
Boolean

getSectionNumber

public int getSectionNumber(String sectionID)
Returns the position of the specified section in the SectionStack. The numbering is zero-based.

Parameters:
sectionID - ID of a section for which you want to obtain the position.
Returns:
Position of the section in the SectionStack or -1 if the specified section is not a member of this SectionStack.

sectionHeaderClick

public void sectionHeaderClick(Canvas sectionHeader)
Method intended to be called by the sectionHeader when it is clicked on.

Parameters:
sectionHeader - the sectionHeader clicked on

setSections

public void setSections(SectionStackSection... sections)

addSection

public void addSection(SectionStackSection section)
Add a section to the SectionStack.

Parameters:
section - the section to add

addSection

public void addSection(SectionStackSection section,
                       int position)
Add a section to the SectionStack.

Parameters:
section - the section to add
position - index for the new section

removeSection

public void removeSection(int index)
Remove a section from the SectionStack. The removed sections' header and items (if any) are automatically destroyed.

Parameters:
index - the section index

removeSection

public void removeSection(String sectionID)
Remove a section from the SectionStack. The removed sections' header and items (if any) are automatically destroyed.

Parameters:
sectionID - the section ID

expandSection

public void expandSection(int index)
Expands a section. This action shows all the items assigned to the section. If the section is currently hidden, it is shown first and then expanded. Calling this method is equivalent to the user clicking on the SectionHeader of a collapsed section.

Parameters:
index - the section index

expandSection

public void expandSection(String sectionID)
Expands a section. This action shows all the items assigned to the section. If the section is currently hidden, it is shown first and then expanded. Calling this method is equivalent to the user clicking on the SectionHeader of a collapsed section.

Parameters:
sectionID - the section ID

collapseSection

public void collapseSection(int index)
Collapse a section. This action hides all the items assigned to the section. Calling this method is equivalent to the user clicking on the SectionHeader of an expanded section.

Parameters:
index - the section index

collapseSection

public void collapseSection(String sectionID)
Collapse a section. This action hides all the items assigned to the section. Calling this method is equivalent to the user clicking on the SectionHeader of an expanded section.

Parameters:
sectionID - the section ID

hideSection

public void hideSection(int index)
Hides a section. This includes the section header and its items. The space vacated by this action is reassigned to the nearest visible section item above this section. If there are no visible section items above this section, the space is reassigned to the nearest visible section item below this section.

Parameters:
index - the section index

hideSection

public void hideSection(String sectionID)
Hides a section. This includes the section header and its items. The space vacated by this action is reassigned to the nearest visible section item above this section. If there are no visible section items above this section, the space is reassigned to the nearest visible section item below this section.

Parameters:
sectionID - the section ID

showSection

public void showSection(int index)
Shows a section. This includes the section header and its items. If the section is collapsed, only the header is shown. If the section is expanded, the section header and all items are shown.

Parameters:
index - the section index

showSection

public void showSection(String sectionID)
Shows a section. This includes the section header and its items. If the section is collapsed, only the header is shown. If the section is expanded, the section header and all items are shown.

Parameters:
sectionID - the section ID

moveSection

public void moveSection(int index,
                        int position)
Moves the specified section to a new position in the SectionStack order.

Parameters:
index - the section index
position - new position index for the section

moveSection

public void moveSection(String sectionID,
                        int position)
Moves the specified section to a new position in the SectionStack order.

Parameters:
sectionID - the section ID
position - new position index for the section

sectionIsExpanded

public boolean sectionIsExpanded(int index)
Returns true if the specified section is expanded, false if it is collapsed.

Parameters:
index - position of the section in the SectionStack
Returns:
true if the section is expanded, false if it is not.

sectionIsExpanded

public boolean sectionIsExpanded(String sectionID)
Returns true if the specified section is expanded, false if it is collapsed.

Parameters:
sectionID - the section ID
Returns:
true if the section is expanded, false if it is not.

sectionIsVisible

public boolean sectionIsVisible(int index)
Returns true if the specified section is visible, false if it is not. A section is visible if it shows a header and the header is visible or if it has items and the first item is visible. .

Parameters:
index - position of the section in the SectionStack
Returns:
ttrue if the section is visible, false if it is not

sectionIsVisible

public boolean sectionIsVisible(String sectionID)
Returns true if the specified section is visible, false if it is not. A section is visible if it shows a header and the header is visible or if it has items and the first item is visible.

Parameters:
sectionID - the section ID
Returns:
true if the section is visible, false if it is not

setSectionTitle

public void setSectionTitle(String sectionID,
                            String newTitle)
Changes the title of a Section Header.

Parameters:
sectionID - ID of the section whose title you want to change
newTitle - new title for the Section Header

setSectionTitle

public void setSectionTitle(int index,
                            String newTitle)
Changes the title of a Section Header.

Parameters:
index - index of the section whose title you want to change
newTitle - new title for the Section Header

getSection

public SectionStackSection getSection(String sectionID)
Return the SectionStackSection for a section.

Parameters:
sectionID - ID of the section for which you want the header
Returns:
the section indicated

getSection

public SectionStackSection getSection(int index)
Return the SectionHeader for a section.

Parameters:
index - index of the section for which you want the header
Returns:
the section header indicated

getSections

public SectionStackSection[] getSections()

addSectionHeaderClickHandler

public HandlerRegistration addSectionHeaderClickHandler(com.smartgwt.client.widgets.layout.events.SectionHeaderClickHandler handler)
Add a onSectionHeaderClick handler.

Notification method fired when the user clicks on a section header. Returning false will cancel the default behavior (expanding / collapsing the section)

Specified by:
addSectionHeaderClickHandler in interface com.smartgwt.client.widgets.layout.events.HasSectionHeaderClickHandlers
Parameters:
handler - the onSectionHeaderClick handler
Returns:
HandlerRegistration used to remove this handler

setSectionProperties

public void setSectionProperties(String section,
                                 SectionStackSection properties)
Set arbitrary properties for a particular section in this SectionStack. Properties will be applied to the sectionHeader for the section.

Note that where APIs exist to explicitly manipulate section properties these should be used in preference to this method. For example, to add or remove items in a section use com.smartgwt.client.widgets.layout.SectionStack#addItem or com.smartgwt.client.widgets.layout.SectionStack#removeItem. To change the title of a section, use setSectionTitle(java.lang.String, java.lang.String).

Also note that to modify properties of items within a section, call the appropriate setter methods directly on the item you want to modify.

Parameters:
section - ID or index of the section to modify
properties - properties to apply to the section.

setSectionProperties

public void setSectionProperties(int section,
                                 SectionStackSection properties)
Set arbitrary properties for a particular section in this SectionStack. Properties will be applied to the sectionHeader for the section.

Note that where APIs exist to explicitly manipulate section properties these should be used in preference to this method. For example, to add or remove items in a section use com.smartgwt.client.widgets.layout.SectionStack#addItem or com.smartgwt.client.widgets.layout.SectionStack#removeItem. To change the title of a section, use setSectionTitle(java.lang.String, java.lang.String).

Also note that to modify properties of items within a section, call the appropriate setter methods directly on the item you want to modify.

Parameters:
section - ID or index of the section to modify
properties - properties to apply to the section.