org.htmlparser.parserapplications.filterbuilder.layouts

Class VerticalLayoutManager

public class VerticalLayoutManager extends Object implements LayoutManager2, Serializable

A layout manager like a vertical FlowLayout. Stacks components vertically like GridLayout(0,1) but doesn't resize each component equally. More like a vertical FlowLayout but doesn't snake columns or align things.
Constructor Summary
VerticalLayoutManager()
Constructs a VerticalLayoutManager object.
Method Summary
voidaddLayoutComponent(String name, Component comp)
Adds the specified component with the specified name to the layout.
voidaddLayoutComponent(Component comp, Object constraints)
Adds the specified component to the layout, using the specified constraint object.
floatgetLayoutAlignmentX(Container target)
Returns the alignment along the x axis.
floatgetLayoutAlignmentY(Container target)
Returns the alignment along the y axis.
voidinvalidateLayout(Container target)
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
voidlayoutContainer(Container target)
Lays out the container.
DimensionmaximumLayoutSize(Container target)
Returns the maximum size of this component.
DimensionminimumLayoutSize(Container target)
Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
DimensionpreferredLayoutSize(Container target)
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

VerticalLayoutManager

public VerticalLayoutManager()
Constructs a VerticalLayoutManager object.

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

addLayoutComponent

public void addLayoutComponent(Component comp, Object constraints)
Adds the specified component to the layout, using the specified constraint object.

Parameters: comp the component to be added constraints where/how the component is added to the layout.

getLayoutAlignmentX

public float getLayoutAlignmentX(Container target)
Returns the alignment along the x axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.

Parameters: target The target container.

Returns: The X-axis alignment.

getLayoutAlignmentY

public float getLayoutAlignmentY(Container target)
Returns the alignment along the y axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.

Parameters: target The target container.

Returns: The Y-axis alignment.

invalidateLayout

public void invalidateLayout(Container target)
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.

Parameters: target The target container.

layoutContainer

public void layoutContainer(Container target)
Lays out the container.

Parameters: target The container which needs to be laid out.

maximumLayoutSize

public Dimension maximumLayoutSize(Container target)
Returns the maximum size of this component.

Parameters: target The component to be laid out.

Returns: The maximum size for the container.

See Also: VerticalLayoutManager

minimumLayoutSize

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

Parameters: target The component to be laid out.

Returns: The minimum size.

See Also: VerticalLayoutManager

preferredLayoutSize

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

Parameters: target The component to be laid out.

Returns: A size deemed suitable for laying out the container.

See Also: VerticalLayoutManager

removeLayoutComponent

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

Parameters: comp the component ot be removed

HTML Parser is an open source library released under LGPL. SourceForge.net