Class powersoft.jcm.ui.UniformLayout
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class powersoft.jcm.ui.UniformLayout

java.lang.Object
   |
   +----powersoft.jcm.ui.UniformLayout

public class UniformLayout
extends Object
implements LayoutManager
A layout manager that uniformly sizes its components.

The components are laid out horizontally by default. If the allowsVerical property is true and the height of the container is greater than its width, the components are laid out vertically instead. A gap may be specified as the space to be put between the components.


Constructor Index

 o UniformLayout()
Constructs a new UniformLayout not allowing vertical layout and with no gap.
 o UniformLayout(int, boolean)
Constructs a new UniformLayout.

Method Index

 o addLayoutComponent(String, Component)
Adds the specified named component to the layout.
 o layoutContainer(Container)
Lays out the specified 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 toString()
Returns the String representation of this UniformLayout's values.

Constructors

 o UniformLayout
  public UniformLayout()
Constructs a new UniformLayout not allowing vertical layout and with no gap.
 o UniformLayout
  public UniformLayout(int gap,
                       boolean allowsVertical)
Constructs a new UniformLayout. @param gap the amount of space to be put between components @param allowsVertical whether vertical layout is allowed

Methods

 o addLayoutComponent
  public void addLayoutComponent(String __name,
                                 Component __comp)
Adds the specified named component to the layout.
 o removeLayoutComponent
  public void removeLayoutComponent(Component __comp)
Removes the specified component from the layout.
Parameters:
comp - the component to be removed
 o minimumLayoutSize
  public Dimension minimumLayoutSize(Container target)
Returns the minimum dimensions needed to layout the components contained in the specified target container.
Parameters:
target - the Container on which to do the layout
See Also:
Container, preferredLayoutSize
 o preferredLayoutSize
  public 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 layoutContainer
  public void layoutContainer(Container target)
Lays out the specified container. This method will actually reshape the components in the specified target container in order to satisfy the constraints of the UniformLayout object.
Parameters:
target - the component being laid out
See Also:
Container
 o toString
  public String toString()
Returns the String representation of this UniformLayout's values.
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index