org.mbari.awt.layout
Class VerticalFlowLayout

java.lang.Object
  extended byjava.awt.FlowLayout
      extended byorg.mbari.awt.layout.VerticalFlowLayout
All Implemented Interfaces:
java.awt.LayoutManager, java.io.Serializable

public class VerticalFlowLayout
extends java.awt.FlowLayout
implements java.io.Serializable

VFlowLayout is similar to FlowLayout except it lays out components vertically. Extends FlowLayout because it mimics much of the behavior of the FlowLayout class, except vertically. An additional feature is that you can specify a fill to edge flag, which causes the VerticalFlowLayout manager to resize all components to expand to the column width Warning: This causes problems when the main panel has less space that it needs and it seems to prohibit multi-column output. Additionally there is a vertical fill flag, which fills the last component to the remaining height of the container.



MBARI provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of the Monterey Bay Aquarium Research Institute to assist in its use, correction, modification, or enhancement. This information should not be published or distributed to third parties without specific written permission from MBARI.


Copyright 2002 MBARI.
MBARI Proprietary Information. All rights reserved.


$Log: VerticalFlowLayout.java,v $ Revision 1.1.1.1 2002/07/02 22:07:11 brian refresh import Revision 1.3 2002/01/30 00:23:56 brian Added comments to all classes and methods. Tested the accuracy of AsciiRasterGridReader and AsciiRasterGridWriter. Also checked the the GridUtil was populating the spatial grids correctly and accurately. The data files generated matched up perfectly with the orginal text files. Also implemented an RovAltitudeFilter class to encapsulate different filtering methods.


Version:
: $Revision: 1.1.1.1 $
Author:
: $Author: brian $
See Also:
Serialized Form

Field Summary
static int BOTTOM
           
static int MIDDLE
           
static int TOP
           
 
Fields inherited from class java.awt.FlowLayout
CENTER, LEADING, LEFT, RIGHT, TRAILING
 
Constructor Summary
VerticalFlowLayout()
          Construct a new VerticalFlowLayout with a middle alignemnt, and the fill to edge flag set.
VerticalFlowLayout(boolean hfill, boolean vfill)
          Construct a new VerticalFlowLayout with a middle alignemnt.
VerticalFlowLayout(int align)
          Construct a new VerticalFlowLayout with a middle alignemnt.
VerticalFlowLayout(int align, boolean hfill, boolean vfill)
          Construct a new VerticalFlowLayout.
VerticalFlowLayout(int align, int hgap, int vgap, boolean hfill, boolean vfill)
          Construct a new VerticalFlowLayout.
 
Method Summary
 int getHgap()
          Gets the horizontal gap between components.
 boolean getHorizontalFill()
           
 boolean getVerticalFill()
           
 int getVgap()
          Gets the vertical gap between components.
 void layoutContainer(java.awt.Container target)
          Lays out the container.
 java.awt.Dimension minimumLayoutSize(java.awt.Container target)
          Returns the minimum size needed to layout the target container
 java.awt.Dimension preferredLayoutSize(java.awt.Container target)
          Returns the preferred dimensions given the components in the target container.
 void setHgap(int hgap)
          Sets the horizontal gap between components.
 void setHorizontalFill(boolean hfill)
           
 void setVerticalFill(boolean vfill)
           
 void setVgap(int vgap)
          Sets the vertical gap between components.
 
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
Constructor Detail

VerticalFlowLayout

public VerticalFlowLayout()
Construct a new VerticalFlowLayout with a middle alignemnt, and the fill to edge flag set.


VerticalFlowLayout

public VerticalFlowLayout(boolean hfill,
                          boolean vfill)
Construct a new VerticalFlowLayout with a middle alignemnt.


VerticalFlowLayout

public VerticalFlowLayout(int align)
Construct a new VerticalFlowLayout with a middle alignemnt.

Parameters:
align - the alignment value

VerticalFlowLayout

public VerticalFlowLayout(int align,
                          boolean hfill,
                          boolean vfill)
Construct a new VerticalFlowLayout.

Parameters:
align - the alignment value

VerticalFlowLayout

public VerticalFlowLayout(int align,
                          int hgap,
                          int vgap,
                          boolean hfill,
                          boolean vfill)
Construct a new VerticalFlowLayout.

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

getHgap

public int getHgap()
Gets the horizontal gap between components.

Returns:
the horizontal gap between components.
Since:
JDK1.1
See Also:
FlowLayout.setHgap(int)

setHgap

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


getVgap

public int getVgap()
Gets the vertical gap between components.


setVgap

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


preferredLayoutSize

public java.awt.Dimension preferredLayoutSize(java.awt.Container target)
Returns the preferred dimensions given the components in the target container.

Specified by:
preferredLayoutSize in interface java.awt.LayoutManager
Parameters:
target - the component to lay out

minimumLayoutSize

public java.awt.Dimension minimumLayoutSize(java.awt.Container target)
Returns the minimum size needed to layout the target container

Specified by:
minimumLayoutSize in interface java.awt.LayoutManager
Parameters:
target - the component to lay out

setVerticalFill

public void setVerticalFill(boolean vfill)

getVerticalFill

public boolean getVerticalFill()

setHorizontalFill

public void setHorizontalFill(boolean hfill)

getHorizontalFill

public boolean getHorizontalFill()

layoutContainer

public void layoutContainer(java.awt.Container target)
Lays out the container.

Specified by:
layoutContainer in interface java.awt.LayoutManager
Parameters:
target - the container to lay out.