|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.BoxLayout
public class BoxLayout
A layout that stacks the children of a container in a Box, either horizontally or vertically.
| Field Summary | |
|---|---|
static int |
LINE_AXIS
Specifies that components are laid out in the direction of a line of text. |
static int |
PAGE_AXIS
Sepcifies that components are laid out in the direction of the line flow. |
static int |
X_AXIS
Specifies that components are laid out left to right. |
static int |
Y_AXIS
Specifies that components are laid out top to bottom. |
| Constructor Summary | |
|---|---|
BoxLayout(Container container,
int way)
Constructs a BoxLayout object. |
|
| Method Summary | |
|---|---|
void |
addLayoutComponent(Component child,
Object constraints)
Adds a component to the layout. |
void |
addLayoutComponent(String name,
Component component)
Adds a component to the layout. |
float |
getLayoutAlignmentX(Container parent)
Returns the alignment along the X axis for the container. |
float |
getLayoutAlignmentY(Container parent)
Returns the alignment along the Y axis for the container. |
void |
invalidateLayout(Container parent)
Invalidates the layout. |
void |
layoutContainer(Container parent)
Lays out the specified container using this layout. |
Dimension |
maximumLayoutSize(Container parent)
Returns the maximum size of the layout gived the components in the given container. |
Dimension |
minimumLayoutSize(Container parent)
Returns the minimum size of the layout. |
Dimension |
preferredLayoutSize(Container parent)
Returns the preferred size of the layout. |
void |
removeLayoutComponent(Component component)
Removes a component from the layout. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int X_AXIS
public static final int Y_AXIS
public static final int LINE_AXIS
public static final int PAGE_AXIS
| Constructor Detail |
|---|
public BoxLayout(Container container,
int way)
BoxLayout object.
container - The container that needs to be laid out.way - The orientation of the components.
AWTError - If way has an invalid value.| Method Detail |
|---|
public void addLayoutComponent(String name,
Component component)
addLayoutComponent in interface LayoutManagername - The name of the component to add.component - the component to add to the layout.public void removeLayoutComponent(Component component)
removeLayoutComponent in interface LayoutManagercomponent - The component to remove from the layout.public Dimension preferredLayoutSize(Container parent)
preferredLayoutSize in interface LayoutManagerparent - The container that needs to be laid out.
LayoutManager.minimumLayoutSize(Container)public Dimension minimumLayoutSize(Container parent)
minimumLayoutSize in interface LayoutManagerparent - The container that needs to be laid out.
LayoutManager.preferredLayoutSize(Container)public void layoutContainer(Container parent)
layoutContainer in interface LayoutManagerparent - The container that needs to be laid out.
public void addLayoutComponent(Component child,
Object constraints)
addLayoutComponent in interface LayoutManager2child - The component to add to the layout.constraints - The constraints for the component in the layout.public float getLayoutAlignmentX(Container parent)
getLayoutAlignmentX in interface LayoutManager2parent - The container that needs to be laid out.
public float getLayoutAlignmentY(Container parent)
getLayoutAlignmentY in interface LayoutManager2parent - The container that needs to be laid out.
public void invalidateLayout(Container parent)
invalidateLayout in interface LayoutManager2parent - The container that needs to be laid out.public Dimension maximumLayoutSize(Container parent)
maximumLayoutSize in interface LayoutManager2parent - The container that needs to be laid out.
Component.getMaximumSize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||