All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.trumphurst.controls.TFlowLayout

java.lang.Object
   |
   +----com.trumphurst.controls.TFlowLayout

public abstract class TFlowLayout
extends Object
implements LayoutManager, Serializable
VFlow layout is used to layout components in a panel. It will arrange components left to right until no more buttons fit in the same row. The constructor has full control over alignment and packing within the row.


Variable Index

 o BOTTOM
Pack everything together at the bottom of the column or line up the bottom of a row.
 o EXPAND
Expand everything to the full height of the row or full width of the column.
 o HCENTER
Pack everything together in the middle of the row or line up the centre of a column.
 o LEFT
Pack everything together at the left of the row or line up the left of a column.
 o RIGHT
Pack everything together at the right of the row or line up the right of a column.
 o SPREAD
Spread to even out the space between the components in the row or column.
 o TOP
Pack everything together at the top of the column or line up the top of a row.
 o VCENTER
Pack everything together in the centre of the column or line up the centre of a row.

Constructor Index

 o TFlowLayout(int, int, int)
Constructs a new TFlow Layout with the specified alignment and gap values.

Method Index

 o addLayoutComponent(String, Component)
Adds the specified component to the layout.
 o getAlignment()
Returns the alignment value for this layout, one of LEFT, HCENTER or RIGHT, possibly ORed with one of TOP, VCENTER, or BOTTOM.
 o getHgap()
Returns the horizontal gap between components.
 o getVgap()
Returns the vertical gap between components.
 o layoutContainer(Container)
Lays out the container.
 o minimumLayoutSize(Container)
Returns the minimum dimensions needed to layout the components contained in the specified target container.
 o preferredLayoutSize(Container)
Returns the preferred dimensions for this layout given the components in the specified target container.
 o removeLayoutComponent(Component)
Removes the specified component from the layout.
 o setAlignment(int)
Sets the alignment value for this layout.
 o setHgap(int)
Sets the horizontal gap between components.
 o setVgap(int)
Sets the vertical gap between components.
 o toString()
Returns the String representation of this TFlowLayout's values.

Variables

 o LEFT
 public static final int LEFT
Pack everything together at the left of the row or line up the left of a column.

 o HCENTER
 public static final int HCENTER
Pack everything together in the middle of the row or line up the centre of a column.

 o RIGHT
 public static final int RIGHT
Pack everything together at the right of the row or line up the right of a column.

 o SPREAD
 public static final int SPREAD
Spread to even out the space between the components in the row or column.

 o TOP
 public static final int TOP
Pack everything together at the top of the column or line up the top of a row.

 o VCENTER
 public static final int VCENTER
Pack everything together in the centre of the column or line up the centre of a row.

 o BOTTOM
 public static final int BOTTOM
Pack everything together at the bottom of the column or line up the bottom of a row.

 o EXPAND
 public static final int EXPAND
Expand everything to the full height of the row or full width of the column.

Constructors

 o TFlowLayout
 public TFlowLayout(int align,
                    int hgap,
                    int vgap)
Constructs a new TFlow Layout with the specified alignment and gap values.

Parameters:
align - the alignment value
hgap - the horizontal gap variable
vgap - the vertical gap variable

Methods

 o getAlignment
 public int getAlignment()
Returns the alignment value for this layout, one of LEFT, HCENTER or RIGHT, possibly ORed with one of TOP, VCENTER, or BOTTOM.

 o setAlignment
 public void setAlignment(int align)
Sets the alignment value for this layout.

Parameters:
align - the alignment value, one of LEFT, HCENTER or RIGHT, possibly ORed with one of TOP, VCENTER, or BOTTOM.
 o getHgap
 public int getHgap()
Returns the horizontal gap between components.

 o setHgap
 public void setHgap(int hgap)
Sets the horizontal gap between components.

Parameters:
hgap - the horizontal gap between components
 o getVgap
 public int getVgap()
Returns the vertical gap between components.

 o setVgap
 public void setVgap(int vgap)
Sets the vertical gap between components.

Parameters:
vgap - the vertical gap between components
 o addLayoutComponent
 public void addLayoutComponent(String name,
                                Component comp)
Adds the specified component to the layout. Not used by this class.

Parameters:
name - the name of the component
comp - the the component to be added
 o removeLayoutComponent
 public void removeLayoutComponent(Component comp)
Removes the specified component from the layout. Not used by this class.

Parameters:
comp - the component to remove
 o preferredLayoutSize
 public abstract Dimension preferredLayoutSize(Container target)
Returns the preferred dimensions for this layout given the components in the specified target container.

Parameters:
target - the component which needs to be laid out
See Also:
Container, minimumLayoutSize
 o minimumLayoutSize
 public abstract Dimension minimumLayoutSize(Container target)
Returns the minimum dimensions needed to layout the components contained in the specified target container.

Parameters:
target - the component which needs to be laid out
See Also:
preferredLayoutSize
 o layoutContainer
 public abstract void layoutContainer(Container target)
Lays out the container. This method will actually reshape the components in the target in order to satisfy the constraints of the TFlowLayout object.

Parameters:
target - the specified component being laid out.
See Also:
Container
 o toString
 public String toString()
Returns the String representation of this TFlowLayout's values.

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index