public class

BasicSplitPaneUI

extends SplitPaneUI
java.lang.Object
   ↳ javax.swing.plaf.ComponentUI
     ↳ javax.swing.plaf.SplitPaneUI
       ↳ javax.swing.plaf.basic.BasicSplitPaneUI
Known Direct Subclasses

Class Overview

A Basic L&F implementation of the SplitPaneUI.

Summary

Nested Classes
class BasicSplitPaneUI.BasicHorizontalLayoutManager LayoutManager for JSplitPanes that have an orientation of HORIZONTAL_SPLIT. 
class BasicSplitPaneUI.BasicVerticalLayoutManager LayoutManager used for JSplitPanes with an orientation of VERTICAL_SPLIT. 
class BasicSplitPaneUI.FocusHandler Implementation of the FocusListener that the JSplitPane UI uses. 
class BasicSplitPaneUI.KeyboardDownRightHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses. 
class BasicSplitPaneUI.KeyboardEndHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses. 
class BasicSplitPaneUI.KeyboardHomeHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses. 
class BasicSplitPaneUI.KeyboardResizeToggleHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses. 
class BasicSplitPaneUI.KeyboardUpLeftHandler Implementation of an ActionListener that the JSplitPane UI uses for handling specific key presses. 
class BasicSplitPaneUI.PropertyHandler Implementation of the PropertyChangeListener that the JSplitPane UI uses. 
Constants
String NON_CONTINUOUS_DIVIDER The divider used for non-continuous layout is added to the split pane with this object.
Fields
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 int beginDragDividerLocation Location of the divider when the dragging session began.
protected BasicSplitPaneDivider divider Instance of the divider for this JSplitPane.
protected KeyStroke dividerResizeToggleKey This field is deprecated. As of Java 2 platform v1.3.
protected int dividerSize The size of the divider while the dragging session is valid.
protected KeyStroke downKey This field is deprecated. As of Java 2 platform v1.3.
protected boolean draggingHW Set to true in startDragging if any of the children (not including the nonContinuousLayoutDivider) are heavy weights.
protected KeyStroke endKey This field is deprecated. As of Java 2 platform v1.3.
protected FocusListener focusListener Instance of the FocusListener for this JSplitPane.
protected KeyStroke homeKey This field is deprecated. As of Java 2 platform v1.3.
protected ActionListener keyboardDownRightListener This field is deprecated. As of Java 2 platform v1.3.
protected ActionListener keyboardEndListener This field is deprecated. As of Java 2 platform v1.3.
protected ActionListener keyboardHomeListener This field is deprecated. As of Java 2 platform v1.3.
protected ActionListener keyboardResizeToggleListener This field is deprecated. As of Java 2 platform v1.3.
protected ActionListener keyboardUpLeftListener This field is deprecated. As of Java 2 platform v1.3.
protected BasicSplitPaneUI.BasicHorizontalLayoutManager layoutManager LayoutManager that is created and placed into the split pane.
protected KeyStroke leftKey This field is deprecated. As of Java 2 platform v1.3.
protected Component nonContinuousLayoutDivider Instance for the shadow of the divider when non continuous layout is being used.
protected PropertyChangeListener propertyChangeListener Instance of the PropertyChangeListener for this JSplitPane.
protected KeyStroke rightKey This field is deprecated. As of Java 2 platform v1.3.
protected JSplitPane splitPane JSplitPane instance this instance is providing the look and feel for.
protected KeyStroke upKey This field is deprecated. As of Java 2 platform v1.3.
Public Constructors
BasicSplitPaneUI()
Public Methods
BasicSplitPaneDivider createDefaultDivider()
Creates the default divider.
static ComponentUI createUI(JComponent x)
Creates a new BasicSplitPaneUI instance
void finishedPaintingChildren(JSplitPane jc, Graphics g)
Messaged after the JSplitPane the receiver is providing the look and feel for paints its children.
BasicSplitPaneDivider getDivider()
Returns the divider between the top Components.
int getDividerLocation(JSplitPane jc)
Returns the location of the divider, which may differ from what the splitpane thinks the location of the divider is.
Insets getInsets(JComponent jc)
Returns the insets.
int getLastDragLocation()
Returns the last drag location of the JSplitPane.
int getMaximumDividerLocation(JSplitPane jc)
Gets the maximum location of the divider.
Dimension getMaximumSize(JComponent jc)
Returns the maximum size for the passed in component, This is passed off to the current layoutmanager.
int getMinimumDividerLocation(JSplitPane jc)
Gets the minimum location of the divider.
Dimension getMinimumSize(JComponent jc)
Returns the minimum size for the passed in component, This is passed off to the current layoutmanager.
Component getNonContinuousLayoutDivider()
Returns the divider to use when the splitPane is configured to not continuously layout.
int getOrientation()
Returns the orientation for the JSplitPane.
Dimension getPreferredSize(JComponent jc)
Returns the preferred size for the passed in component, This is passed off to the current layoutmanager.
JSplitPane getSplitPane()
Returns the splitpane this instance is currently contained in.
void installUI(JComponent c)
Installs the UI.
boolean isContinuousLayout()
Determines wether the JSplitPane is set to use a continuous layout.
void paint(Graphics g, JComponent jc)
Messaged to paint the look and feel.
void resetToPreferredSizes(JSplitPane jc)
Messaged to reset the preferred sizes.
void setContinuousLayout(boolean b)
Turn continuous layout on/off.
void setDividerLocation(JSplitPane jc, int location)
Sets the location of the divider to location.
void setLastDragLocation(int l)
Set the last drag location of the JSplitPane.
void setOrientation(int orientation)
Set the orientation for the JSplitPane.
void uninstallUI(JComponent c)
Uninstalls the UI.
Protected Methods
Component createDefaultNonContinuousLayoutDivider()
Returns the default non continuous layout divider, which is an instanceof Canvas that fills the background in dark gray.
FocusListener createFocusListener()
Creates a FocusListener for the JSplitPane UI.
ActionListener createKeyboardDownRightListener()
This method is deprecated. As of Java 2 platform v1.3.
ActionListener createKeyboardEndListener()
This method is deprecated. As of Java 2 platform v1.3.
ActionListener createKeyboardHomeListener()
This method is deprecated. As of Java 2 platform v1.3.
ActionListener createKeyboardResizeToggleListener()
This method is deprecated. As of Java 2 platform v1.3.
ActionListener createKeyboardUpLeftListener()
This method is deprecated. As of Java 2 platform v1.3.
PropertyChangeListener createPropertyChangeListener()
Creates a PropertyChangeListener for the JSplitPane UI.
void dragDividerTo(int location)
Messaged during a dragging session to move the divider to the passed in location.
void finishDraggingTo(int location)
Messaged to finish the dragging session.
int getDividerBorderSize()
This method is deprecated. As of Java 2 platform v1.3, instead set the border on the divider.
void installDefaults()
Installs the UI defaults.
void installKeyboardActions()
Installs the keyboard actions for the UI.
void installListeners()
Installs the event listeners for the UI.
void resetLayoutManager()
Resets the layout manager based on orientation and messages it with invalidateLayout to pull in appropriate Components.
void setNonContinuousLayoutDivider(Component newDivider)
Sets the divider to use when the splitPane is configured to not continuously layout.
void setNonContinuousLayoutDivider(Component newDivider, boolean rememberSizes)
Sets the divider to use.
void startDragging()
Should be messaged before the dragging session starts, resets lastDragLocation and dividerSize.
void uninstallDefaults()
Uninstalls the UI defaults.
void uninstallKeyboardActions()
Uninstalls the keyboard actions for the UI.
void uninstallListeners()
Uninstalls the event listeners for the UI.
[Expand]
Inherited Methods
From class javax.swing.plaf.SplitPaneUI
From class javax.swing.plaf.ComponentUI
From class java.lang.Object

Constants

protected static final String NON_CONTINUOUS_DIVIDER

The divider used for non-continuous layout is added to the split pane with this object.

Constant Value: "nonContinuousDivider"

Fields

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 int beginDragDividerLocation

Location of the divider when the dragging session began.

protected BasicSplitPaneDivider divider

Instance of the divider for this JSplitPane.

protected KeyStroke dividerResizeToggleKey

This field is deprecated.
As of Java 2 platform v1.3.

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.

protected int dividerSize

The size of the divider while the dragging session is valid.

protected KeyStroke downKey

This field is deprecated.
As of Java 2 platform v1.3.

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.

protected boolean draggingHW

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

protected KeyStroke endKey

This field is deprecated.
As of Java 2 platform v1.3.

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.

protected FocusListener focusListener

Instance of the FocusListener for this JSplitPane.

protected KeyStroke homeKey

This field is deprecated.
As of Java 2 platform v1.3.

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.

protected ActionListener keyboardDownRightListener

This field is deprecated.
As of Java 2 platform v1.3.

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.

protected ActionListener keyboardEndListener

This field is deprecated.
As of Java 2 platform v1.3.

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.

protected ActionListener keyboardHomeListener

This field is deprecated.
As of Java 2 platform v1.3.

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.

protected ActionListener keyboardResizeToggleListener

This field is deprecated.
As of Java 2 platform v1.3.

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.

protected ActionListener keyboardUpLeftListener

This field is deprecated.
As of Java 2 platform v1.3.

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.

protected BasicSplitPaneUI.BasicHorizontalLayoutManager layoutManager

LayoutManager that is created and placed into the split pane.

protected KeyStroke leftKey

This field is deprecated.
As of Java 2 platform v1.3.

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.

protected Component nonContinuousLayoutDivider

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

protected PropertyChangeListener propertyChangeListener

Instance of the PropertyChangeListener for this JSplitPane.

protected KeyStroke rightKey

This field is deprecated.
As of Java 2 platform v1.3.

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.

protected JSplitPane splitPane

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

protected KeyStroke upKey

This field is deprecated.
As of Java 2 platform v1.3.

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.

Public Constructors

public BasicSplitPaneUI ()

Public Methods

public BasicSplitPaneDivider createDefaultDivider ()

Creates the default divider.

public static ComponentUI createUI (JComponent x)

Creates a new BasicSplitPaneUI instance

public void finishedPaintingChildren (JSplitPane jc, Graphics g)

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

public BasicSplitPaneDivider getDivider ()

Returns the divider between the top Components.

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.

public Insets getInsets (JComponent jc)

Returns the insets. The insets are returned from the border insets of the current border.

public int getLastDragLocation ()

Returns the last drag location of the JSplitPane.

public int getMaximumDividerLocation (JSplitPane jc)

Gets the maximum location of the divider.

public Dimension getMaximumSize (JComponent jc)

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

Parameters
jc the component whose maximum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
Returns
  • a Dimension object or null

public int getMinimumDividerLocation (JSplitPane jc)

Gets the minimum location of the divider.

public Dimension getMinimumSize (JComponent jc)

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

Parameters
jc the component whose minimum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
Returns
  • a Dimension object or null

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.

public int getOrientation ()

Returns the orientation for the JSplitPane.

public Dimension getPreferredSize (JComponent jc)

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

Parameters
jc the component whose preferred size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components

public JSplitPane getSplitPane ()

Returns the splitpane this instance is currently contained in.

public void installUI (JComponent c)

Installs the UI.

Parameters
c the component where this UI delegate is being installed

public boolean isContinuousLayout ()

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

public void paint (Graphics g, JComponent jc)

Messaged to paint the look and feel.

Parameters
g the Graphics context in which to paint
jc the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components

public void resetToPreferredSizes (JSplitPane jc)

Messaged to reset the preferred sizes.

public void setContinuousLayout (boolean b)

Turn continuous layout on/off.

public void setDividerLocation (JSplitPane jc, int location)

Sets the location of the divider to location.

public void setLastDragLocation (int l)

Set the last drag location of the JSplitPane.

public void setOrientation (int orientation)

Set the orientation for the JSplitPane.

public void uninstallUI (JComponent c)

Uninstalls the UI.

Parameters
c the component from which this UI delegate is being removed; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components

Protected Methods

protected Component createDefaultNonContinuousLayoutDivider ()

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

protected FocusListener createFocusListener ()

Creates a FocusListener for the JSplitPane UI.

protected ActionListener createKeyboardDownRightListener ()

This method is deprecated.
As of Java 2 platform v1.3.

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.

protected ActionListener createKeyboardEndListener ()

This method is deprecated.
As of Java 2 platform v1.3.

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.

protected ActionListener createKeyboardHomeListener ()

This method is deprecated.
As of Java 2 platform v1.3.

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.

protected ActionListener createKeyboardResizeToggleListener ()

This method is deprecated.
As of Java 2 platform v1.3.

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.

protected ActionListener createKeyboardUpLeftListener ()

This method is deprecated.
As of Java 2 platform v1.3.

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.

protected PropertyChangeListener createPropertyChangeListener ()

Creates a PropertyChangeListener for the JSplitPane UI.

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.

protected void finishDraggingTo (int location)

Messaged to finish the dragging session. If not continuous display the dividers location will be reset.

protected int getDividerBorderSize ()

This method is deprecated.
As of Java 2 platform v1.3, instead set the border on the divider.

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.

protected void installDefaults ()

Installs the UI defaults.

protected void installKeyboardActions ()

Installs the keyboard actions for the UI.

protected void installListeners ()

Installs the event listeners for the UI.

protected void resetLayoutManager ()

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

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.

protected void setNonContinuousLayoutDivider (Component newDivider, boolean rememberSizes)

Sets the divider to use.

protected void startDragging ()

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

protected void uninstallDefaults ()

Uninstalls the UI defaults.

protected void uninstallKeyboardActions ()

Uninstalls the keyboard actions for the UI.

protected void uninstallListeners ()

Uninstalls the event listeners for the UI.