Class JDPLineLayout

java.lang.Object
   |
   +----JDPLineLayout

public class JDPLineLayout
extends Object
implements LayoutManager
Class JDPLineLayout represents layout manager for laying out components in a straight horizontal line.


Constructor Index

 o JDPLineLayout()
Constructs a new JDPLineLayout.
 o JDPLineLayout(int)
Constructs a JDPLineLayout with the specified gap.
 o JDPLineLayout(int, boolean)
Constructs a JDPLineLayout with the specified gap.

Method Index

 o addLayoutComponent(String, Component)
Adds the specified named component to the layout.
 o layoutContainer(Container)
Lays out the specified container.
 o minimumLayoutSize(Container)
Returns the minimum dimensions needed to layout the components contained in the specified target container.
 o preferredLayoutSize(Container)
Returns the preferred dimensions for this layout given the components in the specified target container.
 o removeLayoutComponent(Component)
Removes the specified component from the layout.
 o toString()
Returns the String representation of this JDPLineLayout's values.

Constructors

 o JDPLineLayout
 public JDPLineLayout()
Constructs a new JDPLineLayout.

 o JDPLineLayout
 public JDPLineLayout(int hgap)
Constructs a JDPLineLayout with the specified gap.

Parameters:
hgap - the horizontal gap
 o JDPLineLayout
 public JDPLineLayout(int hgap,
                      boolean staticLayout)
Constructs a JDPLineLayout with the specified gap.

Parameters:
hgap - the horizontal gap
staticLayout - set to true to allow a component to be removed and then put back in the same position

Methods

 o addLayoutComponent
 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
 o removeLayoutComponent
 public void removeLayoutComponent(Component comp)
Removes the specified component from the layout.

Parameters:
comp - the component to be removed
 o minimumLayoutSize
 public Dimension minimumLayoutSize(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
See Also:
Container, preferredLayoutSize
 o preferredLayoutSize
 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
See Also:
Container, minimumLayoutSize
 o layoutContainer
 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 BorderLayout object.

Parameters:
target - the component being laid out
See Also:
Container
 o toString
 public String toString()
Returns the String representation of this JDPLineLayout's values.

Overrides:
toString in class Object