javax.swing.plaf.basic

Class BasicSplitPaneDivider.DragController

protected class BasicSplitPaneDivider.DragController extends Object

Performs the tasks associated with an ongoing drag operation.
Constructor Summary
protected DragController(MouseEvent e)
Creates a new DragController object.
Method Summary
protected voidcompleteDrag(int x, int y)
This method is called to finish the drag session by calling finishDraggingTo.
protected voidcompleteDrag(MouseEvent e)
This method is called to finish the drag session by calling finishDraggingTo.
protected voidcontinueDrag(int newX, int newY)
This method is called to pass on the drag information to the UI through dragDividerTo.
protected voidcontinueDrag(MouseEvent e)
This method is called to pass on the drag information to the UI through dragDividerTo.
protected intgetNeededLocation(int x, int y)
This method returns one of the two paramters for the orientation.
protected booleanisValid()
This method returns true if the divider can move.
protected intpositionForMouseEvent(MouseEvent e)
Returns a position for the divider given the MouseEvent.

Constructor Detail

DragController

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

Parameters: e The MouseEvent to initialize with.

Method Detail

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.

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.

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.

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.