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.
-
JDPSplitLayout()
- Constructs a new JDPSplitLayout.
-
JDPSplitLayout(int, int)
- Constructs a JDPSplitLayout with the specified gaps.
-
addLayoutComponent(String, Component)
- Adds the specified named component to the layout.
-
getLeftPercentage()
- Get the percentage that the left side of the panel occupies.
-
getTopPercentage()
- Get the percentage that the top half of the panel occupies.
-
layoutContainer(Container)
- Lays out the specified container.
-
minimumLayoutSize(Container)
- Returns the minimum dimensions needed to layout the components
contained in the specified target container.
-
moveXdivider(int)
- Move x divider to the requested position.
-
moveYdivider(int)
- Move y divider to the requested position.
-
preferredLayoutSize(Container)
- Returns the preferred dimensions for this layout given the components
in the specified target container.
-
removeLayoutComponent(Component)
- Removes the specified component from the layout.
-
setLeftPercentage(float)
- Set the percentage that the left side of the panel occupies.
-
setTopPercentage(float)
- Set the percentage that the top half of the panel occupies.
-
showXdragPanel(int)
- Move x divider to the requested position temporarily..
-
showYdragPanel(int)
- Move y divider to the requested position temporarily.
-
toString()
- Returns the String representation of this JDPSplitLayout's values.
JDPSplitLayout
public JDPSplitLayout()
- Constructs a new JDPSplitLayout.
JDPSplitLayout
public JDPSplitLayout(int hgap,
int vgap)
- Constructs a JDPSplitLayout with the specified gaps.
- Parameters:
- hgap - the horizontal gap
- vgap - the vertical gap
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.
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.
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.
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.
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.
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.
moveXdivider
public void moveXdivider(int xpos)
- Move x divider to the requested position.
- Parameters:
- xpos - the position to move it to in the xplane.
moveYdivider
public void moveYdivider(int ypos)
- Move y divider to the requested position.
- Parameters:
- ypos - the position to move it to in the yplane.
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
removeLayoutComponent
public void removeLayoutComponent(Component comp)
- Removes the specified component from the layout.
- Parameters:
- comp - the component to be removed
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
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
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
toString
public String toString()
- Returns the String representation of this JDPSplitLayout's values.
- Overrides:
- toString in class Object