All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.java.swing.basic.BasicSplitPaneDivider
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----com.sun.java.swing.basic.BasicSplitPaneDivider
- public class BasicSplitPaneDivider
- extends Container
- implements MouseListener, MouseMotionListener
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.
-
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.
-
splitPaneUI
- UI this instance was created from.
-
BasicSplitPaneDivider(BasicSplitPaneUI)
- Creates an instance of BasicSplitPaneDivider.
-
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.
-
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
-
mouseClicked(MouseEvent)
- Does nothing.
-
mouseDragged(MouseEvent)
- If dragger is not null it is messaged with continueDrag.
-
mouseEntered(MouseEvent)
- Does nothing.
-
mouseExited(MouseEvent)
- Does nothing.
-
mouseMoved(MouseEvent)
- Resets the cursor based on the orientation.
-
mousePressed(MouseEvent)
- Starts the dragging session by creating the appropriate instance
of DragController.
-
mouseReleased(MouseEvent)
- If dragg is not null it is messaged with completeDrag.
-
paint(Graphics)
- Paints the divider.
-
prepareForDragging()
- Message to prepare for dragging.
-
setDividerSize(int)
- Sets the size of the divider, that is the width if the splitpane
is HORIZONTAL_SPLIT, or the height of VERTICAL_SPLIT.
DIVIDER_SIZE
public static final int DIVIDER_SIZE
- Width or height of the divider based on orientation
BasicSplitPaneUI adds two to this.
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.
BasicSplitPaneDivider
public BasicSplitPaneDivider(BasicSplitPaneUI ui)
- Creates an instance of BasicSplitPaneDivider. Registers this
instance for mouse events and mouse dragged events.
setDividerSize
public void setDividerSize(int newSize)
- Sets the size of the divider, 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
paint
public void paint(Graphics g)
- Paints the divider.
- Overrides:
- paint in class Container
mouseClicked
public void mouseClicked(MouseEvent e)
- Does nothing.
mouseEntered
public void mouseEntered(MouseEvent e)
- Does nothing.
mouseExited
public void mouseExited(MouseEvent e)
- Does nothing.
mousePressed
public void mousePressed(MouseEvent e)
- Starts the dragging session by creating the appropriate instance
of DragController.
mouseReleased
public void mouseReleased(MouseEvent e)
- If dragg is not null it is messaged with completeDrag.
mouseDragged
public void mouseDragged(MouseEvent e)
- If dragger is not null it is messaged with continueDrag.
mouseMoved
public void mouseMoved(MouseEvent e)
- Resets the cursor based on the orientation.
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