Class DragScrollListener

    • Field Detail

      • DRAGABLE_HORIZONTAL_SCROLL_BAR

        public static final int DRAGABLE_HORIZONTAL_SCROLL_BAR
        See Also:
        Constant Field Values
      • DRAGABLE_VERTICAL_SCROLL_BAR

        public static final int DRAGABLE_VERTICAL_SCROLL_BAR
        See Also:
        Constant Field Values
    • Constructor Detail

      • DragScrollListener

        public DragScrollListener​(Component c)
    • Method Detail

      • setDraggableElements

        public void setDraggableElements​(int mask)
        Sets the Draggable elements - the Horizontal or Vertical Direction. One

        can use a bitmasked 'or' (HORIZONTAL_SCROLL_BAR | VERTICAL_SCROLL_BAR ).

        Parameters:
        mask - One of HORIZONTAL_SCROLL_BAR, VERTICAL_SCROLL_BAR, or HORIZONTAL_SCROLL_BAR | VERTICAL_SCROLL_BAR
      • setScrollingIntensity

        public void setScrollingIntensity​(int intensity)
        Sets the scrolling intensity - the default value being 5. Note, that this has an

        inverse relationship to intensity (1 has the biggest difference, higher numbers having

        less impact).

        Parameters:
        intensity - The new intensity value (Note the inverse relationship).
      • setAnimationTiming

        public void setAnimationTiming​(int timing)
        Sets how frequently the animation will occur in milliseconds. Default

        value is 30 milliseconds. 60+ will get a bit flickery.

        Parameters:
        timing - The timing, in milliseconds.
      • setDamping

        public void setDamping​(double damping)
        Sets the animation damping.
        Parameters:
        damping - The new value
      • mouseReleased

        public void mouseReleased​(MouseEvent e)
        Mouse released implementation. This determines if further animation

        is necessary and launches the appropriate times.

        Specified by:
        mouseReleased in interface MouseListener