Class RadianceScrollBarUI.RadianceTrackListener

  • All Implemented Interfaces:
    java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener
    Enclosing class:
    RadianceScrollBarUI

    protected class RadianceScrollBarUI.RadianceTrackListener
    extends java.awt.event.MouseAdapter
    Track mouse drags. Had to take this one from BasicScrollBarUI since the setValueForm method is private.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int direction
      Current scroll direction.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void mouseDragged​(java.awt.event.MouseEvent e)  
      void mouseExited​(java.awt.event.MouseEvent e)  
      void mouseMoved​(java.awt.event.MouseEvent e)  
      void mousePressed​(java.awt.event.MouseEvent e)  
      void mouseReleased​(java.awt.event.MouseEvent e)  
      private void setValueFrom​(java.awt.event.MouseEvent e)
      Sets the scrollbar value based on the specified mouse event.
      private void startScrollTimerIfNecessary()
      If necessary, starts the scroll timer.
      • Methods inherited from class java.awt.event.MouseAdapter

        mouseClicked, mouseEntered, mouseWheelMoved
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • direction

        private transient int direction
        Current scroll direction.
    • Constructor Detail

      • RadianceTrackListener

        protected RadianceTrackListener()
    • Method Detail

      • mouseReleased

        public void mouseReleased​(java.awt.event.MouseEvent e)
        Specified by:
        mouseReleased in interface java.awt.event.MouseListener
      • mousePressed

        public void mousePressed​(java.awt.event.MouseEvent e)
        Specified by:
        mousePressed in interface java.awt.event.MouseListener
      • mouseDragged

        public void mouseDragged​(java.awt.event.MouseEvent e)
        Specified by:
        mouseDragged in interface java.awt.event.MouseMotionListener
      • setValueFrom

        private void setValueFrom​(java.awt.event.MouseEvent e)
        Sets the scrollbar value based on the specified mouse event.
        Parameters:
        e - Mouse event.
      • startScrollTimerIfNecessary

        private void startScrollTimerIfNecessary()
        If necessary, starts the scroll timer.
      • mouseMoved

        public void mouseMoved​(java.awt.event.MouseEvent e)
        Specified by:
        mouseMoved in interface java.awt.event.MouseMotionListener
      • mouseExited

        public void mouseExited​(java.awt.event.MouseEvent e)
        Specified by:
        mouseExited in interface java.awt.event.MouseListener