|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.smartgwt.client.widgets.BaseWidget
com.smartgwt.client.widgets.Canvas
com.smartgwt.client.widgets.layout.Layout
com.smartgwt.client.widgets.layout.VLayout
com.smartgwt.client.widgets.layout.SectionStack
public class SectionStack
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, nativeObject, 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(SectionHeaderClickHandler handler)
Add a SectionHeaderClick 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 |
getCanCollapseAll()
In visibilityMode "mutex", whether to allow
the last remaining expanded section to be collapsed. |
Boolean |
getCanDropComponents()
SectionStacks provide the same default implementation of drag and drop interactions as Layouts, except that members are added as items into the
section over which they're dropped. |
Boolean |
getCanReorderSections()
Whether sections can be drag reordered by the user dragging the section header. |
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. |
LocatorStrategy |
getLocateSectionsBy()
When AutoTest.getElement is used to parse locator strings generated by link{isc.AutoTest.getLocator()}, how should sections within this stack be identified? By default if section has a specified name this will always be used. |
LocatorTypeStrategy |
getLocateSectionsType()
LocatorTypeStrategy to use when finding Sections within this section Stack. |
com.smartgwt.logicalstructure.core.LogicalStructureObject |
getLogicalStructure()
|
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
accommodate 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 SectionStackSection for a section. |
SectionStackSection |
getSection(String sectionID)
Return the SectionStackSection for a section. |
String |
getSectionHeaderClass()
Name of a Smart GWT class to use for creating section headers. |
int |
getSectionNumber(String sectionName)
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. |
String |
getStyleName()
Default CSS style for the SectionStack as a whole. |
Boolean |
getUseGlobalSectionIDs()
Should any specified 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. |
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. |
SectionStackSection |
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 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 |
setCanCollapseAll(Boolean canCollapseAll)
In visibilityMode "mutex", whether to allow
the last remaining expanded section to be collapsed. |
void |
setCanDropComponents(Boolean canDropComponents)
SectionStacks provide the same default implementation of drag and drop interactions as Layouts, except that members are added as items into the
section over which they're dropped. |
void |
setCanReorderSections(Boolean canReorderSections)
Whether sections can be drag reordered by the user dragging the section header. |
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. |
static void |
setDefaultProperties(SectionStack sectionStackProperties)
Class level method to set the default properties of this class. |
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 |
setJavaScriptObject(JavaScriptObject jsObj)
|
void |
setLocateSectionsBy(LocatorStrategy locateSectionsBy)
When AutoTest.getElement is used to parse locator strings generated by link{isc.AutoTest.getLocator()}, how should sections within this stack be identified? By default if section has a specified name this will always be used. |
void |
setLocateSectionsType(LocatorTypeStrategy locateSectionsType)
LocatorTypeStrategy to use when finding Sections within this section Stack. |
com.smartgwt.logicalstructure.core.LogicalStructureObject |
setLogicalStructure(com.smartgwt.logicalstructure.widgets.layout.SectionStackLogicalStructure s)
|
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
accommodate 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 a Smart GWT class to use for creating section headers. |
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 |
setStyleName(String styleName)
Default CSS style for the SectionStack as a whole. |
void |
setUseGlobalSectionIDs(Boolean useGlobalSectionIDs)
Should any specified 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. |
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.VLayout |
|---|
setDefaultProperties, setLogicalStructure |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, 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, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, 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 |
|---|
public SectionStack()
public SectionStack(JavaScriptObject jsObj)
| Method Detail |
|---|
public static SectionStack getOrCreateRef(JavaScriptObject jsObj)
public void setJavaScriptObject(JavaScriptObject jsObj)
setJavaScriptObject in class VLayoutprotected JavaScriptObject create()
create in class VLayoutpublic void setAnimateSections(Boolean animateSections)
animateSections - animateSections Default value is nullpublic Boolean getAnimateSections()
public void setCanCollapseAll(Boolean canCollapseAll)
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).
canCollapseAll - canCollapseAll Default value is truepublic Boolean getCanCollapseAll()
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).
public void setCanDropComponents(Boolean canDropComponents)
throws IllegalStateException
Layouts, 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 canAcceptDrop to true and
canDropComponents to false on your SectionStack.
Note : This is an advanced setting
setCanDropComponents in class LayoutcanDropComponents - canDropComponents Default value is true
IllegalStateException - this property cannot be changed after the component has been createdDragdrop overview and related methodspublic Boolean getCanDropComponents()
Layouts, 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 canAcceptDrop to true and
canDropComponents to false on your SectionStack.
getCanDropComponents in class LayoutDragdrop overview and related methods
public void setCanReorderSections(Boolean canReorderSections)
throws IllegalStateException
Note that, with
canReorderSections:true, sections with section.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
canReorderSections - canReorderSections Default value is false
IllegalStateException - this property cannot be changed after the component has been createdpublic Boolean getCanReorderSections()
Note that, with
canReorderSections:true, sections with section.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).
public void setCanResizeSections(Boolean canResizeSections)
throws IllegalStateException
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
canResizeSections - canResizeSections Default value is true
IllegalStateException - this property cannot be changed after the component has been createdpublic Boolean getCanResizeSections()
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.
public void setCanTabToHeaders(Boolean canTabToHeaders)
throws IllegalStateException
If unset, section headers will be focusable if
setScreenReaderMode has been called. See Accessibility.
Note : This is an advanced setting
canTabToHeaders - canTabToHeaders Default value is null
IllegalStateException - this property cannot be changed after the component has been createdpublic Boolean getCanTabToHeaders()
If unset, section headers will be focusable if
setScreenReaderMode has been called. See Accessibility.
public void setHeaderHeight(int headerHeight)
throws IllegalStateException
headerHeight - headerHeight Default value is 20
IllegalStateException - this property cannot be changed after the component has been createdpublic int getHeaderHeight()
public void setItemEndIndent(int itemEndIndent)
itemEndIndent - itemEndIndent Default value is undefinedLayoutMember overview and related methodspublic int getItemEndIndent()
LayoutMember overview and related methodspublic void setItemIndent(int itemIndent)
itemStartIndent or itemEndIndent. Setting itemIndent is equivalent to
setting itemStartIndent to the same amount and itemEndIndent to 0.
itemIndent - itemIndent Default value is 0LayoutMember overview and related methodspublic int getItemIndent()
itemStartIndent or itemEndIndent. Setting itemIndent is equivalent to
setting itemStartIndent to the same amount and itemEndIndent to 0.
LayoutMember overview and related methodspublic void setItemStartIndent(int itemStartIndent)
itemIndent.
itemStartIndent - itemStartIndent Default value is undefinedLayoutMember overview and related methodspublic int getItemStartIndent()
itemIndent.
LayoutMember overview and related methodspublic void setLocateSectionsBy(LocatorStrategy locateSectionsBy)
"title" use the title as an
identifier"index" use the index of the section in the sections array as an identifierNote : This is an advanced setting
locateSectionsBy - locateSectionsBy Default value is nullpublic LocatorStrategy getLocateSectionsBy()
"title" use the title as an
identifier"index" use the index of the section in the sections array as an identifier
public void setLocateSectionsType(LocatorTypeStrategy locateSectionsType)
LocatorTypeStrategy to use when finding Sections within this section Stack.
Note : This is an advanced setting
locateSectionsType - locateSectionsType Default value is nullpublic LocatorTypeStrategy getLocateSectionsType()
LocatorTypeStrategy to use when finding Sections within this section Stack.
public void setOverflow(Overflow overflow)
throws IllegalStateException
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
accommodate the resized sections.
setOverflow in class Layoutoverflow - overflow Default value is "hidden"
IllegalStateException - this property cannot be changed after the component has been createdSizing overview and related methodspublic Overflow getOverflow()
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
accommodate the resized sections.
getOverflow in class LayoutSizing overview and related methods
public void setScrollSectionIntoView(Boolean scrollSectionIntoView)
throws IllegalStateException
scrollSectionIntoView - scrollSectionIntoView Default value is true
IllegalStateException - this property cannot be changed after the component has been createdpublic Boolean getScrollSectionIntoView()
public void setSectionHeaderClass(String sectionHeaderClass)
throws IllegalStateException
"SectionHeader" or "ImgSectionHeader" depending on the skin. You can use the
SmartClient class system to create a simple Smart GWT subclass of either SectionHeader or ImgSectionHeader for use
with this API - see the Skinning Guide for details.
Note : This is an advanced setting
sectionHeaderClass - . See Classname. Default value is "SectionHeader"
IllegalStateException - this property cannot be changed after the component has been createdpublic String getSectionHeaderClass()
"SectionHeader" or "ImgSectionHeader" depending on the skin. You can use the
SmartClient class system to create a simple Smart GWT subclass of either SectionHeader or ImgSectionHeader for use
with this API - see the Skinning Guide for details.
Classnamepublic void setShowExpandControls(Boolean showExpandControls)
showExpandControls - showExpandControls Default value is truepublic Boolean getShowExpandControls()
public void setStyleName(String styleName)
throws IllegalStateException
setStyleName in class CanvasstyleName - . See CSSStyleName. Default value is "sectionStack"
IllegalStateException - this property cannot be changed after the component has been createdAppearance overview and related methods,
CSS styles Examplepublic String getStyleName()
getStyleName in class CanvasCSSStyleNameAppearance overview and related methods,
CSS styles Example
public void setUseGlobalSectionIDs(Boolean useGlobalSectionIDs)
throws IllegalStateException
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.
useGlobalSectionIDs - useGlobalSectionIDs Default value is false
IllegalStateException - this property cannot be changed after the component has been createdpublic Boolean getUseGlobalSectionIDs()
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.
public void setVisibilityMode(VisibilityMode visibilityMode)
visibilityMode - visibilityMode Default value is "mutex"VisibilityMode,
Expand / Collapse Examplepublic VisibilityMode getVisibilityMode()
VisibilityMode,
Expand / Collapse Examplepublic int getSectionNumber(String sectionName)
sectionName - name of a section for which you want to obtain the position.
public HandlerRegistration addSectionHeaderClickHandler(SectionHeaderClickHandler handler)
Notification method fired when the user clicks on a section header. Returning false will cancel the default behavior (expanding / collapsing the section)
addSectionHeaderClickHandler in interface HasSectionHeaderClickHandlershandler - the SectionHeaderClick handler
HandlerRegistration used to remove this handlerpublic SectionStackSection sectionForItem(Canvas item)
item - item to show
public void sectionHeaderClick(Canvas sectionHeader)
sectionHeader - the sectionHeader clicked onpublic static void setDefaultProperties(SectionStack sectionStackProperties)
Note: This method is intended for setting default attributes only and will effect 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.
sectionStackProperties - properties that should be used as new defaults when instances of this class are createdpublic void setSections(SectionStackSection... sections)
public void addSection(SectionStackSection section)
section - the section to add
public void addSection(SectionStackSection section,
int position)
section - the section to addposition - index for the new sectionpublic void removeSection(int index)
index - the section indexpublic void removeSection(String sectionID)
sectionID - the section IDpublic void expandSection(int index)
index - the section indexpublic void expandSection(String sectionID)
sectionID - the section IDpublic void collapseSection(int index)
index - the section indexpublic void collapseSection(String sectionID)
sectionID - the section IDpublic void hideSection(int index)
index - the section indexpublic void hideSection(String sectionID)
sectionID - the section IDpublic void showSection(int index)
index - the section indexpublic void showSection(String sectionID)
sectionID - the section ID
public void moveSection(int index,
int position)
index - the section indexposition - new position index for the section
public void moveSection(String sectionID,
int position)
sectionID - the section IDposition - new position index for the sectionpublic boolean sectionIsExpanded(int index)
index - position of the section in the SectionStack
public boolean sectionIsExpanded(String sectionID)
sectionID - the section ID
public boolean sectionIsVisible(int index)
index - position of the section in the SectionStack
public boolean sectionIsVisible(String sectionID)
sectionID - the section ID
public void setSectionTitle(String sectionID,
String newTitle)
sectionID - ID of the section whose title you want to changenewTitle - new title for the Section Header
public void setSectionTitle(int index,
String newTitle)
index - index of the section whose title you want to changenewTitle - new title for the Section Headerpublic SectionStackSection getSection(String sectionID)
sectionID - ID of the section for which you want the header
public SectionStackSection getSection(int index)
index - index of the section for which you want the header
public SectionStackSection[] getSections()
public void setSectionProperties(String section,
SectionStackSection properties)
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.
section - ID or index of the section to modifyproperties - properties to apply to the section.
public void setSectionProperties(int section,
SectionStackSection properties)
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.
section - ID or index of the section to modifyproperties - properties to apply to the section.public com.smartgwt.logicalstructure.core.LogicalStructureObject setLogicalStructure(com.smartgwt.logicalstructure.widgets.layout.SectionStackLogicalStructure s)
public com.smartgwt.logicalstructure.core.LogicalStructureObject getLogicalStructure()
getLogicalStructure in interface LogicalStructuregetLogicalStructure in class VLayout
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||