Package Summary  Overview Summary

class:BasicSplitPaneDivider [CHANGED]

All Implemented Interfaces:
ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener

public class BasicSplitPaneDivider
extends Container
implements PropertyChangeListener
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™JavaBeans has been added to the java.beans package. Please see XMLEncoder.

All Implemented Interfaces:
ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener

public class BasicSplitPaneDivider
extends Container
implements PropertyChangeListener
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.

All Implemented Interfaces:
ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener

public class BasicSplitPaneDivider
extends Container
implements PropertyChangeListener
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.

field:ONE_TOUCH_SIZE [NONE]

  • ONE_TOUCH_SIZE

    protected static final  int ONE_TOUCH_SIZE
    Width or height of the divider based on orientation BasicSplitPaneUI adds two to this.
    See Also:
    Constant Field Values
  • field:ONE_TOUCH_OFFSET [NONE]

    ONE_TOUCH_OFFSET

    protected static final  int ONE_TOUCH_OFFSET
    The offset of the divider.
    See Also:
    Constant Field Values

    field:dragger [NONE]

    dragger

    Handles mouse dragging message to do the actual dragging.

    field:splitPaneUI [NONE]

    splitPaneUI

    protected BasicSplitPaneUI splitPaneUI
    UI this instance was created from.

    field:dividerSize [NONE]

    dividerSize

    protected int dividerSize
    Size of the divider.

    field:hiddenDivider [NONE]

    hiddenDivider

    protected Component hiddenDivider
    Divider that is used for noncontinuous layout mode.

    field:splitPane [NONE]

    splitPane

    protected JSplitPane splitPane
    JSplitPane the receiver is contained in.

    field:mouseHandler [NONE]

    mouseHandler

    protected BasicSplitPaneDivider.MouseHandler mouseHandler
    Handles mouse events from both this class, and the split pane. Mouse events are handled for the splitpane since you want to be able to drag when clicking on the border of the divider, which is not drawn by the divider.

    field:orientation [NONE]

    orientation

    protected int orientation
    Orientation of the JSplitPane.

    field:leftButton [NONE]

    leftButton

    protected JButton leftButton
    Button for quickly toggling the left component.

    field:rightButton [NONE]

    rightButton

    protected JButton rightButton
    Button for quickly toggling the right component.

    constructor:BasicSplitPaneDivider(javax.swing.plaf.basic.BasicSplitPaneUI) [NONE]

    • BasicSplitPaneDivider

      public BasicSplitPaneDivider?(BasicSplitPaneUI ui)
      Creates an instance of BasicSplitPaneDivider. Registers this instance for mouse events and mouse dragged events.
      Parameters:
      ui - an instance of BasicSplitPaneUI

    method:setBasicSplitPaneUI(javax.swing.plaf.basic.BasicSplitPaneUI) [NONE]

  • setBasicSplitPaneUI

    public void setBasicSplitPaneUI?(BasicSplitPaneUI newUI)
    Sets the SplitPaneUI that is using the receiver.
    Parameters:
    newUI - the new SplitPaneUI
  • method:getBasicSplitPaneUI() [NONE]

    getBasicSplitPaneUI

    public BasicSplitPaneUI getBasicSplitPaneUI()
    Returns the SplitPaneUI the receiver is currently in.
    Returns:
    the SplitPaneUI the receiver is currently in

    method:setDividerSize(int) [NONE]

    setDividerSize

    public void setDividerSize?(int newSize)
    Sets the size of the divider to newSize. That is the width if the splitpane is HORIZONTAL_SPLIT, or the height of VERTICAL_SPLIT.
    Parameters:
    newSize - a new size

    method:getDividerSize() [NONE]

    getDividerSize

    public int getDividerSize()
    Returns the size of the divider, that is the width if the splitpane is HORIZONTAL_SPLIT, or the height of VERTICAL_SPLIT.
    Returns:
    the size of the divider

    method:setBorder(javax.swing.border.Border) [NONE]

    setBorder

    public void setBorder?(Border border)
    Sets the border of this component.
    Parameters:
    border - a new border
    Since:
    1.3

    method:getBorder() [NONE]

    getBorder

    public Border getBorder()
    Returns the border of this component or null if no border is currently set.
    Returns:
    the border object for this component
    Since:
    1.3
    See Also:
    setBorder(javax.swing.border.Border)

    method:getInsets() [NONE]

    getInsets

    public Insets getInsets()
    If a border has been set on this component, returns the border's insets, else calls super.getInsets.
    Overrides:
    getInsets in class Container
    Returns:
    the value of the insets property.
    See Also:
    setBorder(javax.swing.border.Border)

    method:setMouseOver(boolean) [NONE]

    setMouseOver

    protected void setMouseOver?(boolean mouseOver)
    Sets whether or not the mouse is currently over the divider.
    Parameters:
    mouseOver - whether or not the mouse is currently over the divider
    Since:
    1.5

    method:isMouseOver() [NONE]

    isMouseOver

    public boolean isMouseOver()
    Returns whether or not the mouse is currently over the divider
    Returns:
    whether or not the mouse is currently over the divider
    Since:
    1.5

    method:getPreferredSize() [NONE]

    getPreferredSize

    public Dimension getPreferredSize()
    Returns dividerSize x dividerSize
    Overrides:
    getPreferredSize in class Container
    Returns:
    an instance of Dimension that represents the preferred size of this container.
    See Also:
    Container.getMinimumSize(), Container.getMaximumSize(), Container.getLayout(), LayoutManager.preferredLayoutSize(Container), Component.getPreferredSize()

    method:getMinimumSize() [NONE]

    getMinimumSize

    public Dimension getMinimumSize()
    Returns dividerSize x dividerSize
    Overrides:
    getMinimumSize in class Container
    Returns:
    an instance of Dimension that represents the minimum size of this container.
    See Also:
    Container.getPreferredSize(), Container.getMaximumSize(), Container.getLayout(), LayoutManager.minimumLayoutSize(Container), Component.getMinimumSize()

    method:propertyChange(java.beans.PropertyChangeEvent) [NONE]

    propertyChange

    public void propertyChange?(PropertyChangeEvent e)
    Property change event, presumably from the JSplitPane, will message updateOrientation if necessary.
    Specified by:
    propertyChange in interface PropertyChangeListener
    Parameters:
    e - A PropertyChangeEvent object describing the event source and the property that has changed.

    method:paint(java.awt.Graphics) [NONE]

    paint

    public void paint?(Graphics g)
    Paints the divider.
    Overrides:
    paint in class Container
    Parameters:
    g - the specified Graphics window
    See Also:
    Component.update(Graphics)

    method:oneTouchExpandableChanged() [NONE]

    oneTouchExpandableChanged

    protected void oneTouchExpandableChanged()
    Messaged when the oneTouchExpandable value of the JSplitPane the receiver is contained in changes. Will create the leftButton and rightButton if they are null. invalidates the receiver as well.

    method:createLeftOneTouchButton() [NONE]

    createLeftOneTouchButton

    protected JButton createLeftOneTouchButton()
    Creates and return an instance of JButton that can be used to collapse the left component in the split pane.
    Returns:
    an instance of JButton

    method:createRightOneTouchButton() [NONE]

    createRightOneTouchButton

    protected JButton createRightOneTouchButton()
    Creates and return an instance of JButton that can be used to collapse the right component in the split pane.
    Returns:
    an instance of JButton

    method:prepareForDragging() [NONE]

    prepareForDragging

    protected void prepareForDragging()
    Message to prepare for dragging. This messages the BasicSplitPaneUI with startDragging.

    method:dragDividerTo(int) [NONE]

    dragDividerTo

    protected void dragDividerTo?(int location)
    Messages the BasicSplitPaneUI with dragDividerTo that this instance is contained in.
    Parameters:
    location - a location

    method:finishDraggingTo(int) [NONE]

    finishDraggingTo

    protected void finishDraggingTo?(int location)
    Messages the BasicSplitPaneUI with finishDraggingTo that this instance is contained in.
    Parameters:
    location - a location

    © 2020 Oracle Corporation and/or its affiliates