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.


Variable Index

 o DIVIDER_SIZE
Width or height of the divider based on orientation BasicSplitPaneUI adds two to this.
 o dividerSize
Size of the divider.
 o dragger
Handles mouse dragging message to do the actual dragging.
 o hiddenDivider
Divider that is used for noncontinuous layout mode.
 o splitPaneUI
UI this instance was created from.

Constructor Index

 o BasicSplitPaneDivider(BasicSplitPaneUI)
Creates an instance of BasicSplitPaneDivider.

Method Index

 o dragDividerTo(int)
Messages the BasicSplitPaneUI with dragDividerTo that this instance is contained in.
 o finishDraggingTo(int)
Messages the BasicSplitPaneUI with finishDraggingTo that this instance is contained in.
 o getDividerSize()
Returns the size of the divider, that is the width if the splitpane is HORIZONTAL_SPLIT, or the height of VERTICAL_SPLIT.
 o getPreferredSize()
Returns dividerSize x dividerSize
 o mouseClicked(MouseEvent)
Does nothing.
 o mouseDragged(MouseEvent)
If dragger is not null it is messaged with continueDrag.
 o mouseEntered(MouseEvent)
Does nothing.
 o mouseExited(MouseEvent)
Does nothing.
 o mouseMoved(MouseEvent)
Resets the cursor based on the orientation.
 o mousePressed(MouseEvent)
Starts the dragging session by creating the appropriate instance of DragController.
 o mouseReleased(MouseEvent)
If dragg is not null it is messaged with completeDrag.
 o paint(Graphics)
Paints the divider.
 o prepareForDragging()
Message to prepare for dragging.
 o setDividerSize(int)
Sets the size of the divider, that is the width if the splitpane is HORIZONTAL_SPLIT, or the height of VERTICAL_SPLIT.

Variables

 o DIVIDER_SIZE
 public static final int DIVIDER_SIZE
Width or height of the divider based on orientation BasicSplitPaneUI adds two to this.

 o dragger
 protected BasicSplitPaneDivider. DragController dragger
Handles mouse dragging message to do the actual dragging.

 o splitPaneUI
 protected BasicSplitPaneUI splitPaneUI
UI this instance was created from.

 o dividerSize
 protected int dividerSize
Size of the divider.

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

Constructors

 o BasicSplitPaneDivider
 public BasicSplitPaneDivider(BasicSplitPaneUI ui)
Creates an instance of BasicSplitPaneDivider. Registers this instance for mouse events and mouse dragged events.

Methods

 o 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.

 o 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.

 o getPreferredSize
 public Dimension getPreferredSize()
Returns dividerSize x dividerSize

Overrides:
getPreferredSize in class Container
 o paint
 public void paint(Graphics g)
Paints the divider.

Overrides:
paint in class Container
 o mouseClicked
 public void mouseClicked(MouseEvent e)
Does nothing.

 o mouseEntered
 public void mouseEntered(MouseEvent e)
Does nothing.

 o mouseExited
 public void mouseExited(MouseEvent e)
Does nothing.

 o mousePressed
 public void mousePressed(MouseEvent e)
Starts the dragging session by creating the appropriate instance of DragController.

 o mouseReleased
 public void mouseReleased(MouseEvent e)
If dragg is not null it is messaged with completeDrag.

 o mouseDragged
 public void mouseDragged(MouseEvent e)
If dragger is not null it is messaged with continueDrag.

 o mouseMoved
 public void mouseMoved(MouseEvent e)
Resets the cursor based on the orientation.

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

 o dragDividerTo
 protected void dragDividerTo(int location)
Messages the BasicSplitPaneUI with dragDividerTo that this instance is contained in.

 o 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