This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing.plaf.basic
class BasicSplitPaneUI

java.lang.Object extended by javax.swing.plaf.ComponentUI extended by javax.swing.plaf.SplitPaneUI extended by javax.swing.plaf.basic.BasicSplitPaneUI
Direct Known Subclasses:
MetalSplitPaneUI

public class BasicSplitPaneUI
extends SplitPaneUI

A Basic L&F implementation of the SplitPaneUI.


Nested Class Summary
 class

           LayoutManager for JSplitPanes that have an orientation of HORIZONTAL_SPLIT.
 class

           LayoutManager used for JSplitPanes with an orientation of VERTICAL_SPLIT.
 class

           Implementation of the FocusListener that the JSplitPane UI uses.
 class

           Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
 class

           Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
 class

           Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
 class

           Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
 class

           Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses.
 class

           Implementation of the PropertyChangeListener that the JSplitPane UI uses.
 
Field Summary
protected int beginDragDividerLocation
          Location of the divider when the dragging session began.
protected BasicSplitPaneDivider divider
          Instance of the divider for this JSplitPane.
protected KeyStroke dividerResizeToggleKey
          As of Java 2 platform v1.3 this previously undocumented field is no longer used.
protected int dividerSize
          The size of the divider while the dragging session is valid.
protected KeyStroke downKey
          As of Java 2 platform v1.3 this previously undocumented field is no longer used.
protected boolean draggingHW
          Set to true in startDragging if any of the children (not including the nonContinuousLayoutDivider) are heavy weights.
protected KeyStroke endKey
          As of Java 2 platform v1.3 this previously undocumented field is no longer used.
protected FocusListener focusListener
          Instance of the FocusListener for this JSplitPane.
protected KeyStroke homeKey
          As of Java 2 platform v1.3 this previously undocumented field is no longer used.
protected ActionListener keyboardDownRightListener
          As of Java 2 platform v1.3 this previously undocumented field is no longer used.
protected ActionListener keyboardEndListener
          As of Java 2 platform v1.3 this previously undocumented field is no longer used.
protected ActionListener keyboardHomeListener
          As of Java 2 platform v1.3 this previously undocumented field is no longer used.
protected ActionListener keyboardResizeToggleListener
          As of Java 2 platform v1.3 this previously undocumented field is no longer used.
protected ActionListener keyboardUpLeftListener
          As of Java 2 platform v1.3 this previously undocumented field is no longer used.
protected static int KEYBOARD_DIVIDER_MOVE_OFFSET
          How far (relative) the divider does move when it is moved around by the cursor keys on the keyboard.
protected BasicSplitPaneUI.BasicHorizontalLayoutManager layoutManager
          LayoutManager that is created and placed into the split pane.
protected KeyStroke leftKey
          As of Java 2 platform v1.3 this previously undocumented field is no longer used.
protected Component nonContinuousLayoutDivider
          Instance for the shadow of the divider when non continuous layout is being used.
protected static String NON_CONTINUOUS_DIVIDER
          The divider used for non-continuous layout is added to the split pane with this object.
protected PropertyChangeListener propertyChangeListener
          Instance of the PropertyChangeListener for this JSplitPane.
protected KeyStroke rightKey
          As of Java 2 platform v1.3 this previously undocumented field is no longer used.
protected JSplitPane splitPane
          JSplitPane instance this instance is providing the look and feel for.
protected KeyStroke upKey
          As of Java 2 platform v1.3 this previously undocumented field is no longer used.
 
Constructor Summary

          
 
Method Summary
 BasicSplitPaneDivider

          Creates the default divider.
protected Component

          Returns the default non continuous layout divider, which is an instanceof Canvas that fills the background in dark gray.
protected FocusListener

          Creates a FocusListener for the JSplitPane UI.
protected ActionListener

          As of Java 2 platform v1.3 this method is no longer used.
protected ActionListener

          As of Java 2 platform v1.3 this method is no longer used.
protected ActionListener

          As of Java 2 platform v1.3 this method is no longer used.
protected ActionListener

          As of Java 2 platform v1.3 this method is no longer used.
protected ActionListener

          As of Java 2 platform v1.3 this method is no longer used.
protected PropertyChangeListener

          Creates a PropertyChangeListener for the JSplitPane UI.
static ComponentUI

          Creates a new BasicSplitPaneUI instance
protected void
dragDividerTo(int location)

          Messaged during a dragging session to move the divider to the passed in location.
protected void
finishDraggingTo(int location)

          Messaged to finish the dragging session.
 void

          Messaged after the JSplitPane the receiver is providing the look and feel for paints its children.
 BasicSplitPaneDivider

          Returns the divider between the top Components.
protected int

          As of Java 2 platform v1.3 this method is no longer used.
 int

          Returns the location of the divider, which may differ from what the splitpane thinks the location of the divider is.
 Insets

          Returns the insets.
 int

          Returns the last drag location of the JSplitPane.
 int

          Gets the maximum location of the divider.
 Dimension

          Returns the maximum size for the passed in component, This is passed off to the current layoutmanager.
 int

          Gets the minimum location of the divider.
 Dimension

          Returns the minimum size for the passed in component, This is passed off to the current layoutmanager.
 Component

          Returns the divider to use when the splitPane is configured to not continuously layout.
 int

          Returns the orientation for the JSplitPane.
 Dimension

          Returns the preferred size for the passed in component, This is passed off to the current layoutmanager.
 JSplitPane

          Returns the splitpane this instance is currently contained in.
protected void

          Installs the UI defaults.
protected void

          Installs the keyboard actions for the UI.
protected void

          Installs the event listeners for the UI.
 void

          Installs the UI.
 boolean

          Determines wether the JSplitPane is set to use a continuous layout.
 void

          Messaged to paint the look and feel.
protected void

          Resets the layout manager based on orientation and messages it with invalidateLayout to pull in appropriate Components.
 void

          Messaged to reset the preferred sizes.
 void

          Turn continuous layout on/off.
 void
setDividerLocation(JSplitPane jc, int location)

          Sets the location of the divider to location.
 void

          Set the last drag location of the JSplitPane.
protected void

          Sets the divider to use when the splitPane is configured to not continuously layout.
protected void
setNonContinuousLayoutDivider(Component newDivider, boolean rememberSizes)

          Sets the divider to use.
 void
setOrientation(int orientation)

          Set the orientation for the JSplitPane.
protected void

          Should be messaged before the dragging session starts, resets lastDragLocation and dividerSize.
protected void

          Uninstalls the UI defaults.
protected void

          Uninstalls the keyboard actions for the UI.
protected void

          Uninstalls the event listeners for the UI.
 void

          Uninstalls the UI.
 
Methods inherited from class javax.swing.plaf.SplitPaneUI
finishedPaintingChildren, getDividerLocation, getMaximumDividerLocation, getMinimumDividerLocation, resetToPreferredSizes, setDividerLocation
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

beginDragDividerLocation

protected int beginDragDividerLocation
Location of the divider when the dragging session began.

divider

protected BasicSplitPaneDivider divider
Instance of the divider for this JSplitPane.

dividerResizeToggleKey

protected KeyStroke dividerResizeToggleKey
As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

dividerSize

protected int dividerSize
The size of the divider while the dragging session is valid.

downKey

protected KeyStroke downKey
As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

draggingHW

protected boolean draggingHW
Set to true in startDragging if any of the children (not including the nonContinuousLayoutDivider) are heavy weights.

endKey

protected KeyStroke endKey
As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

focusListener

protected FocusListener focusListener
Instance of the FocusListener for this JSplitPane.

homeKey

protected KeyStroke homeKey
As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

keyboardDownRightListener

protected ActionListener keyboardDownRightListener
As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

keyboardEndListener

protected ActionListener keyboardEndListener
As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

keyboardHomeListener

protected ActionListener keyboardHomeListener
As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

keyboardResizeToggleListener

protected ActionListener keyboardResizeToggleListener
As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

keyboardUpLeftListener

protected ActionListener keyboardUpLeftListener
As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

KEYBOARD_DIVIDER_MOVE_OFFSET

protected static int KEYBOARD_DIVIDER_MOVE_OFFSET
How far (relative) the divider does move when it is moved around by the cursor keys on the keyboard.

layoutManager

protected BasicSplitPaneUI.BasicHorizontalLayoutManager layoutManager
LayoutManager that is created and placed into the split pane.

leftKey

protected KeyStroke leftKey
As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

nonContinuousLayoutDivider

protected Component nonContinuousLayoutDivider
Instance for the shadow of the divider when non continuous layout is being used.

NON_CONTINUOUS_DIVIDER

protected static final String NON_CONTINUOUS_DIVIDER
The divider used for non-continuous layout is added to the split pane with this object.

propertyChangeListener

protected PropertyChangeListener propertyChangeListener
Instance of the PropertyChangeListener for this JSplitPane.

rightKey

protected KeyStroke rightKey
As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.

splitPane

protected JSplitPane splitPane
JSplitPane instance this instance is providing the look and feel for.

upKey

protected KeyStroke upKey
As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.
Constructor Detail

BasicSplitPaneUI

public BasicSplitPaneUI()
Method Detail

createDefaultDivider

public BasicSplitPaneDivider createDefaultDivider()
Creates the default divider.


createDefaultNonContinuousLayoutDivider

protected Component createDefaultNonContinuousLayoutDivider()
Returns the default non continuous layout divider, which is an instanceof Canvas that fills the background in dark gray.


createFocusListener

protected FocusListener createFocusListener()
Creates a FocusListener for the JSplitPane UI.


createKeyboardDownRightListener

protected ActionListener createKeyboardDownRightListener()
As of Java 2 platform v1.3 this method is no longer used. Subclassers previously using this method should instead create an Action wrapping the ActionListener, and register that Action by overriding installKeyboardActions and placing the Action in the SplitPane's ActionMap. Please refer to the key bindings specification for further details.

Creates a ActionListener for the JSplitPane UI that listens for specific key presses.


createKeyboardEndListener

protected ActionListener createKeyboardEndListener()
As of Java 2 platform v1.3 this method is no longer used. Subclassers previously using this method should instead create an Action wrapping the ActionListener, and register that Action by overriding installKeyboardActions and placing the Action in the SplitPane's ActionMap. Please refer to the key bindings specification for further details.

Creates a ActionListener for the JSplitPane UI that listens for specific key presses.


createKeyboardHomeListener

protected ActionListener createKeyboardHomeListener()
As of Java 2 platform v1.3 this method is no longer used. Subclassers previously using this method should instead create an Action wrapping the ActionListener, and register that Action by overriding installKeyboardActions and placing the Action in the SplitPane's ActionMap. Please refer to the key bindings specification for further details.

Creates a ActionListener for the JSplitPane UI that listens for specific key presses.


createKeyboardResizeToggleListener

protected ActionListener createKeyboardResizeToggleListener()
As of Java 2 platform v1.3 this method is no longer used. Subclassers previously using this method should instead create an Action wrapping the ActionListener, and register that Action by overriding installKeyboardActions and placing the Action in the SplitPane's ActionMap. Please refer to the key bindings specification for further details.

Creates a ActionListener for the JSplitPane UI that listens for specific key presses.


createKeyboardUpLeftListener

protected ActionListener createKeyboardUpLeftListener()
As of Java 2 platform v1.3 this method is no longer used. Subclassers previously using this method should instead create an Action wrapping the ActionListener, and register that Action by overriding installKeyboardActions and placing the Action in the SplitPane's ActionMap. Please refer to the key bindings specification for further details.

Creates a ActionListener for the JSplitPane UI that listens for specific key presses.


createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()
Creates a PropertyChangeListener for the JSplitPane UI.


createUI

public static ComponentUI createUI(JComponent x)
Creates a new BasicSplitPaneUI instance

Parameters:
x

dragDividerTo

protected void dragDividerTo(int location)
Messaged during a dragging session to move the divider to the passed in location. If continuousLayout is true the location is reset and the splitPane validated.

Parameters:
location

finishDraggingTo

protected void finishDraggingTo(int location)
Messaged to finish the dragging session. If not continuous display the dividers location will be reset.

Parameters:
location

finishedPaintingChildren

public void finishedPaintingChildren(JSplitPane jc,
                                     Graphics g)
Messaged after the JSplitPane the receiver is providing the look and feel for paints its children.

Overrides:
finishedPaintingChildren in class SplitPaneUI
Parameters:
jc
g

getDivider

public BasicSplitPaneDivider getDivider()
Returns the divider between the top Components.


getDividerBorderSize

protected int getDividerBorderSize()
As of Java 2 platform v1.3 this method is no longer used. Instead you should set the border on the divider.

Returns the width of one side of the divider border.


getDividerLocation

public int getDividerLocation(JSplitPane jc)
Returns the location of the divider, which may differ from what the splitpane thinks the location of the divider is.

Overrides:
getDividerLocation in class SplitPaneUI
Parameters:
jc

getInsets

public Insets getInsets(JComponent jc)
Returns the insets. The insets are returned from the border insets of the current border.

Parameters:
jc

getLastDragLocation

public int getLastDragLocation()
Returns the last drag location of the JSplitPane.


getMaximumDividerLocation

public int getMaximumDividerLocation(JSplitPane jc)
Gets the maximum location of the divider.

Overrides:
getMaximumDividerLocation in class SplitPaneUI
Parameters:
jc

getMaximumSize

public Dimension getMaximumSize(JComponent jc)
Returns the maximum size for the passed in component, This is passed off to the current layoutmanager.

Overrides:
getMaximumSize in class ComponentUI
Parameters:
jc

getMinimumDividerLocation

public int getMinimumDividerLocation(JSplitPane jc)
Gets the minimum location of the divider.

Overrides:
getMinimumDividerLocation in class SplitPaneUI
Parameters:
jc

getMinimumSize

public Dimension getMinimumSize(JComponent jc)
Returns the minimum size for the passed in component, This is passed off to the current layoutmanager.

Overrides:
getMinimumSize in class ComponentUI
Parameters:
jc

getNonContinuousLayoutDivider

public Component getNonContinuousLayoutDivider()
Returns the divider to use when the splitPane is configured to not continuously layout. This divider will only be used during a dragging session.


getOrientation

public int getOrientation()
Returns the orientation for the JSplitPane.


getPreferredSize

public Dimension getPreferredSize(JComponent jc)
Returns the preferred size for the passed in component, This is passed off to the current layoutmanager.

Overrides:
getPreferredSize in class ComponentUI
Parameters:
jc

getSplitPane

public JSplitPane getSplitPane()
Returns the splitpane this instance is currently contained in.


installDefaults

protected void installDefaults()
Installs the UI defaults.


installKeyboardActions

protected void installKeyboardActions()
Installs the keyboard actions for the UI.


installListeners

protected void installListeners()
Installs the event listeners for the UI.


installUI

public void installUI(JComponent c)
Installs the UI.

Overrides:
installUI in class ComponentUI
Parameters:
c

isContinuousLayout

public boolean isContinuousLayout()
Determines wether the JSplitPane is set to use a continuous layout.


paint

public void paint(Graphics g,
                  JComponent jc)
Messaged to paint the look and feel.

Overrides:
paint in class ComponentUI
Parameters:
g
jc

resetLayoutManager

protected void resetLayoutManager()
Resets the layout manager based on orientation and messages it with invalidateLayout to pull in appropriate Components.


resetToPreferredSizes

public void resetToPreferredSizes(JSplitPane jc)
Messaged to reset the preferred sizes.

Overrides:
resetToPreferredSizes in class SplitPaneUI
Parameters:
jc

setContinuousLayout

public void setContinuousLayout(boolean b)
Turn continuous layout on/off.

Parameters:
b

setDividerLocation

public void setDividerLocation(JSplitPane jc,
                               int location)
Sets the location of the divider to location.

Overrides:
setDividerLocation in class SplitPaneUI
Parameters:
jc
location

setLastDragLocation

public void setLastDragLocation(int l)
Set the last drag location of the JSplitPane.

Parameters:
l

setNonContinuousLayoutDivider

protected void setNonContinuousLayoutDivider(Component newDivider)
Sets the divider to use when the splitPane is configured to not continuously layout. This divider will only be used during a dragging session. It is recommended that the passed in component be a heavy weight.

Parameters:
newDivider

setNonContinuousLayoutDivider

protected void setNonContinuousLayoutDivider(Component newDivider,
                                             boolean rememberSizes)
Sets the divider to use.

Parameters:
newDivider
rememberSizes

setOrientation

public void setOrientation(int orientation)
Set the orientation for the JSplitPane.

Parameters:
orientation

startDragging

protected void startDragging()
Should be messaged before the dragging session starts, resets lastDragLocation and dividerSize.


uninstallDefaults

protected void uninstallDefaults()
Uninstalls the UI defaults.


uninstallKeyboardActions

protected void uninstallKeyboardActions()
Uninstalls the keyboard actions for the UI.


uninstallListeners

protected void uninstallListeners()
Uninstalls the event listeners for the UI.


uninstallUI

public void uninstallUI(JComponent c)
Uninstalls the UI.

Overrides:
uninstallUI in class ComponentUI
Parameters:
c


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.