Class RadianceScrollBarUI

  • All Implemented Interfaces:
    java.awt.LayoutManager, javax.swing.SwingConstants, TransitionAwareUI

    public class RadianceScrollBarUI
    extends javax.swing.plaf.basic.BasicScrollBarUI
    implements TransitionAwareUI
    UI for scroll bars in Radiance look and feel.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected class  RadianceScrollBarUI.RadianceTrackListener
      Track mouse drags.
      • Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicScrollBarUI

        javax.swing.plaf.basic.BasicScrollBarUI.ArrowButtonListener, javax.swing.plaf.basic.BasicScrollBarUI.ModelListener, javax.swing.plaf.basic.BasicScrollBarUI.PropertyChangeHandler, javax.swing.plaf.basic.BasicScrollBarUI.ScrollListener, javax.swing.plaf.basic.BasicScrollBarUI.TrackListener
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected RadianceScrollBarUI​(javax.swing.JComponent b)
      Simple constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected javax.swing.plaf.basic.BasicScrollBarUI.ArrowButtonListener createArrowButtonListener()  
      protected javax.swing.JButton createDecreaseButton​(int orientation)  
      protected javax.swing.JButton createIncreaseButton​(int orientation)  
      protected javax.swing.plaf.basic.BasicScrollBarUI.TrackListener createTrackListener()  
      static javax.swing.plaf.ComponentUI createUI​(javax.swing.JComponent comp)  
      private void drawThumbHorizontal​(java.awt.Graphics2D g, java.awt.Rectangle thumbBounds)  
      private void drawThumbVertical​(java.awt.Graphics2D g, java.awt.Rectangle thumbBounds)  
      java.awt.Dimension getPreferredSize​(javax.swing.JComponent c)  
      StateTransitionTracker getTransitionTracker()
      Returns the model for tracking the transitions.
      protected void installComponents()  
      protected void installDefaults()  
      protected void installListeners()  
      void installUI​(javax.swing.JComponent c)  
      boolean isInside​(java.awt.event.MouseEvent me)
      Checks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.
      protected void layoutHScrollbar​(javax.swing.JScrollBar sb)  
      protected void layoutHScrollbarNone​(javax.swing.JScrollBar sb)  
      protected void layoutVScrollbar​(javax.swing.JScrollBar sb)  
      protected void layoutVScrollbarNone​(javax.swing.JScrollBar sb)  
      void paint​(java.awt.Graphics g, javax.swing.JComponent c)  
      protected void paintThumb​(java.awt.Graphics g, javax.swing.JComponent c, java.awt.Rectangle thumbBounds)  
      protected void paintTrack​(java.awt.Graphics g, javax.swing.JComponent c, java.awt.Rectangle trackBounds)  
      void scrollByBlock​(int direction)  
      protected void uninstallComponents()  
      protected void uninstallDefaults()  
      protected void uninstallListeners()  
      void uninstallUI​(javax.swing.JComponent c)  
      void update​(java.awt.Graphics g, javax.swing.JComponent c)  
      private void updateThumbState​(int x, int y)
      Updates the thumb state based on the coordinates.
      • Methods inherited from class javax.swing.plaf.basic.BasicScrollBarUI

        addLayoutComponent, configureScrollBarColors, createModelListener, createPropertyChangeListener, createScrollListener, getMaximumSize, getMaximumThumbSize, getMinimumThumbSize, getSupportsAbsolutePositioning, getThumbBounds, getTrackBounds, installKeyboardActions, isThumbRollover, layoutContainer, minimumLayoutSize, paintDecreaseHighlight, paintIncreaseHighlight, preferredLayoutSize, removeLayoutComponent, scrollByUnit, setThumbBounds, setThumbRollover, uninstallKeyboardActions
      • Methods inherited from class javax.swing.plaf.ComponentUI

        contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMinimumSize
      • Methods inherited from class java.lang.Object

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

      • thumbModel

        private javax.swing.ButtonModel thumbModel
        Surrogate button model for tracking the thumb transitions.
      • radianceThumbRolloverListener

        private RolloverControlListener radianceThumbRolloverListener
        Listener for thumb transition animations.
      • radiancePropertyListener

        private java.beans.PropertyChangeListener radiancePropertyListener
        Property change listener.
      • scrollBarWidth

        private int scrollBarWidth
        Scroll bar width.
      • radianceAdjustmentListener

        private java.awt.event.AdjustmentListener radianceAdjustmentListener
        Listener on adjustments made to the scrollbar model.
      • THUMB_DELTA

        private static int THUMB_DELTA
    • Constructor Detail

      • RadianceScrollBarUI

        protected RadianceScrollBarUI​(javax.swing.JComponent b)
        Simple constructor.
        Parameters:
        b - Associated component.
    • Method Detail

      • createUI

        public static javax.swing.plaf.ComponentUI createUI​(javax.swing.JComponent comp)
      • installUI

        public void installUI​(javax.swing.JComponent c)
        Overrides:
        installUI in class javax.swing.plaf.basic.BasicScrollBarUI
      • uninstallUI

        public void uninstallUI​(javax.swing.JComponent c)
        Overrides:
        uninstallUI in class javax.swing.plaf.basic.BasicScrollBarUI
      • createDecreaseButton

        protected javax.swing.JButton createDecreaseButton​(int orientation)
        Overrides:
        createDecreaseButton in class javax.swing.plaf.basic.BasicScrollBarUI
      • createIncreaseButton

        protected javax.swing.JButton createIncreaseButton​(int orientation)
        Overrides:
        createIncreaseButton in class javax.swing.plaf.basic.BasicScrollBarUI
      • drawThumbVertical

        private void drawThumbVertical​(java.awt.Graphics2D g,
                                       java.awt.Rectangle thumbBounds)
      • drawThumbHorizontal

        private void drawThumbHorizontal​(java.awt.Graphics2D g,
                                         java.awt.Rectangle thumbBounds)
      • paintTrack

        protected void paintTrack​(java.awt.Graphics g,
                                  javax.swing.JComponent c,
                                  java.awt.Rectangle trackBounds)
        Overrides:
        paintTrack in class javax.swing.plaf.basic.BasicScrollBarUI
      • paintThumb

        protected void paintThumb​(java.awt.Graphics g,
                                  javax.swing.JComponent c,
                                  java.awt.Rectangle thumbBounds)
        Overrides:
        paintThumb in class javax.swing.plaf.basic.BasicScrollBarUI
      • paint

        public void paint​(java.awt.Graphics g,
                          javax.swing.JComponent c)
        Overrides:
        paint in class javax.swing.plaf.basic.BasicScrollBarUI
      • installDefaults

        protected void installDefaults()
        Overrides:
        installDefaults in class javax.swing.plaf.basic.BasicScrollBarUI
      • uninstallDefaults

        protected void uninstallDefaults()
        Overrides:
        uninstallDefaults in class javax.swing.plaf.basic.BasicScrollBarUI
      • installComponents

        protected void installComponents()
        Overrides:
        installComponents in class javax.swing.plaf.basic.BasicScrollBarUI
      • uninstallComponents

        protected void uninstallComponents()
        Overrides:
        uninstallComponents in class javax.swing.plaf.basic.BasicScrollBarUI
      • installListeners

        protected void installListeners()
        Overrides:
        installListeners in class javax.swing.plaf.basic.BasicScrollBarUI
      • uninstallListeners

        protected void uninstallListeners()
        Overrides:
        uninstallListeners in class javax.swing.plaf.basic.BasicScrollBarUI
      • isInside

        public boolean isInside​(java.awt.event.MouseEvent me)
        Description copied from interface: TransitionAwareUI
        Checks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.
        Specified by:
        isInside in interface TransitionAwareUI
        Parameters:
        me - Mouse event.
        Returns:
        true if the mouse position of the specified event lies inside the area of the component designated for transition effects, false otherwise.
      • scrollByBlock

        public void scrollByBlock​(int direction)
        Overrides:
        scrollByBlock in class javax.swing.plaf.basic.BasicScrollBarUI
      • layoutVScrollbar

        protected void layoutVScrollbar​(javax.swing.JScrollBar sb)
        Overrides:
        layoutVScrollbar in class javax.swing.plaf.basic.BasicScrollBarUI
      • layoutHScrollbar

        protected void layoutHScrollbar​(javax.swing.JScrollBar sb)
        Overrides:
        layoutHScrollbar in class javax.swing.plaf.basic.BasicScrollBarUI
      • layoutVScrollbarNone

        protected void layoutVScrollbarNone​(javax.swing.JScrollBar sb)
      • layoutHScrollbarNone

        protected void layoutHScrollbarNone​(javax.swing.JScrollBar sb)
      • createTrackListener

        protected javax.swing.plaf.basic.BasicScrollBarUI.TrackListener createTrackListener()
        Overrides:
        createTrackListener in class javax.swing.plaf.basic.BasicScrollBarUI
      • createArrowButtonListener

        protected javax.swing.plaf.basic.BasicScrollBarUI.ArrowButtonListener createArrowButtonListener()
        Overrides:
        createArrowButtonListener in class javax.swing.plaf.basic.BasicScrollBarUI
      • updateThumbState

        private void updateThumbState​(int x,
                                      int y)
        Updates the thumb state based on the coordinates.
        Parameters:
        x - X coordinate.
        y - Y coordinate.
      • getPreferredSize

        public java.awt.Dimension getPreferredSize​(javax.swing.JComponent c)
        Overrides:
        getPreferredSize in class javax.swing.plaf.basic.BasicScrollBarUI
      • update

        public void update​(java.awt.Graphics g,
                           javax.swing.JComponent c)
        Overrides:
        update in class javax.swing.plaf.ComponentUI