All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.JSplitPane

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----com.sun.java.swing.JSplitPane

public class JSplitPane
extends JComponent
JSplitPane is used to divide two (and only two) Components. The two Components are graphicaly divided based on the look and feel implementation. By user intervention the two Components can be interactively resized. The two Components can be aligned left to right, JSplitPane.HORIZONTAL_SPLIT, or top to bottom, JSplitPane.VERTICAL_SPLIT. The preferred way to change the size of the Componets is to message setDividerLocation where location is either the new x or y position depending on the orientation of the JSplitPane. JSplitPane will also try and reposition the other Component if one changes. To resize the Components to their preferred sizes message resetPreferredSizes. When the user is resizing the Components the minimum size of the Components is used to determine the maximum/minimum position the Components can be set to.


Variable Index

 o border
Border.
 o BORDER_PROPERTY
Bound property name for border.
 o BOTTOM
Used to add a Component below the other Component.
 o CONTINUOUS_LAYOUT_PROPERTY
Bound property name for continuousLayout.
 o continuousLayout
Whether or not the views are continuously redisplayed while resizing.
 o HORIZONTAL_SPLIT
Horizontal split indicates the Components are split along the x axis, eg the two Components will be split one to the left of the other.
 o LEFT
Used to add a Component to go on the left side of the other Component.
 o leftComponent
The left or top component.
 o orientation
How the views are split.
 o ORIENTATION_PROPERTY
Bound property name for orientation.
 o RIGHT
Used to add a Component to go on the right side of the other Component.
 o rightComponent
 o TOP
Used to add a Component above the other Component.
 o VERTICAL_SPLIT
Vertical split indicates the Components are split along the y axis, eg the two Components will be split one on top of the other.

Constructor Index

 o JSplitPane()
Returns a new JSplitPane configured with to vertically divide the child components.
 o JSplitPane(int)
Returns a new JSplitPane configured with the passed in orientation and no continuous layout.
 o JSplitPane(int, boolean)
Returns a new JSplitPane with the specified orientation and continuousLayout.
 o JSplitPane(int, boolean, Component, Component)
Returns a new JSplitPane with the specified orientation, continuousLayout and passed in Components.
 o JSplitPane(int, Component, Component)
Returns a new JSplitPane with the specified orientation, continuousLayout and passed in Components.

Method Index

 o addImpl(Component, Object, int)
Will throw a TooManySplitPaneChildren exception if more than 2 children already exist.
 o getBorder()
Returns the Border used.
 o getBottomComponent()
Returns the component below, or to the right of the divider.
 o getDividerLocation()
Returns the location of the divider from the look and feel implementation.
 o getLeftComponent()
Returns the component to the left (or above) the divider.
 o getOrientation()
Returns the orientation.
 o getRightComponent()
Returns the component to the right (or below) the divider.
 o getTopComponent()
Returns the component above, or to the left of the divider.
 o getUI()
Returns the TreeUI that is providing the current look and feel.
 o isContinuousLayout()
Returns true if the child comopnents are continuously redisplayed and layed out during user intervention.
 o paint(Graphics)
Subclassed to message the UI with finishedPaintingChildren after super has been messaged, as well as painting the border.
 o remove(int)
Removes the Component at the passed in index.
 o resetToPreferredSizes()
Messaged to relayout the JSplitPane based on the preferred size of the children components.
 o setBorder(Border)
Sets the border to newBorder.
 o setBottomComponent(Component)
Sets the component below, or to the right of the divider.
 o setContinuousLayout(boolean)
Sets whether or not the child components are continuously redisplayed and layed out during user intervention.
 o setDividerLocation(int)
Sets the location of the divider.
 o setLeftComponent(Component)
Sets the component to the left (or above) the divider.
 o setOrientation(int)
Sets the orientation, or how the splitter is divided.
 o setRightComponent(Component)
Sets the component to the right (or below) the divider.
 o setTopComponent(Component)
Sets the component above, or to the left of the divider.
 o setUI(SplitPaneUI)
Sets the TreeUI that will provide the current look and feel.
 o updateUI()
Called to replace the UI with the latest version from the default UIFactory.

Variables

 o VERTICAL_SPLIT
 public static int VERTICAL_SPLIT
Vertical split indicates the Components are split along the y axis, eg the two Components will be split one on top of the other.

 o HORIZONTAL_SPLIT
 public static int HORIZONTAL_SPLIT
Horizontal split indicates the Components are split along the x axis, eg the two Components will be split one to the left of the other.

 o LEFT
 public static String LEFT
Used to add a Component to go on the left side of the other Component.

 o RIGHT
 public static String RIGHT
Used to add a Component to go on the right side of the other Component.

 o TOP
 public static String TOP
Used to add a Component above the other Component.

 o BOTTOM
 public static String BOTTOM
Used to add a Component below the other Component.

 o ORIENTATION_PROPERTY
 public static final String ORIENTATION_PROPERTY
Bound property name for orientation.

 o CONTINUOUS_LAYOUT_PROPERTY
 public static final String CONTINUOUS_LAYOUT_PROPERTY
Bound property name for continuousLayout.

 o BORDER_PROPERTY
 public static final String BORDER_PROPERTY
Bound property name for border.

 o orientation
 protected int orientation
How the views are split.

 o continuousLayout
 protected boolean continuousLayout
Whether or not the views are continuously redisplayed while resizing.

 o leftComponent
 protected Component leftComponent
The left or top component.

 o rightComponent
 protected Component rightComponent
 o border
 protected Border border
Border.

Constructors

 o JSplitPane
 public JSplitPane()
Returns a new JSplitPane configured with to vertically divide the child components.

 o JSplitPane
 public JSplitPane(int newOrientation)
Returns a new JSplitPane configured with the passed in orientation and no continuous layout.

 o JSplitPane
 public JSplitPane(int newOrientation,
                   boolean newContinuousLayout)
Returns a new JSplitPane with the specified orientation and continuousLayout.

 o JSplitPane
 public JSplitPane(int newOrientation,
                   Component newLeftComponent,
                   Component newRightComponent)
Returns a new JSplitPane with the specified orientation, continuousLayout and passed in Components.

 o JSplitPane
 public JSplitPane(int newOrientation,
                   boolean newContinuousLayout,
                   Component newLeftComponent,
                   Component newRightComponent)
Returns a new JSplitPane with the specified orientation, continuousLayout and passed in Components.

Methods

 o setUI
 public void setUI(SplitPaneUI ui)
Sets the TreeUI that will provide the current look and feel.

 o getUI
 public SplitPaneUI getUI()
Returns the TreeUI that is providing the current look and feel.

 o updateUI
 public void updateUI()
Called to replace the UI with the latest version from the default UIFactory.

Overrides:
updateUI in class JComponent
 o setLeftComponent
 public void setLeftComponent(Component comp)
Sets the component to the left (or above) the divider.

 o getLeftComponent
 public Component getLeftComponent()
Returns the component to the left (or above) the divider.

 o setTopComponent
 public void setTopComponent(Component comp)
Sets the component above, or to the left of the divider.

 o getTopComponent
 public Component getTopComponent()
Returns the component above, or to the left of the divider.

 o setRightComponent
 public void setRightComponent(Component comp)
Sets the component to the right (or below) the divider.

 o getRightComponent
 public Component getRightComponent()
Returns the component to the right (or below) the divider.

 o setBottomComponent
 public void setBottomComponent(Component comp)
Sets the component below, or to the right of the divider.

 o getBottomComponent
 public Component getBottomComponent()
Returns the component below, or to the right of the divider.

 o setOrientation
 public void setOrientation(int orientation)
Sets the orientation, or how the splitter is divided.

 o getOrientation
 public int getOrientation()
Returns the orientation.

 o setContinuousLayout
 public void setContinuousLayout(boolean newContinuousLayout)
Sets whether or not the child components are continuously redisplayed and layed out during user intervention.

 o isContinuousLayout
 public boolean isContinuousLayout()
Returns true if the child comopnents are continuously redisplayed and layed out during user intervention.

 o resetToPreferredSizes
 public void resetToPreferredSizes()
Messaged to relayout the JSplitPane based on the preferred size of the children components.

 o setDividerLocation
 public void setDividerLocation(int location)
Sets the location of the divider. This is passed off to the look and feel implementation.

 o getDividerLocation
 public int getDividerLocation()
Returns the location of the divider from the look and feel implementation.

 o setBorder
 public void setBorder(Border newBorder)
Sets the border to newBorder.

 o getBorder
 public Border getBorder()
Returns the Border used.

 o remove
 public void remove(int index)
Removes the Component at the passed in index. This updates the leftComponent and rightComponent ivars if necessary, and then messages super.

Overrides:
remove in class Container
 o addImpl
 protected void addImpl(Component comp,
                        Object constraints,
                        int index)
Will throw a TooManySplitPaneChildren exception if more than 2 children already exist.

Overrides:
addImpl in class Container
 o paint
 public void paint(Graphics g)
Subclassed to message the UI with finishedPaintingChildren after super has been messaged, as well as painting the border.

Overrides:
paint in class JComponent

All Packages  Class Hierarchy  This Package  Previous  Next  Index