Class JSVGScrollPane.SBListener

  • All Implemented Interfaces:
    java.util.EventListener, javax.swing.event.ChangeListener
    Enclosing class:
    JSVGScrollPane

    protected class JSVGScrollPane.SBListener
    extends java.lang.Object
    implements javax.swing.event.ChangeListener
    Advanced JScrollBar listener.

    A separate listener must be attached to each scrollbar, since we keep track of mouse state for each scrollbar separately!

    This coalesces drag events so we don't track them, and 'passes through' click events. It doesn't coalesce as many events as it should, but it helps considerably.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean inDrag  
      protected boolean isVertical  
      protected int startValue  
    • Constructor Summary

      Constructors 
      Constructor Description
      SBListener​(boolean vertical)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void stateChanged​(javax.swing.event.ChangeEvent e)  
      • Methods inherited from class java.lang.Object

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

      • inDrag

        protected boolean inDrag
      • startValue

        protected int startValue
      • isVertical

        protected boolean isVertical
    • Constructor Detail

      • SBListener

        public SBListener​(boolean vertical)
    • Method Detail

      • stateChanged

        public void stateChanged​(javax.swing.event.ChangeEvent e)
        Specified by:
        stateChanged in interface javax.swing.event.ChangeListener