|
EchoPoint API - 3.0.0b5 App Webcontainer |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnextapp.echo.app.Component
echopoint.internal.AbstractContainer
echopoint.BorderLayout
public class BorderLayout
An implementation of BorderLayout using a HTML table with
three rows, and three columns. Note that similar to pane containers, this
component supports only one child component per region.
The following shows sample use of this container component.
import echopoint.BorderLayout;
import echopoint.HtmlLabel;
import nextapp.echo.app.Alignment;
import nextapp.echo.app.Color;
import nextapp.echo.app.Extent;
import nextapp.echo.app.layout.TableLayoutData;
...
final BorderLayout container = new BorderLayout();
container.setWidth( new Extent( 500 ) );
HtmlLabel label = new HtmlLabel( "North" );
TableLayoutData layout = new TableLayoutData();
layout.setAlignment( Alignment.ALIGN_CENTER );
layout.setBackground( new Color( 0x0000ff ) );
label.setLayoutData( layout );
container.add( label, BorderLayout.Region.north );
...
parent.add( container );
| Nested Class Summary | |
|---|---|
static class |
BorderLayout.Region
Enumeration for the regions in a border layout. |
| Field Summary |
|---|
| Fields inherited from class echopoint.internal.AbstractContainer |
|---|
ACTION_COMMAND_PROPERTY, ACTION_LISTENERS_CHANGED_PROPERTY, INPUT_ACTION, PROPERTY_ALIGNMENT, PROPERTY_BACKGROUND_IMAGE, PROPERTY_BORDER, PROPERTY_HEIGHT, PROPERTY_INSETS, PROPERTY_WIDTH |
| Constructor Summary | |
|---|---|
BorderLayout()
Default constructor. |
|
BorderLayout(List<Component> list)
Create a new instance using the specified list of child components in order BorderLayout.Region.north, BorderLayout.Region.west, BorderLayout.Region.center,
BorderLayout.Region.east, and BorderLayout.Region.south. |
|
| Method Summary | |
|---|---|
void |
add(Component component)
Over-ridden to add the component to BorderLayout.Region.center. |
void |
add(Component component,
BorderLayout.Region region)
Add the specified child component to the specified region. |
void |
add(Component component,
int index)
Over-ridden to add the component to BorderLayout.Region.center. |
void |
dispose()
Over-ridden to clear the maps used to maintain region to child index relationships. |
Component |
getComponent(BorderLayout.Region region)
Return the child component for the specified region. |
| Methods inherited from class echopoint.internal.AbstractContainer |
|---|
addActionListener, fireActionPerformed, getAlignment, getBackgroundImage, getBorder, getHeight, getInsets, getWidth, hasActionListeners, removeActionListener, setAlignment, setBackgroundImage, setBorder, setHeight, setInsets, setWidth |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BorderLayout()
public BorderLayout(List<Component> list)
BorderLayout.Region.north, BorderLayout.Region.west, BorderLayout.Region.center,
BorderLayout.Region.east, and BorderLayout.Region.south. If the specified list has
only one child, it is added to the BorderLayout.Region.center area.
list - The list of child components.
IllegalArgumentException - If the list contains more than 5 components.| Method Detail |
|---|
public void add(Component component,
BorderLayout.Region region)
component - The child component to add to the layout container.region - The region to which the component is to be added.
IllegalArgumentException - If a component already exists at the
specified region index.
public void add(Component component,
int index)
throws IllegalChildException
BorderLayout.Region.center.
add in class ComponentIllegalArgumentException - If invoked more than once or if the
index is greater than 0.
IllegalChildExceptionpublic void add(Component component)
BorderLayout.Region.center.
add in class ComponentIllegalArgumentException - If invoked more than once.public Component getComponent(BorderLayout.Region region)
region - The region for which the child component is to be retrieved.
null if no child exists.public void dispose()
dispose in class Component
|
EchoPoint API - 3.0.0b5 App Webcontainer |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||