Methods
public boolean
contains
(
JComponent c,
int x,
int y)
[Inherited From ComponentUI]
Returns
true
if the specified
x,y location is
contained within the look and feel's defined shape of the specified
component.
Returns
true
if the specified
x,y location is
contained within the look and feel's defined shape of the specified
component.
x
and
y
are defined to be relative
to the coordinate system of the specified component. Although
a component's
bounds
is constrained to a rectangle,
this method provides the means for defining a non-rectangular
shape within those bounds for the purpose of hit detection.
Parameters:
-
c - the component where the
x,y location is being queried;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple components
-
x - the
x coordinate of the point
-
y - the
y coordinate of the point
See Also:
JComponent.contains(int, int)
,
Component.contains(int, int)
,
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.
@Deprecated
protected ActionListener
createKeyboardDownRightListener
()
As of Java 2 platform v1.3 this method is no
longer used.
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.
@Deprecated
protected ActionListener
createKeyboardEndListener
()
As of Java 2 platform v1.3 this method is no
longer used.
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.
@Deprecated
protected ActionListener
createKeyboardHomeListener
()
As of Java 2 platform v1.3 this method is no
longer used.
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.
@Deprecated
protected ActionListener
createKeyboardResizeToggleListener
()
As of Java 2 platform v1.3 this method is no
longer used.
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.
@Deprecated
protected ActionListener
createKeyboardUpLeftListener
()
As of Java 2 platform v1.3 this method is no
longer used.
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.
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.
Messaged to finish the dragging session. If not continuous display
the dividers location will be reset.
public void
finishedPaintingChildren
(
JSplitPane jc,
Graphics g)
[Specified in SplitPaneUI]
Messaged after the JSplitPane the receiver is providing the look
and feel for paints its children.
public Accessible
getAccessibleChild
(
JComponent c,
int i)
[Inherited From ComponentUI]
Returns the
i
th
Accessible
child of the object.
Returns the
i
th
Accessible
child of the object.
UIs might need to override this if they present areas on the
screen that can be viewed as components, but actual components
are not used for presenting those areas.
Note: As of v1.3, it is recommended that developers call
Component.AccessibleAWTComponent.getAccessibleChild()
instead of
this method.
Returns:
the i
th Accessible
child of the object
Parameters:
- i - zero-based index of child
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
,
public int
getAccessibleChildrenCount
(
JComponent c)
[Inherited From ComponentUI]
Returns the number of accessible children in the object.
Returns the number of accessible children in the object. If all
of the children of this object implement
Accessible
,
this
method should return the number of children of this object.
UIs might wish to override this if they present areas on the
screen that can be viewed as components, but actual components
are not used for presenting those areas.
Note: As of v1.3, it is recommended that developers call
Component.AccessibleAWTComponent.getAccessibleChildrenCount()
instead
of this method.
Returns:
the number of accessible children in the object
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int)
,
public int
getBaseline
(
JComponent c,
int width,
int height)
[Inherited From ComponentUI]
Returns the baseline.
Returns the baseline. The baseline is measured from the top of
the component. This method is primarily meant for
LayoutManager
s to align components along their
baseline. A return value less than 0 indicates this component
does not have a reasonable baseline and that
LayoutManager
s should not align this component on
its baseline.
This method returns -1. Subclasses that have a meaningful baseline
should override appropriately.
Returns:
baseline or a value < 0 indicating there is no reasonable
baseline
Parameters:
- c - JComponent
baseline is being requested for
- width - the width to get the baseline for
- height - the height to get the baseline for
Throws:
- NullPointerException - if c
is null
- IllegalArgumentException - if width or height is < 0
Since:
1.6
See Also:
JComponent.getBaseline(int,int)
,
public BaselineResizeBehavior
getBaselineResizeBehavior
(
JComponent c)
[Inherited From ComponentUI]
Returns an enum indicating how the baseline of he component
changes as the size changes.
Returns an enum indicating how the baseline of he component
changes as the size changes. This method is primarily meant for
layout managers and GUI builders.
This method returns BaselineResizeBehavior.OTHER
.
Subclasses that support a baseline should override appropriately.
Returns:
an enum indicating how the baseline changes as the component
size changes
Parameters:
- c - JComponent
to return baseline resize behavior for
Throws:
- NullPointerException - if c
is null
Since:
1.6
See Also:
JComponent.getBaseline(int, int)
,
@Deprecated
protected int
getDividerBorderSize
()
As of Java 2 platform v1.3 this method is no longer used.
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.
public int
getDividerLocation
(
JSplitPane jc)
[Specified in SplitPaneUI]
Returns the location of the divider, which may differ from what
the splitpane thinks the location of the divider is.
pack-private InputMap
getInputMap
(
int condition)
public Insets
getInsets
(
JComponent jc)
Returns the insets.
Returns the insets. The insets are returned from the border insets
of the current border.
pack-private int
getKeyboardMoveIncrement
()
Returns:
increment via keyboard methods.
public int
getLastDragLocation
()
Returns the last drag location of the JSplitPane.
public int
getMaximumDividerLocation
(
JSplitPane jc)
[Specified in SplitPaneUI]
Gets the maximum location of the divider.
public Dimension
getMaximumSize
(
JComponent jc)
[Overrides ComponentUI]
Returns the maximum size for the passed in component,
This is passed off to the current layoutmanager.
public int
getMinimumDividerLocation
(
JSplitPane jc)
[Specified in SplitPaneUI]
Gets the minimum location of the divider.
public Dimension
getMinimumSize
(
JComponent jc)
[Overrides ComponentUI]
Returns the minimum size for the passed in component,
This is passed off to the current layoutmanager.
public Component
getNonContinuousLayoutDivider
()
Returns the divider to use when the splitPane is configured to
not continuously layout.
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)
[Overrides ComponentUI]
Returns the preferred size for the passed in component,
This is passed off to the current layoutmanager.
public 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.
public boolean
isContinuousLayout
()
Determines wether the JSplitPane is set to use a continuous layout.
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)
[Specified in SplitPaneUI]
Messaged to reset the preferred sizes.
public void
setContinuousLayout
(
boolean b)
Turn continuous layout on/off.
public void
setDividerLocation
(
JSplitPane jc,
int location)
[Specified in SplitPaneUI]
Sets the location of the divider to location.
pack-private void
setKeepHidden
(
boolean keepHidden)
Set the value to indicate if one of the splitpane sides is expanded.
public 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.
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.
public 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.
public void
update
(
Graphics g,
JComponent c)
[Inherited From ComponentUI]
Notifies this UI delegate that it's time to paint the specified
component.
Notifies this UI delegate that it's time to paint the specified
component. This method is invoked by
JComponent
when the specified component is being painted.
By default this method will fill the specified component with
its background color (if its
opaque
property is
true
) and then immediately call
paint
.
In general this method need not be overridden by subclasses;
all look-and-feel rendering code should reside in the
paint
method.
Parameters:
-
g - the
Graphics
context in which to paint
-
c - 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.paint(java.awt.Graphics, javax.swing.JComponent)
,
JComponent.paintComponent(java.awt.Graphics)
,
Fields
protected
int beginDragDividerLocation
Location of the divider when the dragging session began.
@Deprecated
protected
KeyStroke dividerResizeToggleKey
As of Java 2 platform v1.3 this previously undocumented field is no
longer used.
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.
@Deprecated
protected
KeyStroke downKey
As of Java 2 platform v1.3 this previously undocumented field is no
longer used.
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.
@Deprecated
protected
KeyStroke endKey
As of Java 2 platform v1.3 this previously undocumented field is no
longer used.
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.
@Deprecated
protected
KeyStroke homeKey
As of Java 2 platform v1.3 this previously undocumented field is no
longer used.
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.
pack-private
boolean ignoreDividerLocationChange
If true, setDividerLocation does nothing.
protectedstatic
int KEYBOARD_DIVIDER_MOVE_OFFSET
How far (relative) the divider does move when it is moved around by
the cursor keys on the keyboard.
@Deprecated
protected
ActionListener keyboardDownRightListener
As of Java 2 platform v1.3 this previously undocumented field is no
longer used.
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.
@Deprecated
protected
ActionListener keyboardEndListener
As of Java 2 platform v1.3 this previously undocumented field is no
longer used.
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.
@Deprecated
protected
ActionListener keyboardHomeListener
As of Java 2 platform v1.3 this previously undocumented field is no
longer used.
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.
@Deprecated
protected
ActionListener keyboardResizeToggleListener
As of Java 2 platform v1.3 this previously undocumented field is no
longer used.
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.
@Deprecated
protected
ActionListener keyboardUpLeftListener
As of Java 2 platform v1.3 this previously undocumented field is no
longer used.
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.
@Deprecated
protected
KeyStroke leftKey
As of Java 2 platform v1.3 this previously undocumented field is no
longer used.
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.
protectedfinalstatic
String NON_CONTINUOUS_DIVIDER
= "nonContinuousDivider"
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.
pack-private
boolean painted
Indicates that we have painted once.
protected
PropertyChangeListener propertyChangeListener
Instance of the PropertyChangeListener for this JSplitPane.
@Deprecated
protected
KeyStroke rightKey
As of Java 2 platform v1.3 this previously undocumented field is no
longer used.
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.
@Deprecated
protected
KeyStroke upKey
As of Java 2 platform v1.3 this previously undocumented field is no
longer used.
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.
Nested Classes