|
||||||||||
| 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.sencha.gxt.widget.core.client.Component
com.sencha.gxt.widget.core.client.container.Container
com.sencha.gxt.widget.core.client.container.ResizeContainer
com.sencha.gxt.widget.core.client.container.InsertResizeContainer
com.sencha.gxt.widget.core.client.container.AccordionLayoutContainer
public class AccordionLayoutContainer
A layout container that manages multiple content panels in an expandable
accordion style such that only one panel can be expanded at any given time
(by default). Each panel has built-in support for expanding and collapsing.
Note: Only ContentPanel's and subclasses may be used in an accordion
layout container. Each content panel should be created with
AccordionLayoutContainer.AccordionLayoutAppearance to produce the expected accordion panel
look and feel. The AccordionLayoutAppearance must be created
using the GWT.create(Class) method to enable GWT class substitution,
as illustrated in the following code snippet.
AccordionLayoutContainer con = new AccordionLayoutContainer();
AccordionLayoutAppearance appearance = GWT. create(AccordionLayoutAppearance.class);
ContentPanel cp = new ContentPanel(appearance);
cp.setHeadingText("Accordion Item 1");
cp.add(new Label("Accordion Content 1"));
con.add(cp);
con.setActiveWidget(cp);
cp = new ContentPanel(appearance);
cp.setHeadingText("Accordion Item 2");
cp.add(new Label("Accordion Content 2"));
con.add(cp);
cp = new ContentPanel(appearance);
cp.setHeadingText("Accordion Item 3");
cp.add(new Label("Accordion Content 3"));
con.add(cp);
Viewport v = new Viewport();
v.add(con);
RootPanel.get().add(v);
| Nested Class Summary | |
|---|---|
static interface |
AccordionLayoutContainer.AccordionLayoutAppearance
AccordionLayoutContainer appearance. |
static class |
AccordionLayoutContainer.ExpandMode
Defines the expand modes. |
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
| Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.InsertPanel |
|---|
InsertPanel.ForIsWidget |
| Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets |
|---|
HasWidgets.ForIsWidget |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
AccordionLayoutContainer()
Creates a new accordion layout container. |
|
| Method Summary | |
|---|---|
boolean |
getActiveOnTop()
Returns true if the active item if first. |
Widget |
getActiveWidget()
Returns the active widget. |
AccordionLayoutContainer.ExpandMode |
getExpandMode()
Returns the expand mode. |
boolean |
isHideCollapseTool()
Returns true if the collapse tool is hidden. |
boolean |
isTitleCollapse()
Returns true if title collapse is enabled. |
void |
setActiveOnTop(boolean activeOnTop)
True to swap the position of each panel as it is expanded so that it becomes the first item in the container, false to keep the panels in the rendered order (defaults to false). |
void |
setActiveWidget(Widget widget)
Sets the active widget. |
void |
setExpandMode(AccordionLayoutContainer.ExpandMode expandMode)
Sets the expand mode (defaults to AccordionLayoutContainer.ExpandMode.SINGLE_FILL). |
void |
setHideCollapseTool(boolean hideCollapseTool)
True to hide the contained panels' collapse/expand toggle buttons, false to display them (defaults to false). |
void |
setTitleCollapse(boolean titleCollapse)
True to allow expand/collapse of each contained panel by clicking anywhere on the title bar, false to allow expand/collapse only when the toggle tool button is clicked (defaults to true). |
| Methods inherited from class com.sencha.gxt.widget.core.client.container.InsertResizeContainer |
|---|
insert, insert |
| Methods inherited from class com.sencha.gxt.widget.core.client.container.ResizeContainer |
|---|
forceLayout, isLayoutRunning, isOrWasLayoutRunning, onResize |
| Methods inherited from class com.sencha.gxt.widget.core.client.container.Container |
|---|
add, add, addAddHandler, addBeforeAddHandler, addBeforeRemoveHandler, addContainerHandler, addRemoveHandler, clear, disable, enable, findWidget, getItemByItemId, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, iterator, remove, remove, remove |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, removeStyleName, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.google.gwt.user.client.ui.InsertPanel.ForIsWidget |
|---|
add |
| Methods inherited from interface com.google.gwt.user.client.ui.InsertPanel |
|---|
add |
| Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget |
|---|
getWidgetIndex |
| Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel |
|---|
getWidget, getWidgetCount, getWidgetIndex, remove |
| Constructor Detail |
|---|
public AccordionLayoutContainer()
| Method Detail |
|---|
public boolean getActiveOnTop()
public Widget getActiveWidget()
HasActiveWidget
getActiveWidget in interface HasActiveWidgetpublic AccordionLayoutContainer.ExpandMode getExpandMode()
public boolean isHideCollapseTool()
public boolean isTitleCollapse()
public void setActiveOnTop(boolean activeOnTop)
activeOnTop - true to keep the active item on toppublic void setActiveWidget(Widget widget)
HasActiveWidget
setActiveWidget in interface HasActiveWidgetwidget - the widgetpublic void setExpandMode(AccordionLayoutContainer.ExpandMode expandMode)
AccordionLayoutContainer.ExpandMode.SINGLE_FILL).
expandMode - the modepublic void setHideCollapseTool(boolean hideCollapseTool)
titleCollapse
should be true also.
hideCollapseTool - true to hide the collapse toolpublic void setTitleCollapse(boolean titleCollapse)
hideCollapseTool should be false also.
titleCollapse - true for title collapse
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||