Java DTV API 1.3
18-Nov-2009

com.sun.dtv.lwuit.layouts
Class BorderLayout

java.lang.Object
  extended by com.sun.dtv.lwuit.layouts.Layout
      extended by com.sun.dtv.lwuit.layouts.BorderLayout

public class BorderLayout
extends Layout

A border layout lays out a container, arranging and resizing its components to fit in five regions: north, south, east, west, and center. Each region may contain no more than one component, and is identified by a corresponding constant: NORTH, SOUTH, EAST, WEST, and CENTER. When adding a component to a container with a border layout, use one of these five constants.


Field Summary
static String CENTER
          The center layout constraint (middle of container).
static String EAST
          The east layout constraint (right of container).
static String NORTH
          The north layout constraint (top of container).
static String SOUTH
          The south layout constraint (bottom of container).
static String WEST
          The west layout constraint (left of container).
 
Constructor Summary
BorderLayout()
          Creates a new instance of BorderLayout.
 
Method Summary
 void addLayoutComponent(Object name, Component comp, Container c)
          Some layouts can optionally track the addition of elements with meta-data that allows the user to "hint" on object positioning.
 Object getComponentConstraint(Component comp)
          Returns the component's constraint.
 Dimension getPreferredSize(Container parent)
          Returns the container preferred size.
 void layoutContainer(Container target)
          Layout the given parent container children.
 void removeLayoutComponent(Component comp)
          Removes the component from the layout this operation is only useful if the layout maintains references to components within it.
 
Methods inherited from class com.sun.dtv.lwuit.layouts.Layout
isOverlapSupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NORTH

public static final String NORTH
The north layout constraint (top of container).

See Also:
Constant Field Values

SOUTH

public static final String SOUTH
The south layout constraint (bottom of container).

See Also:
Constant Field Values

CENTER

public static final String CENTER
The center layout constraint (middle of container).

See Also:
Constant Field Values

WEST

public static final String WEST
The west layout constraint (left of container).

See Also:
Constant Field Values

EAST

public static final String EAST
The east layout constraint (right of container).

See Also:
Constant Field Values
Constructor Detail

BorderLayout

public BorderLayout()
Creates a new instance of BorderLayout.

Method Detail

addLayoutComponent

public void addLayoutComponent(Object name,
                               Component comp,
                               Container c)
Description copied from class: Layout
Some layouts can optionally track the addition of elements with meta-data that allows the user to "hint" on object positioning.

Overrides:
addLayoutComponent in class Layout
Parameters:
name - optional meta data information, like alignment orientation
comp - the added component to the layout
c - the parent container

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Description copied from class: Layout
Removes the component from the layout this operation is only useful if the layout maintains references to components within it.

Overrides:
removeLayoutComponent in class Layout
Parameters:
comp - the removed component from layout

getComponentConstraint

public Object getComponentConstraint(Component comp)
Description copied from class: Layout
Returns the component's constraint.

Overrides:
getComponentConstraint in class Layout
Parameters:
comp - the component
Returns:
the component's constraint

layoutContainer

public void layoutContainer(Container target)
Description copied from class: Layout
Layout the given parent container children.

Specified by:
layoutContainer in class Layout
Parameters:
target - the given parent container

getPreferredSize

public Dimension getPreferredSize(Container parent)
Description copied from class: Layout
Returns the container preferred size.

Specified by:
getPreferredSize in class Layout
Parameters:
parent - the parent container
Returns:
the container preferred size

Java DTV API 1.3
18-Nov-2009

Copyright © 2008-2009 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved.

U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.Products covered by and information contained in this service manual are controlled by U.S. Export Control laws and may be subject to the export or import laws in other countries. Nuclear, missile, chemical biological weapons or nuclear maritime end uses or end users, whether direct or indirect, are strictly prohibited. Export or reexport to countries subject to U.S. embargo or to entities identified on U.S. export exclusion lists, including, but not limited to, the denied persons and specially designated nationals lists is strictly prohibited.

DOCUMENTATION IS PROVIDED AS IS AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.

Use of this document is subject to license terms.