Class BasicSplitPaneDivider
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.plaf.basic.BasicSplitPaneDivider
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,PropertyChangeListener
,Serializable
,EventListener
Divider used by BasicSplitPaneUI. Subclassers may wish to override
paint to do something more interesting.
The border effect is drawn in BasicSplitPaneUI, so if you don't like
that border, reset it there.
To conditionally drag from certain areas subclass mousePressed and
call super when you wish the dragging to begin.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeans
has been added to the java.beans
package.
Please see XMLEncoder
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
Used to layout aBasicSplitPaneDivider
.protected class
Handles the events during a dragging session for a HORIZONTAL_SPLIT oriented split pane.protected class
MouseHandler is responsible for converting mouse events (released, dragged...) into the appropriate DragController methods.protected class
Handles the events during a dragging session for a VERTICAL_SPLIT oriented split pane.Nested classes/interfaces declared in class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces declared in class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
Size of the divider.protected BasicSplitPaneDivider.DragController
Handles mouse dragging message to do the actual dragging.protected Component
Divider that is used for noncontinuous layout mode.protected JButton
Button for quickly toggling the left component.protected BasicSplitPaneDivider.MouseHandler
Handles mouse events from both this class, and the split pane.protected static final int
The offset of the divider.protected static final int
Width or height of the divider based on orientationBasicSplitPaneUI
adds two to this.protected int
Orientation of the JSplitPane.protected JButton
Button for quickly toggling the right component.protected JSplitPane
JSplitPane the receiver is contained in.protected BasicSplitPaneUI
UI this instance was created from.Fields declared in class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields declared in interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance ofBasicSplitPaneDivider
. -
Method Summary
Modifier and TypeMethodDescriptionprotected JButton
Creates and return an instance ofJButton
that can be used to collapse the left component in the split pane.protected JButton
Creates and return an instance ofJButton
that can be used to collapse the right component in the split pane.protected void
dragDividerTo
(int location) Messages the BasicSplitPaneUI with dragDividerTo that this instance is contained in.protected void
finishDraggingTo
(int location) Messages the BasicSplitPaneUI with finishDraggingTo that this instance is contained in.Returns theSplitPaneUI
the receiver is currently in.Returns the border of this component or null if no border is currently set.int
Returns the size of the divider, that is the width if the splitpane is HORIZONTAL_SPLIT, or the height of VERTICAL_SPLIT.If a border has been set on this component, returns the border's insets, else calls super.getInsets.Returns the minimum size of the divider.Returns the preferred size of the divider.boolean
Returns whether or not the mouse is currently over the dividerprotected void
Messaged when the oneTouchExpandable value of the JSplitPane the divider is contained in changes.void
Paints the divider.protected void
Message to prepare for dragging.void
Property change event, presumably from the JSplitPane, will message updateOrientation if necessary.void
Sets theSplitPaneUI
that is using the receiver.void
Sets the border of this component.void
setDividerSize
(int newSize) Sets the size of the divider tonewSize
.protected void
setMouseOver
(boolean mouseOver) Sets whether or not the mouse is currently over the divider.Methods declared in class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getListeners, getMaximumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, isValidateRoot, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider,