Class JideSplitPaneDivider.DragController

java.lang.Object
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 Details

    • DragController

      protected DragController(MouseEvent e)
  • Method Details

    • 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.