APIdia Launch Partner
Top Description Inners Fields Constructors Methods
javax.swing.plaf.basic

public Class BasicSplitPaneUI

extends SplitPaneUI
Class Inheritance
Known Direct Subclasses
javax.swing.plaf.metal.MetalSplitPaneUI, javax.swing.plaf.synth.SynthSplitPaneUI, com.sun.java.swing.plaf.motif.MotifSplitPaneUI
Imports
sun.awt.AWTAccessor, .AWTAccessor.ComponentAccessor, sun.swing.DefaultLookup, .UIAction, .SwingUtilities2, javax.swing.*, javax.swing.border.Border, java.awt.*, java.awt.event.*, java.awt.peer.ComponentPeer, .LightweightPeer, java.beans.*, java.util.*, javax.swing.plaf.SplitPaneUI, .ComponentUI, .UIResource

A Basic L&F implementation of the SplitPaneUI.
Authors
Scott Violet, Steve Wilson, Ralph Kar

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
public class
BasicSplitPaneUI.BasicHorizontalLayoutManager

LayoutManager for JSplitPanes that have an orientation of HORIZONTAL_SPLIT.

public class
BasicSplitPaneUI.BasicVerticalLayoutManager

LayoutManager used for JSplitPanes with an orientation of VERTICAL_SPLIT.

public class
BasicSplitPaneUI.FocusHandler

Implementation of the FocusListener that the JSplitPane UI uses.

private class
public class
BasicSplitPaneUI.KeyboardDownRightHandler

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

public class
BasicSplitPaneUI.KeyboardEndHandler

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

public class
BasicSplitPaneUI.KeyboardHomeHandler

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

public class
BasicSplitPaneUI.KeyboardResizeToggleHandler

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

public class
BasicSplitPaneUI.KeyboardUpLeftHandler

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

public class
BasicSplitPaneUI.PropertyHandler

Implementation of the PropertyChangeListener that the JSplitPane UI uses.

Field Summary

Modifier and TypeField and Description
protected int
beginDragDividerLocation

Location of the divider when the dragging session began.

private boolean
protected BasicSplitPaneDivider
divider

Instance of the divider for this JSplitPane.

private Color
private boolean
private boolean
protected KeyStroke
dividerResizeToggleKey

Deprecated As of Java 2 platform v1.3.
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

Deprecated As of Java 2 platform v1.3.
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

Deprecated As of Java 2 platform v1.3.
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.

private BasicSplitPaneUI.Handler
protected KeyStroke
homeKey

Deprecated As of Java 2 platform v1.3.
As of Java 2 platform v1.3 this previously undocumented field is no longer used.
pack-priv boolean
ignoreDividerLocationChange

If true, setDividerLocation does nothing.

private boolean
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.
As of Java 2 platform v1.3 this previously undocumented field is no longer used.
protected ActionListener
keyboardEndListener

Deprecated As of Java 2 platform v1.3.
As of Java 2 platform v1.3 this previously undocumented field is no longer used.
protected ActionListener
keyboardHomeListener

Deprecated As of Java 2 platform v1.3.
As of Java 2 platform v1.3 this previously undocumented field is no longer used.
protected ActionListener
keyboardResizeToggleListener

Deprecated As of Java 2 platform v1.3.
As of Java 2 platform v1.3 this previously undocumented field is no longer used.
protected ActionListener
keyboardUpLeftListener

Deprecated As of Java 2 platform v1.3.
As of Java 2 platform v1.3 this previously undocumented field is no longer used.
private int
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.
As of Java 2 platform v1.3 this previously undocumented field is no longer used.
private Set<KeyStroke>
managingFocusBackwardTraversalKeys

Keys to use for backward focus traversal when the JComponent is managing focus.

private Set<KeyStroke>
managingFocusForwardTraversalKeys

Keys to use for forward focus traversal when the JComponent is managing focus.

protected static final 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.

private int
pack-priv boolean
painted

Indicates that we have painted once.

protected PropertyChangeListener
propertyChangeListener

Instance of the PropertyChangeListener for this JSplitPane.

private boolean
protected KeyStroke
rightKey

Deprecated As of Java 2 platform v1.3.
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

Deprecated As of Java 2 platform v1.3.
As of Java 2 platform v1.3 this previously undocumented field is no longer used.

Constructor Summary

AccessConstructor and Description
public
BasicSplitPaneUI()

Constructs a BasicSplitPaneUI.

Method Summary

Modifier and TypeMethod and Description
private void
public BasicSplitPaneDivider

Returns:

the default divider
createDefaultDivider
()

Creates the default divider.

protected Component

Returns:

the default non continuous layout divider
createDefaultNonContinuousLayoutDivider
()

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

protected FocusListener

Returns:

an instance of FocusListener
createFocusListener
()

Creates a FocusListener for the JSplitPane UI.

protected ActionListener

Returns:

an instance of ActionListener
createKeyboardDownRightListener
()
Deprecated As of Java 2 platform v1.3.

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

protected ActionListener

Returns:

an instance of ActionListener
createKeyboardEndListener
()
Deprecated As of Java 2 platform v1.3.

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

protected ActionListener

Returns:

an instance of ActionListener
createKeyboardHomeListener
()
Deprecated As of Java 2 platform v1.3.

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

protected ActionListener

Returns:

an instance of ActionListener
createKeyboardResizeToggleListener
()
Deprecated As of Java 2 platform v1.3.

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

protected ActionListener

Returns:

an instance of ActionListener
createKeyboardUpLeftListener
()
Deprecated As of Java 2 platform v1.3.

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

protected PropertyChangeListener

Returns:

an instance of PropertyChangeListener
createPropertyChangeListener
()

Creates a PropertyChangeListener for the JSplitPane UI.

public static ComponentUI

Returns:

a new instance of BasicSplitPaneUI
createUI
(JComponent
a component
x
)

Hides javax.swing.plaf.ComponentUI.createUI.

Creates a new instance of BasicSplitPaneUI.

protected void
dragDividerTo(int
the location of divider
location
)

Messaged during a dragging session to move the divider to the passed in location.

protected void
finishDraggingTo(int
the location of divider
location
)

Messaged to finish the dragging session.

public void
finishedPaintingChildren(JSplitPane sp, Graphics g)

Implements abstract javax.swing.plaf.SplitPaneUI.finishedPaintingChildren.

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

public BasicSplitPaneDivider

Returns:

the divider between the top Components
getDivider
()

Returns the divider between the top Components.

protected int

Returns:

the width of one side of the divider border
getDividerBorderSize
()
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.

public int
getDividerLocation(JSplitPane jc)

Implements abstract javax.swing.plaf.SplitPaneUI.getDividerLocation.

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

private BasicSplitPaneUI.Handler
pack-priv InputMap
getInputMap(int condition)

public Insets

Returns:

the insets
getInsets
(JComponent
a component
jc
)

Returns the insets.

private boolean

Returns:

true if one of the splitpane sides is expanded, false otherwise.
getKeepHidden
()

The value returned indicates if one of the splitpane sides is expanded.

pack-priv int
getKeyboardMoveIncrement()

Returns: increment via keyboard methods.

public int

Returns:

the last drag location
getLastDragLocation
()

Returns the last drag location of the JSplitPane.

public int
getMaximumDividerLocation(JSplitPane jc)

Implements abstract javax.swing.plaf.SplitPaneUI.getMaximumDividerLocation.

Gets the maximum location of the divider.

public Dimension
getMaximumSize(JComponent jc)

Overrides javax.swing.plaf.ComponentUI.getMaximumSize.

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

public int
getMinimumDividerLocation(JSplitPane jc)

Implements abstract javax.swing.plaf.SplitPaneUI.getMinimumDividerLocation.

Gets the minimum location of the divider.

public Dimension
getMinimumSize(JComponent jc)

Overrides javax.swing.plaf.ComponentUI.getMinimumSize.

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

public Component

Returns:

the divider
getNonContinuousLayoutDivider
()

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

public int

Returns:

the orientation
getOrientation
()

Returns the orientation for the JSplitPane.

public Dimension
getPreferredSize(JComponent jc)

Overrides javax.swing.plaf.ComponentUI.getPreferredSize.

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

public JSplitPane

Returns:

the instance of JSplitPane
getSplitPane
()

Returns the JSplitPane 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.

public void
public boolean

Returns:

true if a continuous layout is set
isContinuousLayout
()

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

pack-priv static void
public void
paint(Graphics g, JComponent jc)

Overrides javax.swing.plaf.ComponentUI.paint.

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.

public void
resetToPreferredSizes(JSplitPane jc)

Implements abstract javax.swing.plaf.SplitPaneUI.resetToPreferredSizes.

Messaged to reset the preferred sizes.

public void
setContinuousLayout(boolean
if true the continuous layout turns on
b
)

Turn continuous layout on/off.

public void
setDividerLocation(JSplitPane jc, int location)

Implements abstract javax.swing.plaf.SplitPaneUI.setDividerLocation.

Sets the location of the divider to location.

pack-priv void
setKeepHidden(boolean keepHidden)

Set the value to indicate if one of the splitpane sides is expanded.

public void
setLastDragLocation(int
the drag location
l
)

Set the last drag location of the JSplitPane.

protected void
setNonContinuousLayoutDivider(Component
the new divider
newDivider
)

Sets the divider to use when the JSplitPane is configured to not continuously layout.

protected void
setNonContinuousLayoutDivider(Component
the new divider
newDivider
,
boolean
if true the pane size is remembered
rememberSizes
)

Sets the divider to use.

public void
setOrientation(int
the orientation
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.

public void