oracle.dacf.layout
Class RowLayout
java.lang.Object
|
+--oracle.dacf.layout.LayoutManager3
|
+--oracle.dacf.layout.RowLayout
- All Implemented Interfaces:
- java.awt.LayoutManager, java.awt.LayoutManager2
- public final class RowLayout
- extends LayoutManager3
A row layout is one in which objects are placed one after the other until
there is no more room in the row, at which point a new row is begun. Control
placement is subject to positioning information provided in a
ControlConstraints object. Unlike Java's FlowLayout, RowLayout can also
place te controls from right to left.
- Version:
- PUBLIC
- See Also:
LayoutManager
,
LayoutManager3
Field Summary |
static int |
LEFT_TO_RIGHT
Layout the controls from left to right. |
static int |
RIGHT_TO_LEFT
Layout the controls from right to left. |
Constructor Summary |
RowLayout()
Parameterless class constructor. |
RowLayout(int direction)
Class constructor which specifies the arrangement of controls. |
Method Summary |
static int |
convertDirection(java.lang.String text)
Convert a string representation of an direction value to an integer. |
int |
getDirection()
Getter for the layout direction. |
void |
layoutContainer(java.awt.Container parent)
Lays out the container in the specified panel. |
protected java.awt.Dimension |
layoutSize(java.awt.Container parent,
int type)
Computes the indicated container size dimensions. |
void |
setDirection(int direction)
Setter for the layout direction. |
java.lang.String |
toString()
Generates a String which holds the settings of this layout manager in a
human readable form. |
Methods inherited from class oracle.dacf.layout.LayoutManager3 |
addLayoutComponent, addLayoutComponent, findConstraints, getComponentBounds, getLayoutAlignmentX, getLayoutAlignmentY, invalidateLayout, maximumLayoutSize, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LEFT_TO_RIGHT
public static final int LEFT_TO_RIGHT
- Layout the controls from left to right.
RIGHT_TO_LEFT
public static final int RIGHT_TO_LEFT
- Layout the controls from right to left.
RowLayout
public RowLayout()
- Parameterless class constructor.
RowLayout
public RowLayout(int direction)
- Class constructor which specifies the arrangement of controls.
- Parameters:
direction
- layout of controls within the container
convertDirection
public static int convertDirection(java.lang.String text)
throws java.lang.IllegalArgumentException
- Convert a string representation of an direction value to an integer.
- Parameters:
text
- string representation of an direction constant- Returns:
- integer value corresponding to the text passed in
- Throws:
java.lang.IllegalArgumentException
- if the string passed in is not a valid direction value
getDirection
public int getDirection()
- Getter for the layout direction.
- Returns:
- the current layout direction
layoutContainer
public void layoutContainer(java.awt.Container parent)
- Lays out the container in the specified panel.
- Overrides:
layoutContainer
in class LayoutManager3
- Parameters:
parent
- component which needs to be laid out- See Also:
LayoutManager3.layoutContainer(java.awt.Container)
setDirection
public void setDirection(int direction)
- Setter for the layout direction.
- Parameters:
direction
- the new layout direction
toString
public java.lang.String toString()
- Generates a String which holds the settings of this layout manager in a
human readable form. The ControlLayoutEditor relies on this method.
- Overrides:
toString
in class java.lang.Object
- Returns:
- a String representing this object's value.
- See Also:
ControlLayoutEditor
layoutSize
protected java.awt.Dimension layoutSize(java.awt.Container parent,
int type)
- Computes the indicated container size dimensions.
- Overrides:
layoutSize
in class LayoutManager3
- Parameters:
parent
- container to be laid outtype
- _MINIMUM, _MAXIMUM or _PREFERRED- Returns:
- Dimension object with the container's requested size
- See Also:
LayoutManager3.layoutSize(java.awt.Container, int)