org.jfree.ui.tabbedui

Class VerticalLayout

public class VerticalLayout extends Object implements LayoutManager

A simple layout manager, which aligns all components in a vertical flow layout.

Author: Thomas Morgner

Constructor Summary
VerticalLayout()
DefaultConstructor.
VerticalLayout(boolean useParent)
Creates a new vertical layout.
Method Summary
voidaddLayoutComponent(String name, Component comp)
Adds the specified component with the specified name to the layout.
booleanisUseSizeFromParent()
Returns, whether the parent's defined size is used during the layouting, or whether the childs are used to compute the size.
voidlayoutContainer(Container parent)
Lays out the container in the specified panel.
DimensionminimumLayoutSize(Container parent)
Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
DimensionpreferredLayoutSize(Container parent)
Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
voidremoveLayoutComponent(Component comp)
Removes the specified component from the layout.

Constructor Detail

VerticalLayout

public VerticalLayout()
DefaultConstructor.

VerticalLayout

public VerticalLayout(boolean useParent)
Creates a new vertical layout. If useParent is set to true, the parents size will be used when performing the layouting, else only the parents childs are used to compute the layout.

Parameters: useParent defines, whether the parent's size is used.

Method Detail

addLayoutComponent

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

Parameters: name the component name comp the component to be added

isUseSizeFromParent

public boolean isUseSizeFromParent()
Returns, whether the parent's defined size is used during the layouting, or whether the childs are used to compute the size.

Returns: true, if the parent's size is used, false otherwise.

layoutContainer

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

Parameters: parent the component which needs to be laid out

minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)
Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.

Parameters: parent the component to be laid out

Returns: the minimul layoutsize

See Also: VerticalLayout

preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)
Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.

Parameters: parent the component to be laid out

Returns: the preferred layout size

See Also: VerticalLayout

removeLayoutComponent

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

Parameters: comp the component to be removed