org.jurvis.awt
Class JvColumnFillLayout

java.lang.Object
  extended by org.jurvis.awt.JvAbstractLayoutManager
      extended by org.jurvis.awt.JvColumnFillLayout
All Implemented Interfaces:
LayoutManager

public class JvColumnFillLayout
extends JvAbstractLayoutManager

JvColumnFillLayout lays out components in a column with one component receiving any remaining space. Each component is stretched horizontally to touch the sides of its container. Each component, except for one, is given its preferred height. One component, specified via a constraint of "fill", is given any remaining space. This layout manager was originally designed for application windows which contain multiple tool bars, a status bar, and a main panel.

Author:
Neil W. Weber

Field Summary
static String FILL
          LayoutManager "constraint" used to designate the fill component.
 
Fields inherited from class org.jurvis.awt.JvAbstractLayoutManager
gap
 
Constructor Summary
JvColumnFillLayout()
          Construct a new JvColumnFillLayout with a 2 pixel gap between components.
JvColumnFillLayout(int gap)
          Construct a new JvColumnFillLayout with the specified gap between components.
 
Method Summary
 void addLayoutComponent(String name, Component comp)
          Adds the specified component with the specified name to the layout.
 void layoutContainer(Container parent)
          Lays out the container in the specified panel.
 void removeLayoutComponent(Component comp)
          Removes the specified component from the layout.
 
Methods inherited from class org.jurvis.awt.JvAbstractLayoutManager
minimumLayoutSize, preferredLayoutSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILL

public static final String FILL
LayoutManager "constraint" used to designate the fill component.

See Also:
Constant Field Values
Constructor Detail

JvColumnFillLayout

public JvColumnFillLayout()
Construct a new JvColumnFillLayout with a 2 pixel gap between components.


JvColumnFillLayout

public JvColumnFillLayout(int gap)
Construct a new JvColumnFillLayout with the specified gap between components.

Parameters:
gap - pixel gap between components
Method Detail

addLayoutComponent

public void addLayoutComponent(String name,
                               Component comp)
Adds the specified component with the specified name to the layout.

Specified by:
addLayoutComponent in interface LayoutManager
Overrides:
addLayoutComponent in class JvAbstractLayoutManager
Parameters:
name - the component name
comp - the component to be added

layoutContainer

public void layoutContainer(Container parent)
Lays out the container in the specified panel.

Parameters:
parent - the component which needs to be laid out

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Removes the specified component from the layout.

Parameters:
comp - the component to be removed


Copyright © 1999-2004 Neil W. Weber. All Rights Reserved.