|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--java.awt.FlowLayout
Flow layout is used to layout buttons in a panel. It will arrange buttons left to right until no more buttons fit on the same line. Each line is centered.
| Field Summary | |
static int |
CENTER
The right alignment variable. |
static int |
LEFT
The left alignment variable. |
static int |
RIGHT
The right alignment variable. |
| Constructor Summary | |
FlowLayout()
Constructs a new Flow Layout with a centered alignment. |
|
FlowLayout(int align)
Constructs a new Flow Layout with the specified alignment. |
|
FlowLayout(int align,
int hgap,
int vgap)
Constructs a new Flow Layout with the specified alignment and gap values. |
|
| Method Summary | |
void |
addLayoutComponent(String name,
Component comp)
Adds the specified component to the layout. |
void |
layoutContainer(Container target)
Lays out the container. |
Dimension |
minimumLayoutSize(Container target)
Returns the minimum dimensions needed to layout the components contained in the specified target container. |
Dimension |
preferredLayoutSize(Container target)
Returns the preferred dimensions for this layout given the components in the specified target container. |
void |
removeLayoutComponent(Component comp)
Removes the specified component from the layout. |
String |
toString()
Returns the String representation of this FlowLayout's values. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int LEFT
public static final int CENTER
public static final int RIGHT
| Constructor Detail |
public FlowLayout()
public FlowLayout(int align)
align - the alignment value
public FlowLayout(int align,
int hgap,
int vgap)
align - the alignment valuehgap - the horizontal gap variablevgap - the vertical gap variable| Method Detail |
public void addLayoutComponent(String name,
Component comp)
addLayoutComponent in interface LayoutManagername - the name of the componentcomp - the the component to be addedpublic void removeLayoutComponent(Component comp)
removeLayoutComponent in interface LayoutManagercomp - the component to removepublic Dimension preferredLayoutSize(Container target)
preferredLayoutSize in interface LayoutManagertarget - the component which needs to be laid outContainer,
minimumLayoutSize(java.awt.Container)public Dimension minimumLayoutSize(Container target)
minimumLayoutSize in interface LayoutManagertarget - the component which needs to be laid outpreferredLayoutSize(java.awt.Container)public void layoutContainer(Container target)
layoutContainer in interface LayoutManagertarget - the specified component being laid out.Containerpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||