Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.javathis.utilities.ui
Class JTVerticalFlowLayout  view JTVerticalFlowLayout download JTVerticalFlowLayout.java

java.lang.Object
  extended byjava.awt.FlowLayout
      extended bycom.javathis.utilities.ui.JTVerticalFlowLayout
All Implemented Interfaces:
java.awt.LayoutManager, java.io.Serializable

public class JTVerticalFlowLayout
extends java.awt.FlowLayout

JTVerticalFlowLayout is similar to FlowLayout except it lays out components vertically. It similar int behavior of the FlowLayout class, except it's vertical.

It has the additional feature where you can specify to fill to the edge. This causes the JTVerticalFlowLayout manager to resize all the components to expand to the width fo the column.

Warning: This causes problems when the main panel has less space that it needs. It also prohibits multi-column output. Additionally the vertical fill, fills the last component to the remaining height of the container.


Field Summary
static int BOTTOM
           
(package private)  int hgap
           
(package private)  boolean horizontalFill
           
static int MIDDLE
           
static int TOP
           
(package private)  boolean verticalFill
           
(package private)  int vgap
           
 
Fields inherited from class java.awt.FlowLayout
CENTER, LEADING, LEFT, RIGHT, TRAILING
 
Constructor Summary
JTVerticalFlowLayout()
          Construct a new JTVerticalFlowLayout with a TOP alignemnt, the horizontal fill is true, the vertical fill is false, and both gaps are set to 5.
JTVerticalFlowLayout(boolean horizontalFill, boolean verticalFill)
          Construct a new JTVerticalFlowLayout with a TOP alignemnt, with the provided horizontal and vertical fills, and both gaps are set to 5.
JTVerticalFlowLayout(int align)
          Construct a new JTVerticalFlowLayout with the provided alignemnt, the horizontal fill is true, the vertical fill is false, and both gaps are set to 5.
JTVerticalFlowLayout(int align, boolean horizontalFill, boolean verticalFill)
          Construct a new JTVerticalFlowLayout with the provided alignemnt, with the provided horizontal and vertical fills, and both gaps are set to 5.
JTVerticalFlowLayout(int align, int hgap, int vgap, boolean horizontalFill, boolean verticalFill)
          Construct a new JTVerticalFlowLayout with the provided arguments.
 
Method Summary
 int getHgap()
          Returns the horizontal gap between components.
 boolean getHorizontalFill()
           
 boolean getVerticalFill()
           
 int getVgap()
          Returns the vertical gap between lines of components.
 void layoutContainer(java.awt.Container target)
          Lay out the container's components based on current settings.
static void main(java.lang.String[] args)
           
 java.awt.Dimension minimumLayoutSize(java.awt.Container target)
          Returns the minimum layout size for the specified container using this layout.
private  void moveComponents(java.awt.Container target, int x, int y, int width, int height, int first, int last)
           
 java.awt.Dimension preferredLayoutSize(java.awt.Container target)
          Returns the preferred layout size for the specified container using this layout.
 void setHgap(int hgap)
          Sets the horizontal gap between components to the specified value.
 void setHorizontalFill(boolean horizontalFill)
           
 void setVerticalFill(boolean verticalFill)
           
 void setVgap(int vgap)
          Sets the vertical gap between lines of components to the specified value.
 
Methods inherited from class java.awt.FlowLayout
addLayoutComponent, getAlignment, removeLayoutComponent, setAlignment, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TOP

public static final int TOP
See Also:
Constant Field Values

MIDDLE

public static final int MIDDLE
See Also:
Constant Field Values

BOTTOM

public static final int BOTTOM
See Also:
Constant Field Values

hgap

int hgap

vgap

int vgap

horizontalFill

boolean horizontalFill

verticalFill

boolean verticalFill
Constructor Detail

JTVerticalFlowLayout

public JTVerticalFlowLayout()
Construct a new JTVerticalFlowLayout with a TOP alignemnt, the horizontal fill is true, the vertical fill is false, and both gaps are set to 5.

Note: Delegates to the following constructor:

JTVerticalFlowLayout(int, int, int, boolean, boolean)


JTVerticalFlowLayout

public JTVerticalFlowLayout(boolean horizontalFill,
                            boolean verticalFill)
Construct a new JTVerticalFlowLayout with a TOP alignemnt, with the provided horizontal and vertical fills, and both gaps are set to 5.

Note: Delegates to the following constructor:

JTVerticalFlowLayout(int, int, int, boolean, boolean)


JTVerticalFlowLayout

public JTVerticalFlowLayout(int align)
Construct a new JTVerticalFlowLayout with the provided alignemnt, the horizontal fill is true, the vertical fill is false, and both gaps are set to 5.

Note: Delegates to the following constructor:

JTVerticalFlowLayout(int, int, int, boolean, boolean)


JTVerticalFlowLayout

public JTVerticalFlowLayout(int align,
                            boolean horizontalFill,
                            boolean verticalFill)
Construct a new JTVerticalFlowLayout with the provided alignemnt, with the provided horizontal and vertical fills, and both gaps are set to 5.

Note: Delegates to the following constructor:

JTVerticalFlowLayout(int, int, int, boolean, boolean)


JTVerticalFlowLayout

public JTVerticalFlowLayout(int align,
                            int hgap,
                            int vgap,
                            boolean horizontalFill,
                            boolean verticalFill)
Construct a new JTVerticalFlowLayout with the provided arguments.

Method Detail

getHgap

public int getHgap()
Description copied from class: java.awt.FlowLayout
Returns the horizontal gap between components.


setHgap

public void setHgap(int hgap)
Description copied from class: java.awt.FlowLayout
Sets the horizontal gap between components to the specified value.


getVgap

public int getVgap()
Description copied from class: java.awt.FlowLayout
Returns the vertical gap between lines of components.


setVgap

public void setVgap(int vgap)
Description copied from class: java.awt.FlowLayout
Sets the vertical gap between lines of components to the specified value.


preferredLayoutSize

public java.awt.Dimension preferredLayoutSize(java.awt.Container target)
Description copied from class: java.awt.FlowLayout
Returns the preferred layout size for the specified container using this layout.


minimumLayoutSize

public java.awt.Dimension minimumLayoutSize(java.awt.Container target)
Description copied from class: java.awt.FlowLayout
Returns the minimum layout size for the specified container using this layout.


setVerticalFill

public void setVerticalFill(boolean verticalFill)

getVerticalFill

public boolean getVerticalFill()

setHorizontalFill

public void setHorizontalFill(boolean horizontalFill)

getHorizontalFill

public boolean getHorizontalFill()

moveComponents

private void moveComponents(java.awt.Container target,
                            int x,
                            int y,
                            int width,
                            int height,
                            int first,
                            int last)

layoutContainer

public void layoutContainer(java.awt.Container target)
Description copied from class: java.awt.FlowLayout
Lay out the container's components based on current settings.


main

public static void main(java.lang.String[] args)