Class JDPSplitLayout

java.lang.Object
   |
   +----JDPSplitLayout

public class JDPSplitLayout
extends Object
implements LayoutManager
Class JDPSplitLayout represents layout manager for laying out on a split screen where the position of the split can be adjusted.


Constructor Index

 o JDPSplitLayout()
Constructs a new JDPSplitLayout.
 o JDPSplitLayout(int, int)
Constructs a JDPSplitLayout with the specified gaps.

Method Index

 o addLayoutComponent(String, Component)
Adds the specified named component to the layout.
 o getLeftPercentage()
Get the percentage that the left side of the panel occupies.
 o getTopPercentage()
Get the percentage that the top half of the panel occupies.
 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 moveXdivider(int)
Move x divider to the requested position.
 o moveYdivider(int)
Move y divider to the requested position.
 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 setLeftPercentage(float)
Set the percentage that the left side of the panel occupies.
 o setTopPercentage(float)
Set the percentage that the top half of the panel occupies.
 o showXdragPanel(int)
Move x divider to the requested position temporarily..
 o showYdragPanel(int)
Move y divider to the requested position temporarily.
 o toString()
Returns the String representation of this JDPSplitLayout's values.

Constructors

 o JDPSplitLayout
 public JDPSplitLayout()
Constructs a new JDPSplitLayout.

 o JDPSplitLayout
 public JDPSplitLayout(int hgap,
                       int vgap)
Constructs a JDPSplitLayout with the specified gaps.

Parameters:
hgap - the horizontal gap
vgap - the vertical gap

Methods

 o setLeftPercentage
 public void setLeftPercentage(float percent)
Set the percentage that the left side of the panel occupies.

Parameters:
percent - the percentage that the left side of the panel occupies.
 o setTopPercentage
 public void setTopPercentage(float percent)
Set the percentage that the top half of the panel occupies.

Parameters:
percent - the percentage that the top half of the panel occupies.
 o getLeftPercentage
 public float getLeftPercentage()
Get the percentage that the left side of the panel occupies.

Returns:
percent the percentage that the left side of the panel occupies.
 o getTopPercentage
 public float getTopPercentage()
Get the percentage that the top half of the panel occupies.

Returns:
percent the percentage that the top half of the panel occupies.
 o showXdragPanel
 public void showXdragPanel(int xpos)
Move x divider to the requested position temporarily..

Parameters:
xpos - the position to move it to in the xplane.
 o showYdragPanel
 public void showYdragPanel(int ypos)
Move y divider to the requested position temporarily.

Parameters:
ypos - the position to move it to in the yplane.
 o moveXdivider
 public void moveXdivider(int xpos)
Move x divider to the requested position.

Parameters:
xpos - the position to move it to in the xplane.
 o moveYdivider
 public void moveYdivider(int ypos)
Move y divider to the requested position.

Parameters:
ypos - the position to move it to in the yplane.
 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 JDPSplitLayout's values.

Overrides:
toString in class Object