Package com.jidesoft.swing
Class JideSplitPaneDivider.DragController
- java.lang.Object
-
- com.jidesoft.swing.JideSplitPaneDivider.DragController
-
- Direct Known Subclasses:
JideSplitPaneDivider.VerticalDragController
- Enclosing class:
- JideSplitPaneDivider
protected class JideSplitPaneDivider.DragController extends java.lang.ObjectHandles the events during a dragging session for a HORIZONTAL_SPLIT oriented split pane. This continually messagesdragDividerToand then when done messagesfinishDraggingTo. When an instance is created it should be messaged withisValidto insure that dragging can happen (dragging won't be allowed if the two views can not be resized).
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDragController(java.awt.event.MouseEvent e)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcompleteDrag(int x, int y)protected voidcompleteDrag(java.awt.event.MouseEvent e)Messages finishDraggingTo with the new location for the mouse event.protected voidcontinueDrag(int newX, int newY)protected voidcontinueDrag(java.awt.event.MouseEvent e)Messages dragDividerTo with the new location for the mouse event.protected intgetNeededLocation(int x, int y)Returns the x argument, since this is used for horizontal splits.protected booleanisValid()Returns true if the dragging session is valid.protected intpositionForMouseEvent(java.awt.event.MouseEvent e)Returns the new position to put the divider at based on the passed in MouseEvent.
-
-
-
Method Detail
-
isValid
protected boolean isValid()
Returns true if the dragging session is valid.- Returns:
- true or false.
-
positionForMouseEvent
protected int positionForMouseEvent(java.awt.event.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 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
protected void continueDrag(java.awt.event.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(java.awt.event.MouseEvent e)
Messages finishDraggingTo with the new location for the mouse event.- Parameters:
e- the mouse event.
-
-