|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.extjs.gxt.ui.client.event.BaseObservable
com.extjs.gxt.ui.client.widget.Layout
com.extjs.gxt.ui.client.widget.layout.BorderLayout
public class BorderLayout
This is a multi-pane, application-oriented UI layout style that supports multiple regions, automatic split bars between regions and built-in expanding and collapsing of regions.
The children of the container using a border layout positions it's children absolutely. Because of this, a specific height and width must be set on any container using a border layout. The size can be set directly, or by a parent layout. Rather then act on the child components directly, expanding, collapsing, hiding, and showing use the methods provided by border layout (expand(com.extjs.gxt.ui.client.Style.LayoutRegion), collapse(com.extjs.gxt.ui.client.Style.LayoutRegion), hide(com.extjs.gxt.ui.client.Style.LayoutRegion), and collapse(com.extjs.gxt.ui.client.Style.LayoutRegion).
Be default, this layout adds a CSS style to the parent container (defaults to
'x-border-layout-ct') which gives the container a background color.
Code snippet:
public class BorderLayoutExample extends LayoutContainer {
public BorderLayoutExample() {
setLayout(new BorderLayout());
ContentPanel west = new ContentPanel();
ContentPanel center = new ContentPanel();
BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST, 200);
westData.setSplit(true);
westData.setCollapsible(true);
westData.setMargins(new Margins(5));
BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
centerData.setMargins(new Margins(5, 0, 5, 0));
add(west, westData);
add(center, centerData);
}
}
| Constructor Summary | |
|---|---|
BorderLayout()
|
|
| Method Summary | |
|---|---|
void |
collapse(Style.LayoutRegion region)
Collapses the panel in the given region. |
void |
expand(Style.LayoutRegion region)
Expands the panel in the given region. |
boolean |
getEnableState()
Returns true if state is enabled. |
void |
hide(Style.LayoutRegion region)
|
void |
setContainerStyle(java.lang.String style)
Sets the CSS style name to be added to the layout's container (defaults to 'x-border-layout-ct'). |
void |
setEnableState(boolean enableState)
True to enabled state (defaults to true). |
void |
show(Style.LayoutRegion region)
|
| Methods inherited from class com.extjs.gxt.ui.client.widget.Layout |
|---|
getExtraStyle, getResizeDelay, isRenderHidden, layout, setContainer, setExtraStyle, setRenderHidden, setResizeDelay |
| Methods inherited from class com.extjs.gxt.ui.client.event.BaseObservable |
|---|
addListener, fireEvent, fireEvent, getFiresEvents, getListeners, hasActiveEvent, hasListeners, hasListeners, removeAllListeners, removeListener, setFiresEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BorderLayout()
| Method Detail |
|---|
public void collapse(Style.LayoutRegion region)
region - the region to be collapsedpublic void expand(Style.LayoutRegion region)
region - the region to expandpublic boolean getEnableState()
public void hide(Style.LayoutRegion region)
public void setContainerStyle(java.lang.String style)
style - the style namepublic void setEnableState(boolean enableState)
enableState - true to enable statepublic void show(Style.LayoutRegion region)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||