com.sshtools.ui.swing
Class ListLayout

java.lang.Object
  extended by com.sshtools.ui.swing.AbstractLayout
      extended by com.sshtools.ui.swing.ListLayout
All Implemented Interfaces:
java.awt.LayoutManager, java.awt.LayoutManager2, java.io.Serializable

public class ListLayout
extends AbstractLayout

A list layout puts elements in a vertical list, based on their vertical preferred size. The width is expanded automatically.

Version:
1.0
Author:
Claude Duguay
See Also:
Serialized Form

Field Summary
protected  int alignment
           
static int BOTH
           
protected  java.awt.Component center
           
static int CENTER
           
protected  int index
           
static int LEFT
           
protected  java.util.Vector panels
           
static int RIGHT
           
protected  java.util.Vector tabs
           
 
Fields inherited from class com.sshtools.ui.swing.AbstractLayout
hgap, vgap
 
Constructor Summary
ListLayout()
          Constructs a ContextLayout with no gaps between components.
ListLayout(int alignment)
          Constructs a ContextLayout with no gaps between components and the specified alignment.
ListLayout(int hgap, int vgap)
          Constructs a ContextLayout with the specified gaps.
ListLayout(int hgap, int vgap, int alignment)
          Constructs a ContextLayout with the specified gaps.
 
Method Summary
 void layoutContainer(java.awt.Container parent)
          Lays out the specified container.
 java.awt.Dimension minimumLayoutSize(java.awt.Container target)
          Returns the minimum dimensions needed to layout the components contained in the specified target container.
 java.awt.Dimension preferredLayoutSize(java.awt.Container target)
          Returns the preferred dimensions for this layout given the components in the specified target container.
 
Methods inherited from class com.sshtools.ui.swing.AbstractLayout
addLayoutComponent, addLayoutComponent, getHgap, getLayoutAlignmentX, getLayoutAlignmentY, getVgap, invalidateLayout, maximumLayoutSize, removeLayoutComponent, setHgap, setVgap, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CENTER

public static final int CENTER
See Also:
Constant Field Values

LEFT

public static final int LEFT
See Also:
Constant Field Values

RIGHT

public static final int RIGHT
See Also:
Constant Field Values

BOTH

public static final int BOTH
See Also:
Constant Field Values

tabs

protected java.util.Vector tabs

panels

protected java.util.Vector panels

center

protected java.awt.Component center

index

protected int index

alignment

protected int alignment
Constructor Detail

ListLayout

public ListLayout()
Constructs a ContextLayout with no gaps between components.


ListLayout

public ListLayout(int alignment)
Constructs a ContextLayout with no gaps between components and the specified alignment.

Parameters:
alignment - The LEFT, RIGHT, CENTER or BOTH alignment

ListLayout

public ListLayout(int hgap,
                  int vgap)
Constructs a ContextLayout with the specified gaps.

Parameters:
hgap - The horizontal gap
vgap - The vertical gap

ListLayout

public ListLayout(int hgap,
                  int vgap,
                  int alignment)
Constructs a ContextLayout with the specified gaps.

Parameters:
hgap - The horizontal gap
vgap - The vertical gap
alignment - The LEFT, RIGHT, CENTER or BOTH alignment
Method Detail

minimumLayoutSize

public java.awt.Dimension minimumLayoutSize(java.awt.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

preferredLayoutSize

public java.awt.Dimension preferredLayoutSize(java.awt.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

layoutContainer

public void layoutContainer(java.awt.Container parent)
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 layout object.

Parameters:
target - The component being laid out


Copyright © 2003-2009 SSHTOOLS LTD. All Rights Reserved.