|
||||||||||
| 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.SimpleContainer
com.sencha.gxt.widget.core.client.container.BorderLayoutContainer
public class BorderLayoutContainer
A multi-pane, application-oriented layout container that supports multiple regions, automatic split bars between regions and built-in expanding and collapsing of regions.
Region positions are specified using compass points (e.g. north for top, west for left, east for right, south for bottom) and center. The center region is a privileged position that receives the remaining space not allocated to other regions. Border layout containers should generally specify a center region and one or more other regions. Region layout parameters are specified usingBorderLayoutContainer.BorderLayoutData which
controls the margin between the regions, the size of the region, the minimum
and maximum size, whether the region has a split bar, whether the region is
collapsible and other details.
Region size may be specified as a percent of the parent container size or a
fixed number of pixels. The region size is specified as a single value that
describes the orientation associated with the region (height for north and
south, width for west and east).
The size, split bar and collapsible attributes are specified in the
BorderLayoutData for the region adjacent to the center region.
Code Snippet:
BorderLayoutContainer con = new BorderLayoutContainer();
ContentPanel cp = new ContentPanel();
cp.setHeadingText("North");
cp.add(new Label("North Content"));
BorderLayoutData d = new BorderLayoutData(.20);
d.setMargins(new Margins(5));
d.setCollapsible(true);
d.setSplit(true);
con.setNorthWidget(cp, d);
cp = new ContentPanel();
cp.setHeadingText("West");
cp.add(new Label("West Content"));
d = new BorderLayoutData(.20);
d.setMargins(new Margins(0, 5, 5, 5));
d.setCollapsible(true);
d.setSplit(true);
d.setCollapseMini(true);
con.setWestWidget(cp, d);
cp = new ContentPanel();
cp.setHeadingText("Center");
cp.add(new Label("Center Content"));
d = new BorderLayoutData();
d.setMargins(new Margins(0, 5, 5, 0));
con.setCenterWidget(cp, d);
Viewport v = new Viewport();
v.add(con);
RootPanel.get().add(v);
| Nested Class Summary | |
|---|---|
static interface |
BorderLayoutContainer.BorderLayoutAppearance
|
static class |
BorderLayoutContainer.BorderLayoutData
Specifies region layout parameters which control the margin between the regions, the size of the region, the minimum and maximum size, whether the region has a split bar, whether the region is collapsible and other details. |
| 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.HasWidgets |
|---|
HasWidgets.ForIsWidget |
| Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel |
|---|
IndexedPanel.ForIsWidget |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
BorderLayoutContainer()
Creates a border layout container with the default appearance. |
|
BorderLayoutContainer(BorderLayoutContainer.BorderLayoutAppearance appearance)
Creates a border layout container with the specified appearance. |
|
| Method Summary | |
|---|---|
HandlerRegistration |
addCollapseHandler(CollapseItemEvent.CollapseItemHandler<ContentPanel> handler)
Adds a CollapseItemEvent.CollapseItemHandler handler for CollapseItemEvent
events. |
HandlerRegistration |
addExpandHandler(ExpandItemEvent.ExpandItemHandler<ContentPanel> handler)
Adds a ExpandItemEvent.ExpandItemHandler handler for ExpandItemEvent events. |
void |
collapse(Style.LayoutRegion region)
Collapses the panel in the given region. |
void |
expand(Style.LayoutRegion region)
Expands the panel in the given region. |
Widget |
getCenterWidget()
Returns the center widget or null if one has not been set. |
Widget |
getEastWidget()
Returns the east widget or null if one has not been set. |
Widget |
getNorthWidget()
Returns the north widget or null if one has not been set. |
Widget |
getRegionWidget(Style.LayoutRegion region)
Returns the widget in the specified region, or null if there is no widget for that region. |
Widget |
getSouthWidget()
Returns the south widget or null if one has not been set. |
Widget |
getWestWidget()
Returns the west widget or null if one has not been set. |
void |
hide(Style.LayoutRegion region)
Hides the component in the given region. |
void |
setCenterWidget(IsWidget child)
Sets the center widget, replacing any existing center widget. |
void |
setCenterWidget(IsWidget child,
MarginData layoutData)
Sets the widget in the center region of the border layout container. |
void |
setEastWidget(IsWidget child)
Sets the east widget, replacing any existing east widget. |
void |
setEastWidget(IsWidget child,
BorderLayoutContainer.BorderLayoutData layoutData)
Sets the widget in the east (right) region of the border layout container. |
void |
setNorthWidget(IsWidget child)
Sets the north widget, replacing any existing north widget. |
void |
setNorthWidget(IsWidget child,
BorderLayoutContainer.BorderLayoutData layoutData)
Sets the widget in the north (top) region of the border layout container. |
void |
setSouthWidget(IsWidget child)
Sets the south widget, replacing any existing south widget. |
void |
setSouthWidget(IsWidget child,
BorderLayoutContainer.BorderLayoutData layoutData)
Sets the widget in the south (bottom) region of the border layout container. |
void |
setWestWidget(IsWidget child)
Sets the west widget, replacing any existing est widget. |
void |
setWestWidget(IsWidget child,
BorderLayoutContainer.BorderLayoutData layoutData)
Sets the widget in the west (left) region of the border layout container. |
void |
show(Style.LayoutRegion region)
Shows the component in the given region. |
| Methods inherited from class com.sencha.gxt.widget.core.client.container.SimpleContainer |
|---|
add, add, getWidget, isResize, setResize, setWidget, setWidget |
| 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, 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 |
| Constructor Detail |
|---|
public BorderLayoutContainer()
public BorderLayoutContainer(BorderLayoutContainer.BorderLayoutAppearance appearance)
appearance - the appearance of the border layout container| Method Detail |
|---|
public HandlerRegistration addCollapseHandler(CollapseItemEvent.CollapseItemHandler<ContentPanel> handler)
CollapseItemEvent.HasCollapseItemHandlersCollapseItemEvent.CollapseItemHandler handler for CollapseItemEvent
events.
addCollapseHandler in interface CollapseItemEvent.HasCollapseItemHandlers<ContentPanel>handler - the handler
public HandlerRegistration addExpandHandler(ExpandItemEvent.ExpandItemHandler<ContentPanel> handler)
ExpandItemEvent.HasExpandItemHandlersExpandItemEvent.ExpandItemHandler handler for ExpandItemEvent events.
addExpandHandler in interface ExpandItemEvent.HasExpandItemHandlers<ContentPanel>handler - the handler
public void collapse(Style.LayoutRegion region)
region - the region to be collapsedpublic void expand(Style.LayoutRegion region)
region - the region to expandpublic Widget getCenterWidget()
HasCenterWidget
getCenterWidget in interface HasCenterWidgetpublic Widget getEastWidget()
HasEastWidget
getEastWidget in interface HasEastWidgetpublic Widget getNorthWidget()
HasNorthWidget
getNorthWidget in interface HasNorthWidgetpublic Widget getRegionWidget(Style.LayoutRegion region)
region - the region
public Widget getSouthWidget()
HasSouthWidget
getSouthWidget in interface HasSouthWidgetpublic Widget getWestWidget()
HasWestWidget
getWestWidget in interface HasWestWidgetpublic void hide(Style.LayoutRegion region)
region - the layout regionpublic void setCenterWidget(IsWidget child)
HasCenterWidget
setCenterWidget in interface HasCenterWidgetchild - the new widget to place in the center position of the
container
@UiChild(limit=1,
tagname="center")
public void setCenterWidget(IsWidget child,
MarginData layoutData)
child - the widget to put in the center regionlayoutData - the layout data for the widgetpublic void setEastWidget(IsWidget child)
HasEastWidget
setEastWidget in interface HasEastWidgetchild - the new widget to place in the east position of the container
@UiChild(limit=1,
tagname="east")
public void setEastWidget(IsWidget child,
BorderLayoutContainer.BorderLayoutData layoutData)
child - the widget to put in the east regionlayoutData - the layout data for the widgetpublic void setNorthWidget(IsWidget child)
HasNorthWidget
setNorthWidget in interface HasNorthWidgetchild - the new widget to place in the north position of the
container
@UiChild(limit=1,
tagname="north")
public void setNorthWidget(IsWidget child,
BorderLayoutContainer.BorderLayoutData layoutData)
child - the widget to put in the north regionlayoutData - the layout data for the widgetpublic void setSouthWidget(IsWidget child)
HasSouthWidget
setSouthWidget in interface HasSouthWidgetchild - the new widget to place in the south position of the
container
@UiChild(limit=1,
tagname="south")
public void setSouthWidget(IsWidget child,
BorderLayoutContainer.BorderLayoutData layoutData)
child - the widget to put in the south regionlayoutData - the layout data for the widgetpublic void setWestWidget(IsWidget child)
HasWestWidget
setWestWidget in interface HasWestWidgetchild - the new widget to place in the west position of the container
@UiChild(limit=1,
tagname="west")
public void setWestWidget(IsWidget child,
BorderLayoutContainer.BorderLayoutData layoutData)
child - the widget to put in the west regionlayoutData - the layout data for the widgetpublic void show(Style.LayoutRegion region)
region - the layout region
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||