All Packages Class Hierarchy This Package Previous Next Index
Class java.awt.swing.basic.BasicSplitPaneDivider
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.swing.basic.BasicSplitPaneDivider
- public class BasicSplitPaneDivider
- extends Container
- implements PropertyChangeListener, Serializable
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.
BasicSplitPaneDivider.DividerLayout- Used to layout a BasicSplitPaneDivider.
BasicSplitPaneDivider.DragController- Handles the events during a dragging session for a
HORIZONTAL_SPLIT orientated split pane.
BasicSplitPaneDivider.MouseHandler- MouseHandler is responsible for converting mouse events
(released, dragged...) into the appropriate DragController
methods.
BasicSplitPaneDivider.VerticalDragController- Handles the events during a dragging session for a
VERTICAL_SPLIT orientated split pane.
DIVIDER_SIZE- Width or height of the divider based on orientation
BasicSplitPaneUI adds two to this.
dividerSize- Size of the divider.
dragger- Handles mouse dragging message to do the actual dragging.
hiddenDivider- Divider that is used for noncontinuous layout mode.
leftButton- Button for quickly toggling the left component.
mouseHandler- Handle of mouse events.
ONE_TOUCH_OFFSET-
ONE_TOUCH_SIZE-
orientation- Orientation of the JSplitPane.
rightButton- Button for quickly toggling the right component.
splitPane- JSplitPane the receiver is contained in.
splitPaneUI- UI this instance was created from.
BasicSplitPaneDivider(BasicSplitPaneUI)
- Creates an instance of BasicSplitPaneDivider.
createLeftOneTouchButton()
- Creates and return an instance of JButton that can be used to
collapse the left component in the split pane.
createRightOneTouchButton()
- Creates and return an instance of JButton that can be used to
collapse the right component in the split pane.
dragDividerTo(int)
- Messages the BasicSplitPaneUI with dragDividerTo that this instance
is contained in.
finishDraggingTo(int)
- Messages the BasicSplitPaneUI with finishDraggingTo that this instance
is contained in.
getBasicSplitPaneUI()
- Returns the
SplitPaneUI
the receiver is currently
in.
getDividerSize()
- Returns the size of the divider, that is the width if the splitpane
is HORIZONTAL_SPLIT, or the height of VERTICAL_SPLIT.
getPreferredSize()
- Returns dividerSize x dividerSize
oneTouchExpandableChanged()
- Messaged when the oneTouchExpandable value of the JSplitPane the
receiver is contained in changes.
paint(Graphics)
- Paints the divider.
prepareForDragging()
- Message to prepare for dragging.
propertyChange(PropertyChangeEvent)
- Property change event, presumably from the JSplitPane, will message
updateOrientation if necessary.
setBasicSplitPaneUI(BasicSplitPaneUI)
- Sets the SplitPaneUI that is using the receiver.
setDividerSize(int)
- Sets the size of the divider to
newSize
.
DIVIDER_SIZE
public static final int DIVIDER_SIZE
- Width or height of the divider based on orientation
BasicSplitPaneUI adds two to this.
ONE_TOUCH_SIZE
protected static final int ONE_TOUCH_SIZE
ONE_TOUCH_OFFSET
protected static final int ONE_TOUCH_OFFSET
dragger
protected BasicSplitPaneDivider.DragController dragger
- Handles mouse dragging message to do the actual dragging.
splitPaneUI
protected BasicSplitPaneUI splitPaneUI
- UI this instance was created from.
dividerSize
protected int dividerSize
- Size of the divider.
hiddenDivider
protected Component hiddenDivider
- Divider that is used for noncontinuous layout mode.
splitPane
protected JSplitPane splitPane
- JSplitPane the receiver is contained in.
mouseHandler
protected BasicSplitPaneDivider.MouseHandler mouseHandler
- Handle of mouse events.
orientation
protected int orientation
- Orientation of the JSplitPane.
leftButton
protected JButton leftButton
- Button for quickly toggling the left component.
rightButton
protected JButton rightButton
- Button for quickly toggling the right component.
BasicSplitPaneDivider
public BasicSplitPaneDivider(BasicSplitPaneUI ui)
- Creates an instance of BasicSplitPaneDivider. Registers this
instance for mouse events and mouse dragged events.
setBasicSplitPaneUI
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI)
- Sets the SplitPaneUI that is using the receiver.
getBasicSplitPaneUI
public BasicSplitPaneUI getBasicSplitPaneUI()
- Returns the
SplitPaneUI
the receiver is currently
in.
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
.
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.
getPreferredSize
public Dimension getPreferredSize()
- Returns dividerSize x dividerSize
- Overrides:
- getPreferredSize in class Container
propertyChange
public void propertyChange(PropertyChangeEvent e)
- Property change event, presumably from the JSplitPane, will message
updateOrientation if necessary.
paint
public void paint(Graphics g)
- Paints the divider.
- Overrides:
- paint in class Container
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.
createLeftOneTouchButton
protected JButton createLeftOneTouchButton()
- Creates and return an instance of JButton that can be used to
collapse the left component in the split pane.
createRightOneTouchButton
protected JButton createRightOneTouchButton()
- Creates and return an instance of JButton that can be used to
collapse the right component in the split pane.
prepareForDragging
protected void prepareForDragging()
- Message to prepare for dragging. This messages the BasicSplitPaneUI
with startDragging.
dragDividerTo
protected void dragDividerTo(int location)
- Messages the BasicSplitPaneUI with dragDividerTo that this instance
is contained in.
finishDraggingTo
protected void finishDraggingTo(int location)
- Messages the BasicSplitPaneUI with finishDraggingTo that this instance
is contained in.
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature