public class

VerticalBagLayout

extends Object
implements LayoutManager
java.lang.Object
   ↳ sun.awt.VerticalBagLayout

Class Overview

A vertical 'bag' of Components. Allocates space for each Component from top to bottom.

Summary

Public Constructors
VerticalBagLayout()
Constructs a new VerticalBagLayout.
VerticalBagLayout(int vgap)
Constructs a VerticalBagLayout with the specified gaps.
Public Methods
void addLayoutComponent(String name, Component comp)
Adds the specified named component to the layout.
void layoutContainer(Container target)
Lays out the specified container.
Dimension minimumLayoutSize(Container target)
Returns the minimum dimensions needed to lay out the components contained in the specified target container.
Dimension preferredLayoutSize(Container target)
Returns the preferred dimensions for this layout given the components in the specified target container.
void removeLayoutComponent(Component comp)
Removes the specified component from the layout.
String toString()
Returns the String representation of this VerticalBagLayout's values.
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.awt.LayoutManager

Public Constructors

public VerticalBagLayout ()

Constructs a new VerticalBagLayout.

public VerticalBagLayout (int vgap)

Constructs a VerticalBagLayout with the specified gaps.

Parameters
vgap the vertical gap

Public Methods

public void addLayoutComponent (String name, Component comp)

Adds the specified named component to the layout.

Parameters
name the String name
comp the component to be added

public void layoutContainer (Container target)

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 VerticalBagLayout object.

Parameters
target the component being laid out
See Also

public Dimension minimumLayoutSize (Container target)

Returns the minimum dimensions needed to lay out the components contained in the specified target container.

Parameters
target the Container on which to do the layout

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

public void removeLayoutComponent (Component comp)

Removes the specified component from the layout.

Parameters
comp the component to be removed

public String toString ()

Returns the String representation of this VerticalBagLayout's values.

Returns
  • a string representation of the object.