Class SectionStack
- All Implemented Interfaces:
HasAttachHandlers
,HasHandlers
,EventListener
,HasVisibility
,IsWidget
,LogicalStructure
,HasClearHandlers
,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
,HasMovedHandlers
,HasParentMovedHandlers
,HasResizedHandlers
,HasRightMouseDownHandlers
,HasRuleContextChangedHandlers
,HasScrolledHandlers
,HasShowContextMenuHandlers
,HasVisibilityChangedHandlers
,HasMembersChangedHandlers
,HasSectionHeaderClickHandlers
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. For further details, see visibilityMode
.
To ensure all sections are
accessible, you may need to set overflow
to enable
scrolling.
-
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, factoryCreated, factoryProperties, id, nativeObject, scClassName
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a canvas as an item to a section.void
addSection
(SectionStackSection section) Add a section to the SectionStack.void
addSection
(SectionStackSection section, int position) Add a section to the SectionStack.Add a SectionHeaderClick handler.static void
changeAutoChildDefaults
(String autoChildName, Canvas defaults) Changes the defaults for Canvas AutoChildren namedautoChildName
.static void
changeAutoChildDefaults
(String autoChildName, FormItem defaults) Changes the defaults for FormItem AutoChildren namedautoChildName
.void
closeSection
(SectionStackSection section) Close a section.void
collapseSection
(int sections) Collapse a section or sections.void
collapseSection
(int sections, CollapseSectionCallback callback) Collapse a section or sections.void
collapseSection
(String sectionID) protected JavaScriptObject
create()
void
expandSection
(int sections) Expands a section or sections.void
expandSection
(int sections, ExpandSectionCallback callback) Expands a section or sections.void
expandSection
(String sectionID) If true, sections are animated during expand/collapse and addition/removal of SectionItems is likewise animated.boolean
Should sections be closeable ifSectionStackSection.canClose
is not explicitly specified?InvisibilityMode
VisibilityMode.MUTEX
, whether to allow the last remaining expanded section to be collapsed.SectionStacks provide the same default implementation of drag and drop interactions asLayouts
, except that members are added as items into the section over which they're dropped.Whether sections can be drag reordered by the user dragging the section header.Whether sections can be drag resized by the user dragging the section header.If true, the headers for the sections (if shown) will be included in the page's tab order for accessibility.Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists.Constructor class forcloseSectionButton
autochildren.Default properties for thecloseSectionButton
.Default icon src for theclose button
forcanClose:true
sections.int
Pixel width/height for thecloseSectionIcon
.Default class used to construct theEditProxy
for this component when the component isfirst placed into edit mode
.int
Height of headers for sections.int
Size, in pixels, of indentation of all member items relative to the end of the alignment axis.int
Size, in pixels, of indentation of all member items.int
Size, in pixels, of indentation of all member items relative to the start of the alignment axis.WhenAutoTest.getElement()
is used to parse locator strings generated byAutoTest.getLocator()
, how should sections within this stack be identified? By default if a section has a specifiedSection.name
this will always be used.LocatorTypeStrategy
to use when finding Sections within this section Stack.Getter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility.static SectionStack
getOrCreateRef
(JavaScriptObject jsObj) NormalOverflow
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 accommodate the resized sections.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.getSection
(int index) Return the SectionStackSection for a section.getSection
(String sectionID) Return the SectionStackSection for a section.Widget to use for section headers.Returns a list of allsection names
in the order in which they appear in the SectionStack.int
getSectionNumber
(String sectionName) Returns the position of the specified section in the SectionStack.Return all the SectionStackSections in this SectionStack.Whether to show the Expand/Collapse controls in the headers of sections.Default CSS style for the SectionStack as a whole.Should any specifiedSectionStackSection.ID
be applied to the generated SectionHeader widget for the section as a widget ID? If set to false, SectionStackSection.ID will behave as a synonym for SectionStackSection.name.Whether multiple sections can be expanded.void
hideSection
(int sections) Hides a section or sections.void
hideSection
(int sections, HideSectionCallback callback) Hides a section or sections.void
hideSection
(String sectionID) void
moveSection
(int sections, int position) Moves the specified section(s) to a new position in the SectionStack order.void
moveSection
(String sectionID, int position) void
removeItem
(String section, Canvas item) Remove an item from a section.void
removeSection
(int sections) Remove a section or set of sections from the SectionStack.void
removeSection
(String sectionID) void
revealChild
(Canvas child) Reveals the child Canvas passed in by expanding the section containing that child if it is currently collapsed.void
revealChild
(String childID) Reveals the child Canvas passed in by expanding the section containing that child if it is currently collapsed.sectionForItem
(Canvas item) Search for a section that contains passed item.void
sectionHeaderClick
(Canvas sectionHeader) Method intended to be called by the sectionHeader when it is clicked on.boolean
sectionIsExpanded
(int section) Returns true if the specified section is expanded, false if it is collapsed.boolean
sectionIsExpanded
(String sectionID) boolean
sectionIsVisible
(int section) Returns true if the specified section is visible, false if it is not.boolean
sectionIsVisible
(String sectionID) setAnimateSections
(Boolean animateSections) If true, sections are animated during expand/collapse and addition/removal of SectionItems is likewise animated.setCanCloseSections
(boolean canCloseSections) Should sections be closeable ifSectionStackSection.canClose
is not explicitly specified?setCanCollapseAll
(Boolean canCollapseAll) InvisibilityMode
VisibilityMode.MUTEX
, whether to allow the last remaining expanded section to be collapsed.setCanDropComponents
(Boolean canDropComponents) SectionStacks provide the same default implementation of drag and drop interactions asLayouts
, except that members are added as items into the section over which they're dropped.setCanReorderSections
(Boolean canReorderSections) Whether sections can be drag reordered by the user dragging the section header.setCanResizeSections
(Boolean canResizeSections) Whether sections can be drag resized by the user dragging the section header.setCanTabToHeaders
(Boolean canTabToHeaders) If true, the headers for the sections (if shown) will be included in the page's tab order for accessibility.setCloseSectionButtonConstructor
(String closeSectionButtonConstructor) Constructor class forcloseSectionButton
autochildren.setCloseSectionButtonDefaults
(ImgButton closeSectionButtonDefaults) Default properties for thecloseSectionButton
.setCloseSectionIcon
(String closeSectionIcon) Default icon src for theclose button
forcanClose:true
sections.setCloseSectionIconSize
(int closeSectionIconSize) Pixel width/height for thecloseSectionIcon
.static void
setDefaultProperties
(SectionStack sectionStackProperties) Class level method to set the default properties of this class.setEditProxyConstructor
(String editProxyConstructor) Default class used to construct theEditProxy
for this component when the component isfirst placed into edit mode
.setHeaderHeight
(int headerHeight) Height of headers for sections.setItemEndIndent
(int itemEndIndent) Size, in pixels, of indentation of all member items relative to the end of the alignment axis.setItemIndent
(int itemIndent) Size, in pixels, of indentation of all member items.void
Sets a new list of canvii as items into the specified section by removing the existing items, then adding the new ones.setItemStartIndent
(int itemStartIndent) Size, in pixels, of indentation of all member items relative to the start of the alignment axis.setLocateSectionsBy
(LocatorStrategy locateSectionsBy) WhenAutoTest.getElement()
is used to parse locator strings generated byAutoTest.getLocator()
, how should sections within this stack be identified? By default if a section has a specifiedSection.name
this will always be used.setLocateSectionsType
(LocatorTypeStrategy locateSectionsType) LocatorTypeStrategy
to use when finding Sections within this section Stack.Setter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility.setOverflow
(Overflow overflow) NormalOverflow
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 accommodate the resized sections.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
(Class<? extends Canvas> sectionHeaderClass) setSectionHeaderClass
(String sectionHeaderClass) Widget to use for section headers.void
setSectionProperties
(int index, SectionStackSection properties) 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) void
setSectionTitle
(String section, String newTitle) Changes the title of a SectionHeader.setShowExpandControls
(Boolean showExpandControls) Whether to show the Expand/Collapse controls in the headers of sections.void
setStyleName
(String styleName) Default CSS style for the SectionStack as a whole.setUseGlobalSectionIDs
(Boolean useGlobalSectionIDs) Should any specifiedSectionStackSection.ID
be applied to the generated SectionHeader widget for the section as a widget ID? If set to false, SectionStackSection.ID will behave as a synonym for SectionStackSection.name.setVisibilityMode
(VisibilityMode visibilityMode) Whether multiple sections can be expanded.void
showSection
(int sections) Shows a section or sections.void
showSection
(int sections, ShowSectionCallback callback) Shows a section or sections.void
showSection
(String sectionID) Methods inherited from class com.smartgwt.client.widgets.layout.VLayout
setDefaultProperties, setLogicalStructure
Methods inherited from class com.smartgwt.client.widgets.layout.Layout
addMember, addMember, addMember, addMember, addMemberPostCreate, addMemberPostCreate, addMemberPreCreate, addMemberPreCreate, addMembers, addMembers, addMembersChangedHandler, getAnimateMembers, getAnimateMemberTime, getChildTabPosition, getDefaultResizeBars, getDropComponent, getDropLine, getDropLineThickness, getDropPosition, getEnforcePolicy, getHPolicy, getLayoutBottomMargin, getLayoutEndMargin, getLayoutLeftMargin, getLayoutMargin, getLayoutRightMargin, getLayoutStartMargin, getLayoutTopMargin, getLeaveScrollbarGap, getLocateMembersBy, getLocateMembersType, getManagePercentBreadth, getMember, getMember, getMemberDefaultBreadth, getMemberNumber, getMemberNumber, getMemberOverlap, getMembers, getMembersLength, getMembersMargin, getMinMemberLength, getMinMemberSize, getPaddingAsLayoutMargin, getResizeBar, getResizeBarClass, getResizeBarSize, getReverseOrder, getShowDragPlaceHolder, getShowDropLines, getStackZIndex, getVertical, getVPolicy, hasMember, hideDropLine, hideMember, hideMember, layoutIsDirty, onInit, onInit_Layout, reflow, reflow, reflowNow, removeMember, removeMembers, removeMembers, reorderMember, reorderMembers, replaceMember, setAlign, setAlign, setAnimateMembers, setAnimateMemberTime, setDefaultLayoutAlign, setDefaultLayoutAlign, setDefaultProperties, setDefaultResizeBars, setDropLineProperties, setDropLineThickness, setEnforcePolicy, setHPolicy, setLayoutBottomMargin, setLayoutEndMargin, setLayoutLeftMargin, setLayoutMargin, setLayoutRightMargin, setLayoutStartMargin, setLayoutTopMargin, setLeaveScrollbarGap, setLocateMembersBy, setLocateMembersType, setLogicalStructure, setManagePercentBreadth, setMemberOverlap, setMembers, setMembersMargin, setMinBreadthMember, setMinBreadthMember, setMinBreadthMember, setMinMemberLength, setMinMemberSize, setPaddingAsLayoutMargin, setPlaceHolderDefaults, setPlaceHolderProperties, setResizeBarClass, setResizeBarSize, setReverseOrder, setShowDragPlaceHolder, setShowDropLines, setStackZIndex, setVertical, setVisibleMember, setVPolicy, showMember, showMember
Methods inherited from class com.smartgwt.client.widgets.Canvas
addChild, addChild, addChild, addChild, addChild, addClearHandler, 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, addMovedHandler, addParentMovedHandler, addPeer, addPeer, addPeer, addPeer, addResizedHandler, addRightMouseDownHandler, addRuleContextChangedHandler, addScrolledHandler, addShowContextMenuHandler, addSnapAlignCandidate, addStyleName, addVisibilityChangedHandler, adjustForContent, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateHide, animateHide, animateHide, animateHide, animateHide, animateHide, animateHide, animateMove, animateMove, animateMove, animateMove, animateRect, animateRect, animateRect, animateRect, animateResize, animateResize, animateResize, animateResize, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateShow, animateShow, animateShow, animateShow, animateShow, animateShow, animateShow, asSGWTComponent, blur, bringToFront, clear, clearExplicitTabIndex, clickMaskUp, clickMaskUp, contains, contains, containsEvent, containsEventTarget, containsFocus, containsPoint, containsPoint, dataContextChanged, deparent, depeer, disable, enable, encloses, focus, focusAfterGroup, focusAtEnd, focusInNextTabElement, focusInPreviousTabElement, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAdaptiveHeightPriority, getAdaptiveWidthPriority, getAlwaysManageFocusNavigation, getAlwaysShowScrollbars, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideEffect, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeLayoutMode, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowEffect, getAnimateShowTime, getAnimateTime, getAppImgDir, getAriaHandleID, getAriaRole, getAriaStateDefaults, getAutoMaskComponents, getAutoParent, getAutoPopulateData, getAutoShowParent, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBorderRadius, getBottom, getById, getByJSObject, getByLocalId, getCanAcceptDrop, getCanAdaptHeight, getCanAdaptWidth, getCanDrag, getCanDragReposition, getCanDragResize, getCanDragScroll, getCanDrop, getCanDropBefore, getCanFocus, getCanHover, getCanSelectText, getCanvasAutoChild, getCanvasItem, getChildren, getChildrenResizeSnapAlign, getChildrenSnapAlign, getChildrenSnapCenterAlign, getChildrenSnapEdgeAlign, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getClassName, getComponentMask, getComponentMaskDefaults, getContentElement, getContents, getContextMenu, getCorrectZoomOverflow, getCursor, getDataContext, getDataPath, getDefaultHeight, getDefaultWidth, getDefiningProperty, getDefiningPropertyName, getDefiningPropertyNameOptions, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDisableTouchScrollingForDrag, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragMaskType, getDragMaxHeight, getDragMaxWidth, getDragMinHeight, getDragMinWidth, getDragOpacity, getDragRepositionAppearance, getDragRepositionCursor, getDragResizeAppearance, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragTargetAsString, getDragType, getDropTarget, getDropTargetAsString, getDropTypes, getDropTypesAsString, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeMarginSize, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getEditNode, getEditProxy, getElement, getElement, getEnableWhen, getEndLine, getEventEdge, getEventEdge, getExtraSpace, getFacetId, getFloatingScrollbars, getFormItemAutoChild, getForwardSVGeventsToObject, getFullDataPath, getGroupBorderCSS, getGroupLabelBackgroundColor, getGroupLabelStyleName, getGroupPadding, getGroupTitle, getHeight, getHeightAsString, getHideUsingDisplayNone, getHoverAlign, getHoverAutoDestroy, getHoverAutoFitMaxWidth, getHoverAutoFitMaxWidthAsString, getHoverAutoFitWidth, getHoverComponent, getHoverDelay, getHoverFocusKey, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverPersist, getHoverScreen, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapPosition, getHSnapPosition, getHtmlElement, getHtmlElementAsString, getHtmlPosition, getImage, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getIsPrinting, getIsRuleScope, getIsSnapAlignCandidate, getKeepInParentRect, getLayoutAlign, getLeaveGroupLabelSpace, getLeavePageSpace, getLeft, getLeftAsString, getLocalId, getLocateByIDOnly, getLocateChildrenBy, getLocateChildrenType, getLocatePeersBy, getLocatePeersType, getLocatorName, getMargin, getMasterCanvas, getMasterElement, getMatchElement, getMatchElementHeight, getMatchElementWidth, getMaxHeight, getMaxWidth, getMaxZoomOverflowError, getMenuConstructor, getMinHeight, getMinNonEdgeSize, getMinWidth, getMomentumScrollMinSpeed, getMouseStillDownDelay, getMouseStillDownInitialDelay, getName, getNativeAutoHideScrollbars, getNextZIndex, getNoDoubleClicks, getNoDropCursor, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getOuterElement, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getPaletteDefaults, getPanelContainer, getParentCanvas, getParentElement, getPeers, getPendingMarkerStyle, getPendingMarkerVisible, getPercentBox, getPercentSource, getPersistentMatchElement, getPointerSettings, getPointerTarget, getPointerTargetAsString, getPosition, getPrefix, getPrintChildrenAbsolutelyPositioned, getPrintHTML, getPrintHTML, getPrintStyleName, getPrompt, getProportionalResizeModifiers, getProportionalResizing, getReceiveScrollbarEvents, getRect, getRedrawOnResize, getResizeBarTarget, getResizeFrom, getRight, getRuleContext, getRuleContext, getRuleScope, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowColor, getShadowDepth, getShadowHOffset, getShadowImage, getShadowOffset, getShadowSoftness, getShadowSpread, getShadowVOffset, getShouldPrint, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowHoverComponents, getShowPointer, getShowResizeBar, getShowShadow, getShowSnapGrid, getShrinkElementOnHide, getSizeMayChangeOnRedraw, getSkinImgDir, getSnapAlignCandidates, getSnapAlignCenterLineStyle, getSnapAlignEdgeLineStyle, getSnapAxis, getSnapEdge, getSnapGridLineProperties, getSnapGridStyle, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapPosition, getSnapPosition, getSnapResizeToAlign, getSnapResizeToGrid, getSnapTo, getSnapToAlign, getSnapToCenterAlign, getSnapToEdgeAlign, getSnapToGrid, getSnapVDirection, getSnapVGap, getStartLine, getTabIndex, getTestDataContext, getTestInstance, getTitle, getTooltip, getTop, getTopAsString, getTopElement, getUISummary, getUpdateTabPositionOnDraw, getUpdateTabPositionOnReparent, getUseBackMask, getUseCSSShadow, getUseDragMask, getUseImageForSVG, getUseNativeDrag, getUseOpacityFilter, getUseTouchScrolling, getValuesManager, getValuesManagerAsString, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWhen, getVisibleWidth, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getWorkflows, getZIndex, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideComponentMask, hideComponentMask, hideContextMenu, imgHTML, imgHTML, imgHTML, initComplete, intersects, isDirty, isDisabled, isFocused, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, markForDestroy, markForRedraw, markForRedraw, moveAbove, moveBelow, moveBy, moveTo, onAttach, onDetach, pageScrollDown, pageScrollUp, parentResized, placeNear, placeNear, placeNear, print, print, print, print, printComponents, provideRuleContext, provideRuleContext, redraw, redraw, registerFontScaledPaddingStyles, removeChild, removeChild, removePeer, removePeer, removeRuleContext, removeSnapAlignCandidate, resizeAutoChildAttributes, resizeBy, resizeControls, resizeControlsTo, resizeFonts, resizeFonts, resizeFonts, resizeFontsTo, resizeIcons, resizePadding, resizePadding, resizeTo, resizeTo, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAdaptHeightByCustomizer, setAdaptiveHeightPriority, setAdaptiveWidthPriority, setAdaptWidthByCustomizer, setAllowExternalFilters, setAlwaysManageFocusNavigation, setAlwaysShowScrollbars, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideEffect, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeLayoutMode, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowEffect, setAnimateShowTime, setAnimateTime, setAppImgDir, setAriaRole, setAriaState, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setAutoHeight, setAutoMaskComponents, setAutoParent, setAutoPopulateData, setAutoResizeAutoChildAttributes, setAutoResizeIcons, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBorderRadius, setBottom, setCanAcceptDrop, setCanAdaptHeight, setCanAdaptWidth, setCanDrag, setCanDragReposition, setCanDragResize, setCanDragScroll, setCanDrop, setCanDropBefore, setCanFocus, setCanHover, setCanSelectText, setChildren, setChildrenResizeSnapAlign, setChildrenSnapAlign, setChildrenSnapCenterAlign, setChildrenSnapEdgeAlign, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setComponentMaskDefaults, setContents, setContextMenu, setCorrectZoomOverflow, setCursor, setDataContext, setDataPath, setDefaultHeight, setDefaultPageSpace, setDefaultProperties, setDefaultShowCustomScrollbars, setDefaultWidth, setDefiningProperty, setDefiningPropertyNameOptions, setDisabled, setDisabledCursor, setDisableTouchScrollingForDrag, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragMaskType, setDragMaxHeight, setDragMaxWidth, setDragMinHeight, setDragMinWidth, setDragOpacity, setDragRepositionAppearance, setDragRepositionCursor, setDragResizeAppearance, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragTarget, setDragType, setDropTarget, setDropTarget, setDropTypes, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setEditMode, setEditMode, setEditMode, setElement, setEnableWhen, setEndLine, setExtraSpace, setFacetId, setFloatingScrollbars, setForwardSVGeventsToObject, setGroupBorderCSS, setGroupLabelBackgroundColor, setGroupLabelStyleName, setGroupPadding, setGroupTitle, setHeight, setHeight, setHeight, setHeight100, setHideUsingDisplayNone, setHoverAlign, setHoverAutoDestroy, setHoverAutoFitMaxWidth, setHoverAutoFitMaxWidth, setHoverAutoFitWidth, setHoverDelay, setHoverFocusKey, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverPersist, setHoverScreen, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlElement, setHtmlElement, setHtmlPosition, setImage, setImage, setInitHandler, setIsGroup, setIsRuleScope, setIsSnapAlignCandidate, setKeepInParentRect, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeaveGroupLabelSpace, setLeavePageSpace, setLeft, setLeft, setLocateByIDOnly, setLocateChildrenBy, setLocateChildrenType, setLocatePeersBy, setLocatePeersType, setLocatorName, setLocatorParent, setLocatorParent, setLogicalStructure, setMargin, setMatchElement, setMatchElementHeight, setMatchElementWidth, setMaxHeight, setMaxWidth, setMaxZoomOverflowError, setMenuConstructor, setMinHeight, setMinNonEdgeSize, setMinWidth, setMomentumScrollMinSpeed, setMouseStillDownDelay, setMouseStillDownInitialDelay, setName, setNativeAutoHideScrollbars, setNeverUseFilters, setNoDoubleClicks, setNoDropCursor, setOpacity, setPadding, setPageLeft, setPageTop, setPanelContainer, setParentCanvas, setParentElement, setPeers, setPendingMarkerStyle, setPendingMarkerVisible, setPercentBox, setPercentSource, setPersistentMatchElement, setPointerSettings, setPointerTarget, setPosition, setPrefix, setPrintChildrenAbsolutelyPositioned, setPrintStyleName, setPrompt, setProportionalResizeModifiers, setProportionalResizing, setReceiveScrollbarEvents, setRect, setRect, setRedrawOnResize, setRelativeTabPosition, setResizeBarTarget, setResizeFrom, setResizeFrom, setRight, setRuleScope, setScrollbarConstructor, setScrollbarSize, setShadowColor, setShadowDepth, setShadowHOffset, setShadowImage, setShadowOffset, setShadowSoftness, setShadowSpread, setShadowVOffset, setShouldPrint, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowHoverComponents, setShowPointer, setShowResizeBar, setShowShadow, setShowSnapGrid, setShrinkElementOnHide, setSizeMayChangeOnRedraw, setSkinImgDir, setSmoothFade, setSnapAlignCandidates, setSnapAlignCenterLineStyle, setSnapAlignEdgeLineStyle, setSnapAxis, setSnapEdge, setSnapGridLineProperties, setSnapGridStyle, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToAlign, setSnapResizeToGrid, setSnapTo, setSnapToAlign, setSnapToCenterAlign, setSnapToEdgeAlign, setSnapToGrid, setSnapVDirection, setSnapVGap, setStartLine, setTabIndex, setTestDataContext, setTitle, setTooltip, setTop, setTop, setUpdateTabPositionOnDraw, setUpdateTabPositionOnReparent, setUseBackMask, setUseCSSShadow, setUseDragMask, setUseImageForSVG, setUseNativeDrag, setUseOpacityFilter, setUseTouchScrolling, setValuesManager, setValuesManager, setVisibility, setVisible, setVisibleWhen, setWidth, setWidth, setWidth, setWidth100, setWorkflows, setZIndex, shouldDragScroll, show, showClickMask, showComponentMask, showComponentMask, showNextTo, showNextTo, showNextTo, showNextTo, showPendingMarker, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, showRecursively, startDebuggingOverflow, stopDebuggingOverflow, updateChildTabPosition, updateChildTabPositions, updateEditNode, updateHover, updateHover, updateShadow, updateTabPositionForDraw, visibleAtPoint, willAcceptDrop
Methods inherited from class com.smartgwt.client.widgets.BaseWidget
addDrawHandler, addDynamicProperty, addDynamicProperty, addDynamicProperty, addDynamicProperty, applyFactoryProperties, clearDynamicProperty, completeCreation, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDateArray, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsFloatArray, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, getScClassName, hasAutoAssignedID, hasDynamicProperty, hashCode, initNativeObject, internalSetID, internalSetID, isConfigOnly, isCreated, isDrawn, isFactoryCreated, onBind, onDestroy, onDraw, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setDefaultProperties, setDragTracker, setFactoryCreated, setID, setJavaScriptObject, setLogicalStructure, setLogicalStructure, setNullProperty, setPosition, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setScClassName, toString
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent
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 Details
-
SectionStack
public SectionStack() -
SectionStack
-
-
Method Details
-
getOrCreateRef
-
changeAutoChildDefaults
Changes the defaults for Canvas AutoChildren namedautoChildName
.- Parameters:
autoChildName
- name of an AutoChild to customize the defaults for.defaults
- Canvas defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, seeSGWTProperties
.- See Also:
-
changeAutoChildDefaults
Changes the defaults for FormItem AutoChildren namedautoChildName
.- Parameters:
autoChildName
- name of an AutoChild to customize the defaults for.defaults
- FormItem defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, seeSGWTProperties
.- See Also:
-
create
-
setAnimateSections
If true, sections are animated during expand/collapse and addition/removal of SectionItems is likewise animated.
If this method is called after the component has been drawn/initialized: setter foranimateSections
- Parameters:
animateSections
- Should expand/collapse of section be animated?. Default value is null- Returns:
SectionStack
instance, for chaining setter calls- See Also:
-
getAnimateSections
If true, sections are animated during expand/collapse and addition/removal of SectionItems is likewise animated.- Returns:
- Current animateSections value. Default value is null
- See Also:
-
setCanCloseSections
Should sections be closeable ifSectionStackSection.canClose
is not explicitly specified?Closeable sections show a
close icon button
which will invokecloseSection()
when clicked.- Parameters:
canCloseSections
- New canCloseSections value. Default value is false- Returns:
SectionStack
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getCanCloseSections
public boolean getCanCloseSections()Should sections be closeable ifSectionStackSection.canClose
is not explicitly specified?Closeable sections show a
close icon button
which will invokecloseSection()
when clicked.- Returns:
- Current canCloseSections value. Default value is false
-
setCanCollapseAll
InvisibilityMode
VisibilityMode.MUTEX
, whether to allow the last remaining expanded section to be collapsed. If false, collapsing the last open section will open the next one (wrapping around at the end).- Parameters:
canCollapseAll
- New canCollapseAll value. Default value is true- Returns:
SectionStack
instance, for chaining setter calls
-
getCanCollapseAll
InvisibilityMode
VisibilityMode.MUTEX
, whether to allow the last remaining expanded section to be collapsed. If false, collapsing the last open section will open the next one (wrapping around at the end).- Returns:
- Current canCollapseAll value. Default value is true
-
setCanDropComponents
SectionStacks provide the same default implementation of drag and drop interactions asLayouts
, except that members are added as items into the section over which they're dropped.If you want to completely suppress the builtin drag and drop logic, but still receive drag and drop events for your own custom implementation, set
Canvas.canAcceptDrop
totrue
andcanDropComponents
tofalse
on your SectionStack.Note : This is an advanced setting
- Overrides:
setCanDropComponents
in classLayout
- Parameters:
canDropComponents
- New canDropComponents value. Default value is true- Returns:
SectionStack
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getCanDropComponents
SectionStacks provide the same default implementation of drag and drop interactions asLayouts
, except that members are added as items into the section over which they're dropped.If you want to completely suppress the builtin drag and drop logic, but still receive drag and drop events for your own custom implementation, set
Canvas.canAcceptDrop
totrue
andcanDropComponents
tofalse
on your SectionStack.- Overrides:
getCanDropComponents
in classLayout
- Returns:
- Current canDropComponents value. Default value is true
- See Also:
-
setCanReorderSections
Whether sections can be drag reordered by the user dragging the section header.Note that, with
canReorderSections:true
, sections withsection.canReorder:false
will not be able to be drag-reordered (though their index may still be changed by dropping other sections above or below them in the section stack).Note : This is an advanced setting
- Parameters:
canReorderSections
- New canReorderSections value. Default value is false- Returns:
SectionStack
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getCanReorderSections
Whether sections can be drag reordered by the user dragging the section header.Note that, with
canReorderSections:true
, sections withsection.canReorder:false
will not be able to be drag-reordered (though their index may still be changed by dropping other sections above or below them in the section stack).- Returns:
- Current canReorderSections value. Default value is false
-
setCanResizeSections
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 onlyautofitting
components or that are marked withsection.resizeable:false
will not be resizeable.Note : This is an advanced setting
- Parameters:
canResizeSections
- New canResizeSections value. Default value is true- Returns:
SectionStack
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
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 onlyautofitting
components or that are marked withsection.resizeable:false
will not be resizeable.- Returns:
- Current canResizeSections value. Default value is true
-
setCanTabToHeaders
If true, the headers for the sections (if shown) will be included in the page's tab order for accessibility. May be overridden at the Section level viaSectionStackSection.canTabToHeader
If unset, section headers will be focusable if
SC.setScreenReaderMode()
has been called. SeeAccessibility
.Note : This is an advanced setting
- Parameters:
canTabToHeaders
- New canTabToHeaders value. Default value is null- Returns:
SectionStack
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getCanTabToHeaders
If true, the headers for the sections (if shown) will be included in the page's tab order for accessibility. May be overridden at the Section level viaSectionStackSection.canTabToHeader
If unset, section headers will be focusable if
SC.setScreenReaderMode()
has been called. SeeAccessibility
.- Returns:
- Current canTabToHeaders value. Default value is null
-
getCloseSectionButton
Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. SeeUsing AutoChildren
for details.Automatically generated close icon button to show for
canClose:true
sections.
This component will be automatically added to thecontrols
forcanClose:true
sections.Icon source is derived from
closeSectionIcon
orSectionStackSection.closeIcon
and related properties.- Returns:
- null
-
setCloseSectionButtonConstructor
public SectionStack setCloseSectionButtonConstructor(String closeSectionButtonConstructor) throws IllegalStateException Constructor class forcloseSectionButton
autochildren.- Parameters:
closeSectionButtonConstructor
- New closeSectionButtonConstructor value. Default value is "ImgButton"- Returns:
SectionStack
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getCloseSectionButtonConstructor
Constructor class forcloseSectionButton
autochildren.- Returns:
- Current closeSectionButtonConstructor value. Default value is "ImgButton"
-
setCloseSectionButtonDefaults
public SectionStack setCloseSectionButtonDefaults(ImgButton closeSectionButtonDefaults) throws IllegalStateException Default properties for thecloseSectionButton
.The default configuration includes a click handler to invoke
closeSection()
- Parameters:
closeSectionButtonDefaults
- New closeSectionButtonDefaults value. Default value is {...}- Returns:
SectionStack
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getCloseSectionButtonDefaults
Default properties for thecloseSectionButton
.The default configuration includes a click handler to invoke
closeSection()
- Returns:
- Current closeSectionButtonDefaults value. Default value is {...}
-
setCloseSectionIcon
Default icon src for theclose button
forcanClose:true
sections.May be overridden by
SectionStackSection.closeIcon
.- Parameters:
closeSectionIcon
- New closeSectionIcon value. Default value is "[SKIN]/actions/close.png"- Returns:
SectionStack
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getCloseSectionIcon
Default icon src for theclose button
forcanClose:true
sections.May be overridden by
SectionStackSection.closeIcon
.- Returns:
- Current closeSectionIcon value. Default value is "[SKIN]/actions/close.png"
- See Also:
-
setCloseSectionIconSize
Pixel width/height for thecloseSectionIcon
.- Parameters:
closeSectionIconSize
- New closeSectionIconSize value. Default value is 16- Returns:
SectionStack
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getCloseSectionIconSize
public int getCloseSectionIconSize()Pixel width/height for thecloseSectionIcon
.- Returns:
- Current closeSectionIconSize value. Default value is 16
-
setEditProxyConstructor
public SectionStack setEditProxyConstructor(String editProxyConstructor) throws IllegalStateException Default class used to construct theEditProxy
for this component when the component isfirst placed into edit mode
.- Overrides:
setEditProxyConstructor
in classLayout
- Parameters:
editProxyConstructor
- New editProxyConstructor value. Default value is "SectionStackEditProxy"- Returns:
SectionStack
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getEditProxyConstructor
Default class used to construct theEditProxy
for this component when the component isfirst placed into edit mode
.- Overrides:
getEditProxyConstructor
in classLayout
- Returns:
- Current editProxyConstructor value. Default value is "SectionStackEditProxy"
- See Also:
-
setHeaderHeight
Height of headers for sections.- Parameters:
headerHeight
- New headerHeight value. Default value is 20- Returns:
SectionStack
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getHeaderHeight
public int getHeaderHeight()Height of headers for sections.- Returns:
- Current headerHeight value. Default value is 20
-
setItemEndIndent
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
- New itemEndIndent value. Default value is undefined- Returns:
SectionStack
instance, for chaining setter calls- See Also:
-
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:
- Current itemEndIndent value. Default value is undefined
- See Also:
-
setItemIndent
Size, in pixels, of indentation of all member items. Items will be offset and reduced in width by this amount. Overridden byitemStartIndent
oritemEndIndent
. Setting itemIndent is equivalent to setting itemStartIndent to the same amount and itemEndIndent to 0.- Parameters:
itemIndent
- New itemIndent value. Default value is 0- Returns:
SectionStack
instance, for chaining setter calls- See Also:
-
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 byitemStartIndent
oritemEndIndent
. Setting itemIndent is equivalent to setting itemStartIndent to the same amount and itemEndIndent to 0.- Returns:
- Current itemIndent value. Default value is 0
- See Also:
-
setItemStartIndent
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. OverridesitemIndent
.- Parameters:
itemStartIndent
- New itemStartIndent value. Default value is undefined- Returns:
SectionStack
instance, for chaining setter calls- See Also:
-
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. OverridesitemIndent
.- Returns:
- Current itemStartIndent value. Default value is undefined
- See Also:
-
setLocateSectionsBy
WhenAutoTest.getElement()
is used to parse locator strings generated byAutoTest.getLocator()
, how should sections within this stack be identified? By default if a section has a specifiedSection.name
this will always be used. For sections with no name, the following options are available:"title"
use the title as an identifier"index"
use the index of the section in the sections array as an identifier
Note : This is an advanced setting
- Parameters:
locateSectionsBy
- New locateSectionsBy value. Default value is null- Returns:
SectionStack
instance, for chaining setter calls
-
getLocateSectionsBy
WhenAutoTest.getElement()
is used to parse locator strings generated byAutoTest.getLocator()
, how should sections within this stack be identified? By default if a section has a specifiedSection.name
this will always be used. For sections with no name, the following options are available:"title"
use the title as an identifier"index"
use the index of the section in the sections array as an identifier
- Returns:
- Current locateSectionsBy value. Default value is null
-
setLocateSectionsType
LocatorTypeStrategy
to use when finding Sections within this section Stack.Note : This is an advanced setting
- Parameters:
locateSectionsType
- New locateSectionsType value. Default value is null- Returns:
SectionStack
instance, for chaining setter calls
-
getLocateSectionsType
LocatorTypeStrategy
to use when finding Sections within this section Stack.- Returns:
- Current locateSectionsType value. Default value is null
-
setOverflow
NormalOverflow
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 accommodate the resized sections.- Overrides:
setOverflow
in classLayout
- Parameters:
overflow
- New overflow value. Default value is "hidden"- Returns:
SectionStack
instance, for chaining setter calls- See Also:
-
getOverflow
NormalOverflow
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 accommodate the resized sections.- Overrides:
getOverflow
in classLayout
- Returns:
- Current overflow value. Default value is "hidden"
- See Also:
-
Canvas.getOverflow()
com.smartgwt.client.widgets.layout.Layout#getMinBreadthMember
-
setScrollSectionIntoView
public SectionStack 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
- New scrollSectionIntoView value. Default value is true- Returns:
SectionStack
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
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:
- Current scrollSectionIntoView value. Default value is true
-
setSectionHeaderClass
Widget to use for section headers.Must be a subclass of either
ImgSectionHeader
orSectionHeader
. The default class used depends on the skin;SectionHeader
is the simpler and lighter-weight class and uses CSS styling rather than image-based styling, and is recommended for most use cases.If you create a custom section header class in Java, enable
Reflection
to allow it to be used.Alternatively, you can use the SmartClient class system to create a simple SmartClient subclass of either SectionHeader or ImgSectionHeader for use with this API - see the
Skinning Guide
for details.If you override event handlers on your custom SectionHeader or radically change it's structure such that the default event handling no longer works, you can call
sectionHeaderClick()
to replicate the built-in expand/collapse handling for clicking a section header.Note : This is an advanced setting
- Parameters:
sectionHeaderClass
- New sectionHeaderClass value. Default value is "SectionHeader"- Returns:
SectionStack
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getSectionHeaderClass
Widget to use for section headers.Must be a subclass of either
ImgSectionHeader
orSectionHeader
. The default class used depends on the skin;SectionHeader
is the simpler and lighter-weight class and uses CSS styling rather than image-based styling, and is recommended for most use cases.If you create a custom section header class in Java, enable
Reflection
to allow it to be used.Alternatively, you can use the SmartClient class system to create a simple SmartClient subclass of either SectionHeader or ImgSectionHeader for use with this API - see the
Skinning Guide
for details.If you override event handlers on your custom SectionHeader or radically change it's structure such that the default event handling no longer works, you can call
sectionHeaderClick()
to replicate the built-in expand/collapse handling for clicking a section header.- Returns:
- Current sectionHeaderClass value. Default value is "SectionHeader"
-
setShowExpandControls
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
- New showExpandControls value. Default value is true- Returns:
SectionStack
instance, for chaining setter calls
-
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:
- Current showExpandControls value. Default value is true
-
setStyleName
Default CSS style for the SectionStack as a whole.- Overrides:
setStyleName
in classCanvas
- Parameters:
styleName
- New styleName value. Default value is "sectionStack"- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getStyleName
Default CSS style for the SectionStack as a whole.- Overrides:
getStyleName
in classCanvas
- Returns:
- Current styleName value. Default value is "sectionStack"
- See Also:
-
setUseGlobalSectionIDs
public SectionStack setUseGlobalSectionIDs(Boolean useGlobalSectionIDs) throws IllegalStateException Should any specifiedSectionStackSection.ID
be applied to the generated SectionHeader widget for the section as a widget ID? If set to false, SectionStackSection.ID will behave as a synonym for SectionStackSection.name.- Parameters:
useGlobalSectionIDs
- New useGlobalSectionIDs value. Default value is false- Returns:
SectionStack
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getUseGlobalSectionIDs
Should any specifiedSectionStackSection.ID
be applied to the generated SectionHeader widget for the section as a widget ID? If set to false, SectionStackSection.ID will behave as a synonym for SectionStackSection.name.- Returns:
- Current useGlobalSectionIDs value. Default value is false
-
setVisibilityMode
Whether multiple sections can be expanded.
If this method is called after the component has been drawn/initialized: Setter forvisibilityMode
.- Parameters:
visibilityMode
- newvisibilityMode
setting. If this isVisibilityMode.MUTEX
then all but the first expanded section is collapsed. Default value is "mutex"- Returns:
SectionStack
instance, for chaining setter calls- See Also:
-
getVisibilityMode
Whether multiple sections can be expanded.- Returns:
- Current visibilityMode value. Default value is "mutex"
- See Also:
-
addItem
Add a canvas as an item to a section.- Parameters:
section
- ID or index of the section to add item toitem
- Item to insert into the sectionindex
- Index into section to insert item
-
closeSection
Close a section. This method is invoked fromclose button click
and willremove
the section by default.- Parameters:
section
- section to close
-
collapseSection
public void collapseSection(int sections) Collapse a section or sections. 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:
sections
- Section(s) to collapse. For this parameter, you can pass the position of the section in the SectionStack, the name of the section, or a List of section positions / names- See Also:
-
collapseSection
Collapse a section or sections. 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:
sections
- Section(s) to collapse. For this parameter, you can pass the position of the section in the SectionStack, the name of the section, or a List of section positions / namescallback
- callback to fire when the section has been collapsed- See Also:
-
expandSection
public void expandSection(int sections) Expands a section or sections. 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:
sections
- Section(s) to expand. For this parameter, you can pass the position of the section in the SectionStack, the name of the section, or a List of section names/positions.- See Also:
-
expandSection
Expands a section or sections. 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:
sections
- Section(s) to expand. For this parameter, you can pass the position of the section in the SectionStack, the name of the section, or a List of section names/positions.callback
- callback to fire when the section has been expanded.- See Also:
-
getSectionNames
Returns a list of allsection names
in the order in which they appear in the SectionStack.- Returns:
- list of all section names in the order in which they appear in the SectionStack.
-
getSectionNumber
Returns the position of the specified section in the SectionStack. The numbering is zero-based.- Parameters:
sectionName
- name 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.
-
hideSection
public void hideSection(int sections) Hides a section or sections. 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:
sections
- Section(s) to hide. For this parameter, you can pass the position of the section in the SectionStack, the name of the section, or a List of section names / positions.- See Also:
-
hideSection
Hides a section or sections. 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:
sections
- Section(s) to hide. For this parameter, you can pass the position of the section in the SectionStack, the name of the section, or a List of section names / positions.callback
- to fire when the section has been hidden- See Also:
-
moveSection
public void moveSection(int sections, int position) Moves the specified section(s) to a new position in the SectionStack order. If you pass in multiple sections, then each section will be moved tonewPosition
in the order specified by thesections
argument.- Parameters:
sections
- Section(s) to move. For this parameter, you can pass the position of the section in the SectionStack, the name of the section, or a List of section names/positions.position
- new position index for the section(s).
-
addSectionHeaderClickHandler
Add a SectionHeaderClick 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 interfaceHasSectionHeaderClickHandlers
- Parameters:
handler
- the SectionHeaderClick handler- Returns:
HandlerRegistration
used to remove this handler
-
removeItem
Remove an item from a section.- Parameters:
section
- ID or index of the section to remove item fromitem
- Item to remove
-
removeSection
public void removeSection(int sections) Remove a section or set of sections from the SectionStack. The removed sections' header and controls (if any) are automatically destroyed. A section'sitems
will also be destroyed ifdestroyOnRemove
is set on the section.- Parameters:
sections
- Section(s) to remove. For this parameter, you can pass the position of the section in the SectionStack, thename
of the section, or a List of sectionname
s or indices.- See Also:
-
sectionForItem
Search for a section that contains passed item.- Parameters:
item
- item to show- Returns:
- section that contains passed item.
- See Also:
-
sectionHeaderClick
Method intended to be called by the sectionHeader when it is clicked on.- Parameters:
sectionHeader
- the sectionHeader clicked on
-
sectionIsExpanded
public boolean sectionIsExpanded(int section) Returns true if the specified section is expanded, false if it is collapsed.- Parameters:
section
- Section for which you want to obtain information. For this parameter, you can pass the position of the section in the SectionStack, or the name of the section.- Returns:
- true if the section is expanded, false if it is not.
-
sectionIsVisible
public boolean sectionIsVisible(int section) 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:
section
- Section for which you want to obtain visibility information. For this parameter, you can pass the position of the section in the SectionStack, or the name of the section.- Returns:
- true if the section is visible, false if it is not.
-
setItems
Sets a new list of canvii as items into the specified section by removing the existing items, then adding the new ones. Initial items for a section should be specified using the propertySectionStackSection.items
.- Parameters:
section
- ID or index of the section to set items onitems
- new items to add
-
setSectionProperties
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
addItem()
orremoveItem()
. To change the title of a section, usesetSectionTitle()
.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 modifyproperties
- properties to apply to the section.
-
setSectionTitle
Changes the title of a SectionHeader.- Parameters:
section
- ID or index of the section whose title you want to changenewTitle
- new title for the SectionHeader
-
showSection
public void showSection(int sections) Shows a section or sections. 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:
sections
- Section(s) to show. For this parameter, you can pass the position of the section in the SectionStack, the name of the section, or a List of section names / positions.- See Also:
-
showSection
Shows a section or sections. 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:
sections
- Section(s) to show. For this parameter, you can pass the position of the section in the SectionStack, the name of the section, or a List of section names / positions.callback
- callback to fire when the sections have been shown.- See Also:
-
setDefaultProperties
Class level method to set the default properties of this class. If set, then all existing and subsequently created instances of this class will automatically have default properties corresponding to the properties set on the SmartGWT class instance passed to this function before its underlying SmartClient JS object was created. This is a powerful feature that eliminates the need for users to create a separate hierarchy of subclasses that only alter the default properties of this class. Can also be used for skinning / styling purposes.Note: This method is intended for setting default attributes only and will affect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route.
- Parameters:
sectionStackProperties
- properties that should be used as new defaults when instances of this class are created- See Also:
-
setSectionHeaderClass
public void setSectionHeaderClass(Class<? extends Canvas> sectionHeaderClass) throws IllegalStateException - Throws:
IllegalStateException
-
setSections
-
addSection
Add a section to the SectionStack.- Parameters:
section
- the section to add
-
addSection
Add a section to the SectionStack.- Parameters:
section
- the section to addposition
- index for the new section
-
removeSection
- Parameters:
sectionID
- the section ID- See Also:
-
expandSection
- Parameters:
sectionID
- the section ID- See Also:
-
collapseSection
- Parameters:
sectionID
- the section ID- See Also:
-
hideSection
- Parameters:
sectionID
- the section ID- See Also:
-
showSection
- Parameters:
sectionID
- the section ID- See Also:
-
moveSection
- Parameters:
sectionID
- the section IDposition
- new position index for the section- See Also:
-
sectionIsExpanded
- Parameters:
sectionID
- the section ID- Returns:
- true if the section is expanded, false if it is not.
- See Also:
-
sectionIsVisible
- Parameters:
sectionID
- the section ID- Returns:
- true if the section is visible, false if it is not
- See Also:
-
setSectionTitle
- Parameters:
index
- index of the section whose title you want to changenewTitle
- new title for the Section Header- See Also:
-
getSection
Return the SectionStackSection for a section.- Parameters:
sectionID
- ID of the section for which you want the header- Returns:
- the section indicated
-
getSection
Return the SectionStackSection for a section.- Parameters:
index
- index of the section for which you want the header- Returns:
- the section header indicated
-
getSections
Return all the SectionStackSections in this SectionStack.- Returns:
- an array of the section headers
-
setSectionProperties
- Parameters:
section
- ID or index of the section to modifyproperties
- properties to apply to the section.- See Also:
-
revealChild
Reveals the child Canvas passed in by expanding the section containing that child if it is currently collapsed. If no section in this sectionStack contains the passed-in Canvas, this method has no effectNOTE: This is an override point.
- Overrides:
revealChild
in classLayout
- Parameters:
childID
- the global ID of the child Canvas to reveal
-
revealChild
Reveals the child Canvas passed in by expanding the section containing that child if it is currently collapsed. If no section in this sectionStack contains the passed-in Canvas, this method has no effectNOTE: This is an override point.
- Overrides:
revealChild
in classLayout
- Parameters:
child
- the child Canvas to reveal
-
setLogicalStructure
Setter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility. -
getLogicalStructure
Getter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility.- Specified by:
getLogicalStructure
in interfaceLogicalStructure
- Overrides:
getLogicalStructure
in classVLayout
-