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, SynthSplitPaneUI

public class BasicSplitPaneUI
extends SplitPaneUI

Disabled: no SafeJ information.

A Basic L&F implementation of the SplitPaneUI.


Nested Class Summary
 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.
 
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
          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
          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
          Deprecated. As of Java 2 platform v1.3.
protected  FocusListener focusListener
          Instance of the FocusListener for this JSplitPane.
protected  KeyStroke homeKey
          Deprecated. As of Java 2 platform v1.3.
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  ActionListener keyboardDownRightListener
          Deprecated. As of Java 2 platform v1.3.
protected  ActionListener keyboardEndListener
          Deprecated. As of Java 2 platform v1.3.
protected  ActionListener keyboardHomeListener
          Deprecated. As of Java 2 platform v1.3.
protected  ActionListener keyboardResizeToggleListener
          Deprecated. As of Java 2 platform v1.3.
protected  ActionListener keyboardUpLeftListener
          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
          Deprecated. As of Java 2 platform v1.3.
protected static String NON_CONTINUOUS_DIVIDER
          The divider used for non-continuous layout is added to the split pane with this object.
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
          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
          Deprecated. As of Java 2 platform v1.3.
 
Constructor Summary
BasicSplitPaneUI()
           
 
Method Summary
 BasicSplitPaneDivider createDefaultDivider()
          Creates the default divider.
protected  Component createDefaultNonContinuousLayoutDivider()
          Returns the default non continuous layout divider, which is an instance of Canvas that fills in the background with dark gray.
protected  FocusListener createFocusListener()
          Creates a FocusListener for the JSplitPane UI.
protected  ActionListener createKeyboardDownRightListener()
          Deprecated. As of Java 2 platform v1.3.
protected  ActionListener createKeyboardEndListener()
          Deprecated. As of Java 2 platform v1.3.
protected  ActionListener createKeyboardHomeListener()
          Deprecated. As of Java 2 platform v1.3.
protected  ActionListener createKeyboardResizeToggleListener()
          Deprecated. As of Java 2 platform v1.3.
protected  ActionListener createKeyboardUpLeftListener()
          Deprecated. As of Java 2 platform v1.3.
protected  PropertyChangeListener createPropertyChangeListener()
          Creates a PropertyChangeListener for the JSplitPane UI.
static ComponentUI createUI(JComponent x)
          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 finishedPaintingChildren(JSplitPane sp, Graphics g)
          Called when the specified split pane has finished painting its children.
 BasicSplitPaneDivider getDivider()
          Returns the divider between the top Components.
protected  int getDividerBorderSize()
          Deprecated. As of Java 2 platform v1.3, instead set the border on the divider.
 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.
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.
 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)
          Paints the specified component appropriately for the look and feel.
protected  void resetLayoutManager()
          Resets the layout manager based on orientation and messages it with invalidateLayout to pull in appropriate Components.
 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.
protected  void setNonContinuousLayoutDivider(Component newDivider)
          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 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.
 void uninstallUI(JComponent c)
          Uninstalls the UI.
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NON_CONTINUOUS_DIVIDER

protected static final String NON_CONTINUOUS_DIVIDER
Class is disabled.

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

See Also:
Constant Field Values

KEYBOARD_DIVIDER_MOVE_OFFSET

protected static int KEYBOARD_DIVIDER_MOVE_OFFSET
Class is disabled.

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


splitPane

protected JSplitPane splitPane
Class is disabled.

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


layoutManager

protected BasicSplitPaneUI.BasicHorizontalLayoutManager layoutManager
Class is disabled.

LayoutManager that is created and placed into the split pane.


divider

protected BasicSplitPaneDivider divider
Class is disabled.

Instance of the divider for this JSplitPane.


propertyChangeListener

protected PropertyChangeListener propertyChangeListener
Class is disabled.

Instance of the PropertyChangeListener for this JSplitPane.


focusListener

protected FocusListener focusListener
Class is disabled.

Instance of the FocusListener for this JSplitPane.


dividerSize

protected int dividerSize
Class is disabled.

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


nonContinuousLayoutDivider

protected Component nonContinuousLayoutDivider
Class is disabled.

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


draggingHW

protected boolean draggingHW
Class is disabled.

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


beginDragDividerLocation

protected int beginDragDividerLocation
Class is disabled.

Location of the divider when the dragging session began.


upKey

@Deprecated
protected KeyStroke upKey
Deprecated. As of Java 2 platform v1.3.
Class is disabled.

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.


downKey

@Deprecated
protected KeyStroke downKey
Deprecated. As of Java 2 platform v1.3.
Class is disabled.

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.


leftKey

@Deprecated
protected KeyStroke leftKey
Deprecated. As of Java 2 platform v1.3.
Class is disabled.

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.


rightKey

@Deprecated
protected KeyStroke rightKey
Deprecated. As of Java 2 platform v1.3.
Class is disabled.

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.


homeKey

@Deprecated
protected KeyStroke homeKey
Deprecated. As of Java 2 platform v1.3.
Class is disabled.

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.


endKey

@Deprecated
protected KeyStroke endKey
Deprecated. As of Java 2 platform v1.3.
Class is disabled.

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.


dividerResizeToggleKey

@Deprecated
protected KeyStroke dividerResizeToggleKey
Deprecated. As of Java 2 platform v1.3.
Class is disabled.

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

@Deprecated
protected ActionListener keyboardUpLeftListener
Deprecated. As of Java 2 platform v1.3.
Class is disabled.

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

@Deprecated
protected ActionListener keyboardDownRightListener
Deprecated. As of Java 2 platform v1.3.
Class is disabled.

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

@Deprecated
protected ActionListener keyboardHomeListener
Deprecated. As of Java 2 platform v1.3.
Class is disabled.

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

@Deprecated
protected ActionListener keyboardEndListener
Deprecated. As of Java 2 platform v1.3.
Class is disabled.

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

@Deprecated
protected ActionListener keyboardResizeToggleListener
Deprecated. As of Java 2 platform v1.3.
Class is disabled.

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()
Class is disabled.

Method Detail

createUI

public static ComponentUI createUI(JComponent x)
Class is disabled.

Creates a new BasicSplitPaneUI instance


installUI

public void installUI(JComponent c)
Class is disabled.

Installs the UI.

Overrides:
installUI in class ComponentUI
Parameters:
c - the component where this UI delegate is being installed
See Also:
ComponentUI.uninstallUI(javax.swing.JComponent), JComponent.setUI(javax.swing.plaf.ComponentUI), JComponent.updateUI()

installDefaults

protected void installDefaults()
Class is disabled.

Installs the UI defaults.


installListeners

protected void installListeners()
Class is disabled.

Installs the event listeners for the UI.


installKeyboardActions

protected void installKeyboardActions()
Class is disabled.

Installs the keyboard actions for the UI.


uninstallUI

public void uninstallUI(JComponent c)
Class is disabled.

Uninstalls the UI.

Overrides:
uninstallUI in class ComponentUI
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
See Also:
ComponentUI.installUI(javax.swing.JComponent), JComponent.updateUI()

uninstallDefaults

protected void uninstallDefaults()
Class is disabled.

Uninstalls the UI defaults.


uninstallListeners

protected void uninstallListeners()
Class is disabled.

Uninstalls the event listeners for the UI.


uninstallKeyboardActions

protected void uninstallKeyboardActions()
Class is disabled.

Uninstalls the keyboard actions for the UI.


createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()
Class is disabled.

Creates a PropertyChangeListener for the JSplitPane UI.


createFocusListener

protected FocusListener createFocusListener()
Class is disabled.

Creates a FocusListener for the JSplitPane UI.


createKeyboardUpLeftListener

@Deprecated
protected ActionListener createKeyboardUpLeftListener()
Deprecated. As of Java 2 platform v1.3.

Class is disabled.

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.


createKeyboardDownRightListener

@Deprecated
protected ActionListener createKeyboardDownRightListener()
Deprecated. As of Java 2 platform v1.3.

Class is disabled.

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

@Deprecated
protected ActionListener createKeyboardHomeListener()
Deprecated. As of Java 2 platform v1.3.

Class is disabled.

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

@Deprecated
protected ActionListener createKeyboardEndListener()
Deprecated. As of Java 2 platform v1.3.

Class is disabled.

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

@Deprecated
protected ActionListener createKeyboardResizeToggleListener()
Deprecated. As of Java 2 platform v1.3.

Class is disabled.

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.


getOrientation

public int getOrientation()
Class is disabled.

Returns the orientation for the JSplitPane.


setOrientation

public void setOrientation(int orientation)
Class is disabled.

Set the orientation for the JSplitPane.


isContinuousLayout

public boolean isContinuousLayout()
Class is disabled.

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


setContinuousLayout

public void setContinuousLayout(boolean b)
Class is disabled.

Turn continuous layout on/off.


getLastDragLocation

public int getLastDragLocation()
Class is disabled.

Returns the last drag location of the JSplitPane.


setLastDragLocation

public void setLastDragLocation(int l)
Class is disabled.

Set the last drag location of the JSplitPane.


getDivider

public BasicSplitPaneDivider getDivider()
Class is disabled.

Returns the divider between the top Components.


createDefaultNonContinuousLayoutDivider

protected Component createDefaultNonContinuousLayoutDivider()
Class is disabled.

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


setNonContinuousLayoutDivider

protected void setNonContinuousLayoutDivider(Component newDivider)
Class is disabled.

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.


setNonContinuousLayoutDivider

protected void setNonContinuousLayoutDivider(Component newDivider,
                                             boolean rememberSizes)
Class is disabled.

Sets the divider to use.


getNonContinuousLayoutDivider

public Component getNonContinuousLayoutDivider()
Class is disabled.

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


getSplitPane

public JSplitPane getSplitPane()
Class is disabled.

Returns the splitpane this instance is currently contained in.


createDefaultDivider

public BasicSplitPaneDivider createDefaultDivider()
Class is disabled.

Creates the default divider.


resetToPreferredSizes

public void resetToPreferredSizes(JSplitPane jc)
Class is disabled.

Messaged to reset the preferred sizes.

Specified by:
resetToPreferredSizes in class SplitPaneUI

setDividerLocation

public void setDividerLocation(JSplitPane jc,
                               int location)
Class is disabled.

Sets the location of the divider to location.

Specified by:
setDividerLocation in class SplitPaneUI

getDividerLocation

public int getDividerLocation(JSplitPane jc)
Class is disabled.

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

Specified by:
getDividerLocation in class SplitPaneUI

getMinimumDividerLocation

public int getMinimumDividerLocation(JSplitPane jc)
Class is disabled.

Gets the minimum location of the divider.

Specified by:
getMinimumDividerLocation in class SplitPaneUI

getMaximumDividerLocation

public int getMaximumDividerLocation(JSplitPane jc)
Class is disabled.

Gets the maximum location of the divider.

Specified by:
getMaximumDividerLocation in class SplitPaneUI

finishedPaintingChildren

public void finishedPaintingChildren(JSplitPane sp,
                                     Graphics g)
Class is disabled.

Called when the specified split pane has finished painting its children.

Specified by:
finishedPaintingChildren in class SplitPaneUI

paint

public void paint(Graphics g,
                  JComponent jc)
Class is disabled.

Description copied from class: ComponentUI
Paints the specified component appropriately for the look and feel. This method is invoked from the ComponentUI.update method when the specified component is being painted. Subclasses should override this method and use the specified Graphics object to render the content of the component.

Overrides:
paint in class ComponentUI
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
See Also:
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)

getPreferredSize

public Dimension getPreferredSize(JComponent jc)
Class is disabled.

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

Overrides:
getPreferredSize in class ComponentUI
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
See Also:
JComponent.getPreferredSize(), LayoutManager.preferredLayoutSize(java.awt.Container)

getMinimumSize

public Dimension getMinimumSize(JComponent jc)
Class is disabled.

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

Overrides:
getMinimumSize in class ComponentUI
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
See Also:
JComponent.getMinimumSize(), LayoutManager.minimumLayoutSize(java.awt.Container), ComponentUI.getPreferredSize(javax.swing.JComponent)

getMaximumSize

public Dimension getMaximumSize(JComponent jc)
Class is disabled.

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

Overrides:
getMaximumSize in class ComponentUI
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
See Also:
JComponent.getMaximumSize(), LayoutManager2.maximumLayoutSize(java.awt.Container)

getInsets

public Insets getInsets(JComponent jc)
Class is disabled.

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


resetLayoutManager

protected void resetLayoutManager()
Class is disabled.

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


startDragging

protected void startDragging()
Class is disabled.

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


dragDividerTo

protected void dragDividerTo(int location)
Class is disabled.

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.


finishDraggingTo

protected void finishDraggingTo(int location)
Class is disabled.

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


getDividerBorderSize

@Deprecated
protected int getDividerBorderSize()
Deprecated. As of Java 2 platform v1.3, instead set the border on the divider.

Class is disabled.

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.