Package com.jidesoft.swing
Class JideSplitPaneDivider.DragController
java.lang.Object
com.jidesoft.swing.JideSplitPaneDivider.DragController
- Direct Known Subclasses:
JideSplitPaneDivider.VerticalDragController
- Enclosing class:
- JideSplitPaneDivider
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
completeDrag
(int x, int y) protected void
Messages finishDraggingTo with the new location for the mouse event.protected void
continueDrag
(int newX, int newY) protected void
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
Returns the new position to put the divider at based on the passed in MouseEvent.
-
Constructor Details
-
DragController
-
-
Method Details
-
isValid
protected boolean isValid()Returns true if the dragging session is valid.- Returns:
- true or false.
-
positionForMouseEvent
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 positiony
- 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
Messages dragDividerTo with the new location for the mouse event.- Parameters:
e
- the mouse event.
-
completeDrag
protected void completeDrag(int x, int y) -
completeDrag
Messages finishDraggingTo with the new location for the mouse event.- Parameters:
e
- the mouse event.
-