com.vlsolutions.swing.toolbars

Class VLToolBarLayout

public class VLToolBarLayout extends Object implements LayoutManager2

The layout for VLToolBar (supports horizontal and vertical orientation).

When used in horizontal orientation, this layout respects the preferred width of the contained components, and forces the height to the maximum of all the preferred heights. (so components are vertically streched to have the same height).

When used in vertical orientation, this layout respects the preferred height of the contained components, and forces the width to the maximum of all the preferred widths. (so components are horizontally streched to have the same width).

Constructor Summary
VLToolBarLayout()
VLToolBarLayout(boolean isHorizontal)
Constructs a new Layout.
VLToolBarLayout(boolean isHorizontal, int gap)
Constructs a new Layout.
Method Summary
voidaddLayoutComponent(Component comp, Object constraints)
voidaddLayoutComponent(String name, Component comp)
floatgetLayoutAlignmentX(Container target)
floatgetLayoutAlignmentY(Container target)
voidinvalidateLayout(Container target)
voidlayoutContainer(Container target)
overridden to adjust position (x(top) = width(left), y(left) = height(top)
DimensionmaximumLayoutSize(Container target)
DimensionminimumLayoutSize(Container parent)
DimensionpreferredLayoutSize(Container parent)
voidremoveLayoutComponent(Component comp)

Constructor Detail

VLToolBarLayout

public VLToolBarLayout()

VLToolBarLayout

public VLToolBarLayout(boolean isHorizontal)
Constructs a new Layout.

Parameters: isHorizontal indicates if the layout will be horizontal or vertical.

VLToolBarLayout

public VLToolBarLayout(boolean isHorizontal, int gap)
Constructs a new Layout.

Parameters: isHorizontal indicates if the layout will be horizontal or vertical. gap gap in pixels between components

Method Detail

addLayoutComponent

public void addLayoutComponent(Component comp, Object constraints)

addLayoutComponent

public void addLayoutComponent(String name, Component comp)

getLayoutAlignmentX

public float getLayoutAlignmentX(Container target)

getLayoutAlignmentY

public float getLayoutAlignmentY(Container target)

invalidateLayout

public void invalidateLayout(Container target)

layoutContainer

public void layoutContainer(Container target)
overridden to adjust position (x(top) = width(left), y(left) = height(top)

maximumLayoutSize

public Dimension maximumLayoutSize(Container target)

minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)

preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)

removeLayoutComponent

public void removeLayoutComponent(Component comp)
© Copyright 2004-2005 VLSolutions. All Rights Reserved.
www.vlsolutions.com : Java Components - Smart Client Applications