Class JideSplitPaneDivider.DragController

  • Direct Known Subclasses:
    JideSplitPaneDivider.VerticalDragController
    Enclosing class:
    JideSplitPaneDivider

    protected class JideSplitPaneDivider.DragController
    extends java.lang.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

      Constructors 
      Modifier Constructor Description
      protected DragController​(java.awt.event.MouseEvent e)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void completeDrag​(int x, int y)  
      protected void completeDrag​(java.awt.event.MouseEvent e)
      Messages finishDraggingTo with the new location for the mouse event.
      protected void continueDrag​(int newX, int newY)  
      protected void continueDrag​(java.awt.event.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​(java.awt.event.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

      • DragController

        protected DragController​(java.awt.event.MouseEvent e)
    • 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 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​(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.