JIDE 3.5.15

com.jidesoft.swing
Class JideSplitPaneDivider.DragController

java.lang.Object
  extended by com.jidesoft.swing.JideSplitPaneDivider.DragController
Direct Known Subclasses:
JideSplitPaneDivider.VerticalDragController
Enclosing class:
JideSplitPaneDivider

protected class JideSplitPaneDivider.DragController
extends Object

Handles the events during a dragging session for a HORIZONTAL_SPLIT oriented split pane. This continually messages dragDividerTo and then when done messages finishDraggingTo. When an instance is created it should be messaged with isValid to insure that dragging can happen (dragging won't be allowed if the two views can not be resized).


Constructor Summary
protected JideSplitPaneDivider.DragController(MouseEvent e)
           
 
Method Summary
protected  void completeDrag(int x, int y)
           
protected  void completeDrag(MouseEvent e)
          Messages finishDraggingTo with the new location for the mouse event.
protected  void continueDrag(int newX, int newY)
           
protected  void continueDrag(MouseEvent e)
          Messages dragDividerTo with the new location for the mouse event.
protected  int getNeededLocation(int x, int y)
          Returns the x argument, since this is used for horizontal splits.
protected  boolean isValid()
          Returns true if the dragging session is valid.
protected  int positionForMouseEvent(MouseEvent e)
          Returns the new position to put the divider at based on the passed in MouseEvent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JideSplitPaneDivider.DragController

protected JideSplitPaneDivider.DragController(MouseEvent e)
Method Detail

isValid

protected boolean isValid()
Returns true if the dragging session is valid.

Returns:
true or false.

positionForMouseEvent

protected int positionForMouseEvent(MouseEvent e)
Returns the new position to put the divider at based on the passed in MouseEvent.

Parameters:
e - the mouse event.
Returns:
the position of the mouse event after considering the max and min size it is allowed.

getNeededLocation

protected int getNeededLocation(int x,
                                int y)
Returns the x argument, since this is used for horizontal splits.

Parameters:
x - x position
y - y position
Returns:
the actual position after considering the max and min size it is allowed.

continueDrag

protected void continueDrag(int newX,
                            int newY)

continueDrag

protected void continueDrag(MouseEvent e)
Messages dragDividerTo with the new location for the mouse event.

Parameters:
e - the mouse event.

completeDrag

protected void completeDrag(int x,
                            int y)

completeDrag

protected void completeDrag(MouseEvent e)
Messages finishDraggingTo with the new location for the mouse event.

Parameters:
e - the mouse event.

JIDE 3.5.15