ImageObserver
, MenuContainer
, PropertyChangeListener
, Serializable
, EventListener
public class BasicSplitPaneDivider extends Container implements PropertyChangeListener
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
.
Modifier and Type | Class | Description |
---|---|---|
protected class |
BasicSplitPaneDivider.DividerLayout |
Used to layout a BasicSplitPaneDivider . |
protected class |
BasicSplitPaneDivider.DragController |
Handles the events during a dragging session for a HORIZONTAL_SPLIT oriented split pane. |
protected class |
BasicSplitPaneDivider.MouseHandler |
MouseHandler is responsible for converting mouse events (released, dragged...) into the appropriate DragController methods. |
protected class |
BasicSplitPaneDivider.VerticalDragController |
Handles the events during a dragging session for a VERTICAL_SPLIT oriented split pane. |
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field | Description |
---|---|---|
protected int |
dividerSize |
Size of the divider. |
protected BasicSplitPaneDivider.DragController |
dragger |
Handles mouse dragging message to do the actual dragging. |
protected Component |
hiddenDivider |
Divider that is used for noncontinuous layout mode. |
protected JButton |
leftButton |
Button for quickly toggling the left component. |
protected BasicSplitPaneDivider.MouseHandler |
mouseHandler |
Handles mouse events from both this class, and the split pane. |
protected static final int |
ONE_TOUCH_OFFSET |
The offset of the divider. |
protected static final int |
ONE_TOUCH_SIZE |
Width or height of the divider based on orientation BasicSplitPaneUI adds two to this. |
protected int |
orientation |
Orientation of the JSplitPane. |
protected JButton |
rightButton |
Button for quickly toggling the right component. |
protected JSplitPane |
splitPane |
JSplitPane the receiver is contained in. |
protected BasicSplitPaneUI |
splitPaneUI |
UI this instance was created from. |
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor | Description |
---|---|
BasicSplitPaneDivider |
Creates an instance of BasicSplitPaneDivider . |
Modifier and Type | Method | Description |
---|---|---|
protected JButton |
createLeftOneTouchButton() |
Creates and return an instance of JButton that can be used to collapse the left component in the split pane. |
protected JButton |
createRightOneTouchButton() |
Creates and return an instance of JButton that can be used to collapse the right component in the split pane. |
protected void |
dragDividerTo |
Messages the BasicSplitPaneUI with dragDividerTo that this instance is contained in. |
protected void |
finishDraggingTo |
Messages the BasicSplitPaneUI with finishDraggingTo that this instance is contained in. |
BasicSplitPaneUI |
getBasicSplitPaneUI() |
Returns the SplitPaneUI the receiver is currently in. |
Border |
getBorder() |
Returns the border of this component or null if no border is currently set. |
int |
getDividerSize() |
Returns the size of the divider, that is the width if the splitpane is HORIZONTAL_SPLIT, or the height of VERTICAL_SPLIT. |
Insets |
getInsets() |
If a border has been set on this component, returns the border's insets, else calls super.getInsets. |
Dimension |
getMinimumSize() |
Returns the minimum size of the divider. |
Dimension |
getPreferredSize() |
Returns the preferred size of the divider. |
boolean |
isMouseOver() |
Returns whether or not the mouse is currently over the divider |
protected void |
oneTouchExpandableChanged() |
Messaged when the oneTouchExpandable value of the JSplitPane the divider is contained in changes. |
void |
paint |
Paints the divider. |
protected void |
prepareForDragging() |
Message to prepare for dragging. |
void |
propertyChange |
Property change event, presumably from the JSplitPane, will message updateOrientation if necessary. |
void |
setBasicSplitPaneUI |
Sets the SplitPaneUI that is using the receiver. |
void |
setBorder |
Sets the border of this component. |
void |
setDividerSize |
Sets the size of the divider to newSize . |
protected void |
setMouseOver |
Sets whether or not the mouse is currently over the divider. |
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, setFont, setLayout, transferFocusDownCycle, update, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected static final int ONE_TOUCH_SIZE
BasicSplitPaneUI
adds two to this.protected static final int ONE_TOUCH_OFFSET
protected BasicSplitPaneDivider.DragController dragger
protected BasicSplitPaneUI splitPaneUI
protected int dividerSize
protected JSplitPane splitPane
protected BasicSplitPaneDivider.MouseHandler mouseHandler
protected int orientation
protected JButton leftButton
protected JButton rightButton
public BasicSplitPaneDivider(BasicSplitPaneUI ui)
BasicSplitPaneDivider
. Registers this instance for mouse events and mouse dragged events.ui
- an instance of BasicSplitPaneUI
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI)
SplitPaneUI
that is using the receiver.newUI
- the new SplitPaneUI
public BasicSplitPaneUI getBasicSplitPaneUI()
SplitPaneUI
the receiver is currently in.SplitPaneUI
the receiver is currently inpublic void setDividerSize(int newSize)
newSize
. That is the width if the splitpane is HORIZONTAL_SPLIT
, or the height of VERTICAL_SPLIT
. Divider sizes newSize < 0
are ignored.newSize
- a new sizepublic int getDividerSize()
public void setBorder(Border border)
border
- a new borderpublic Border getBorder()
public Insets getInsets()
protected void setMouseOver(boolean mouseOver)
mouseOver
- whether or not the mouse is currently over the dividerpublic boolean isMouseOver()
public Dimension getPreferredSize()
getPreferredSize
in class Container
getDividerSize
pixels and height of 1 pixel If the splitpane is VERTICAL_SPLIT, the preferred size is obtained from height of getDividerSize
pixels and width of 1 pixelDimension
object containing the preferred size of BasicSplitPaneDivider
public Dimension getMinimumSize()
getMinimumSize
in class Container
getDividerSize
pixels and height of 1 pixel If the splitpane is VERTICAL_SPLIT, the minimum size is obtained from height of getDividerSize
pixels and width of 1 pixelDimension
object containing the minimum size of BasicSplitPaneDivider
public void propertyChange(PropertyChangeEvent e)
propertyChange
in interface PropertyChangeListener
e
- A PropertyChangeEvent object describing the event source and the property that has changed.public void paint(Graphics g)
protected void oneTouchExpandableChanged()
leftButton
and rightButton
if they are null and corresponding JSplitPane supports oneTouchExpandable property. Invalidates the corresponding JSplitPane as well.protected JButton createLeftOneTouchButton()
JButton
that can be used to collapse the left component in the split pane.JButton
protected JButton createRightOneTouchButton()
JButton
that can be used to collapse the right component in the split pane.JButton
protected void prepareForDragging()
protected void dragDividerTo(int location)
location
- a locationprotected void finishDraggingTo(int location)
location
- a location
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/plaf/basic/BasicSplitPaneDivider.html