MDateSelector

mseries.utils
Class VFlowLayout

java.lang.Object
  extended by mseries.utils.VFlowLayout
All Implemented Interfaces:
LayoutManager, LayoutManager2, Serializable
Direct Known Subclasses:
MultiFormLayout

public class VFlowLayout
extends Object
implements LayoutManager2, Serializable

A Simple layout manager that will stack components vertically as they are added. When there is excess space, the components are not assigned it so they all remain to the top of the container. The components stretch horizontally to width of the container

See Also:
Serialized Form

Constructor Summary
VFlowLayout()
           
 
Method Summary
 void addLayoutComponent(Component comp, Object constraints)
          Not currently used but likely to be overridden in subclasses
 void addLayoutComponent(String name, Component comp)
          Not used by this class
protected  Dimension calculateLayoutSize(Container parent)
          Total up the height of each component in the container plus the insets of the container itself.
 float getLayoutAlignmentX(Container target)
           
 float getLayoutAlignmentY(Container target)
           
protected  Dimension getLayoutSize(Container parent)
          The layout size is not changed by this layout manager so we can cache the the dimensions.
 void invalidateLayout(Container target)
           
 void layoutContainer(Container parent)
          Lays out the container by stacking the components in one vertical column.
 Dimension maximumLayoutSize(Container parent)
           
 Dimension minimumLayoutSize(Container parent)
           
 Dimension preferredLayoutSize(Container parent)
           
 void removeLayoutComponent(Component comp)
          Not used by this class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VFlowLayout

public VFlowLayout()
Method Detail

preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)
Specified by:
preferredLayoutSize in interface LayoutManager

minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)
Specified by:
minimumLayoutSize in interface LayoutManager

maximumLayoutSize

public Dimension maximumLayoutSize(Container parent)
Specified by:
maximumLayoutSize in interface LayoutManager2

layoutContainer

public void layoutContainer(Container parent)
Lays out the container by stacking the components in one vertical column. Stretches each component to the width of the container, does not stretch or shrink the components vertically.

Specified by:
layoutContainer in interface LayoutManager

calculateLayoutSize

protected Dimension calculateLayoutSize(Container parent)
Total up the height of each component in the container plus the insets of the container itself. Width is width of the container


getLayoutSize

protected Dimension getLayoutSize(Container parent)
The layout size is not changed by this layout manager so we can cache the the dimensions. This method only recalculates them if the cache is null which may happen by the invalidateLayout method.


addLayoutComponent

public void addLayoutComponent(String name,
                               Component comp)
Not used by this class

Specified by:
addLayoutComponent in interface LayoutManager

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Not used by this class

Specified by:
removeLayoutComponent in interface LayoutManager

getLayoutAlignmentY

public float getLayoutAlignmentY(Container target)
Specified by:
getLayoutAlignmentY in interface LayoutManager2

getLayoutAlignmentX

public float getLayoutAlignmentX(Container target)
Specified by:
getLayoutAlignmentX in interface LayoutManager2

invalidateLayout

public void invalidateLayout(Container target)
Specified by:
invalidateLayout in interface LayoutManager2

addLayoutComponent

public void addLayoutComponent(Component comp,
                               Object constraints)
Not currently used but likely to be overridden in subclasses

Specified by:
addLayoutComponent in interface LayoutManager2

MDateSelector

Copyright © 2001-2007 M Newstead. All Rights Reserved.