javax.swing.plaf.basic
Class BasicSplitPaneDivider.DragController

java.lang.Object
  extended by javax.swing.plaf.basic.BasicSplitPaneDivider.DragController
Direct Known Subclasses:
BasicSplitPaneDivider.VerticalDragController
Enclosing class:
BasicSplitPaneDivider

protected class BasicSplitPaneDivider.DragController
extends Object

Performs the tasks associated with an ongoing drag operation.


Constructor Summary
protected BasicSplitPaneDivider.DragController(MouseEvent e)
          Creates a new DragController object.
 
Method Summary
protected  void completeDrag(int x, int y)
          This method is called to finish the drag session by calling finishDraggingTo.
protected  void completeDrag(MouseEvent e)
          This method is called to finish the drag session by calling finishDraggingTo.
protected  void continueDrag(int newX, int newY)
          This method is called to pass on the drag information to the UI through dragDividerTo.
protected  void continueDrag(MouseEvent e)
          This method is called to pass on the drag information to the UI through dragDividerTo.
protected  int getNeededLocation(int x, int y)
          This method returns one of the two paramters for the orientation.
protected  boolean isValid()
          This method returns true if the divider can move.
protected  int positionForMouseEvent(MouseEvent e)
          Returns a position for the divider given the MouseEvent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicSplitPaneDivider.DragController

protected BasicSplitPaneDivider.DragController(MouseEvent e)
Creates a new DragController object.

Parameters:
e - The MouseEvent to initialize with.
Method Detail

isValid

protected boolean isValid()
This method returns true if the divider can move.

Returns:
True if dragging is allowed.

positionForMouseEvent

protected int positionForMouseEvent(MouseEvent e)
Returns a position for the divider given the MouseEvent.

Parameters:
e - MouseEvent.
Returns:
The position for the divider to move to.

getNeededLocation

protected int getNeededLocation(int x,
                                int y)
This method returns one of the two paramters for the orientation. In this case, it returns x.

Parameters:
x - The x coordinate.
y - The y coordinate.
Returns:
The x coordinate.

continueDrag

protected void continueDrag(int newX,
                            int newY)
This method is called to pass on the drag information to the UI through dragDividerTo.

Parameters:
newX - The x coordinate of the MouseEvent.
newY - The y coordinate of the MouseEvent.

continueDrag

protected void continueDrag(MouseEvent e)
This method is called to pass on the drag information to the UI through dragDividerTo.

Parameters:
e - The MouseEvent.

completeDrag

protected void completeDrag(int x,
                            int y)
This method is called to finish the drag session by calling finishDraggingTo.

Parameters:
x - The x coordinate of the MouseEvent.
y - The y coordinate of the MouseEvent.

completeDrag

protected void completeDrag(MouseEvent e)
This method is called to finish the drag session by calling finishDraggingTo.

Parameters:
e - The MouseEvent.