Class PlasticScrollBarUI

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

    public final class PlasticScrollBarUI
    extends javax.swing.plaf.metal.MetalScrollBarUI
    The JGoodies Plastic L&F implementation of ScrollBarUI. Can add a pseudo 3D effect and honors the Plastic Option ScrollBar.maxBumpsWidth to limit the with of the scroll bar bumps.
    Version:
    $Revision: 1.10 $
    • Nested Class Summary

      • 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
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private PlasticBumps bumps  
      private java.awt.Color darkShadowColor  
      private java.awt.Color highlightColor  
      static java.lang.String MAX_BUMPS_WIDTH_KEY  
      private static java.lang.String PROPERTY_PREFIX  
      private java.awt.Color shadowColor  
      private java.awt.Color thumbColor  
      private java.awt.Color thumbHighlightColor  
      private java.awt.Color thumbShadow  
      • Fields inherited from class javax.swing.plaf.metal.MetalScrollBarUI

        decreaseButton, FREE_STANDING_PROP, increaseButton, isFreeStanding, scrollBarWidth
      • Fields inherited from class javax.swing.plaf.basic.BasicScrollBarUI

        buttonListener, decrButton, DECREASE_HIGHLIGHT, decrGap, incrButton, INCREASE_HIGHLIGHT, incrGap, isDragging, maximumThumbSize, minimumThumbSize, modelListener, NO_HIGHLIGHT, propertyChangeListener, scrollbar, scrollListener, scrollTimer, thumbDarkShadowColor, thumbLightShadowColor, thumbRect, trackColor, trackHighlight, trackHighlightColor, trackListener, trackRect
      • Fields inherited from interface javax.swing.SwingConstants

        BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void configureScrollBarColors()  
      protected javax.swing.JButton createDecreaseButton​(int orientation)  
      protected javax.swing.JButton createIncreaseButton​(int orientation)  
      static javax.swing.plaf.ComponentUI createUI​(javax.swing.JComponent b)  
      protected void installDefaults()  
      private void paintBumps​(java.awt.Graphics g, javax.swing.JComponent c, int x, int y, int width, int height)  
      protected void paintThumb​(java.awt.Graphics g, javax.swing.JComponent c, java.awt.Rectangle thumbBounds)  
      private void paintThumb3D​(java.awt.Graphics g, java.awt.Rectangle thumbBounds)  
      protected void paintTrack​(java.awt.Graphics g, javax.swing.JComponent c, java.awt.Rectangle trackBounds)  
      private static boolean useNarrowBumps()  
      • Methods inherited from class javax.swing.plaf.metal.MetalScrollBarUI

        createPropertyChangeListener, getMinimumThumbSize, getPreferredSize, installListeners, setThumbBounds
      • Methods inherited from class javax.swing.plaf.basic.BasicScrollBarUI

        addLayoutComponent, createArrowButtonListener, createModelListener, createScrollListener, createTrackListener, getMaximumSize, getMaximumThumbSize, getSupportsAbsolutePositioning, getThumbBounds, getTrackBounds, installComponents, installKeyboardActions, installUI, isThumbRollover, layoutContainer, layoutHScrollbar, layoutVScrollbar, minimumLayoutSize, paint, paintDecreaseHighlight, paintIncreaseHighlight, preferredLayoutSize, removeLayoutComponent, scrollByBlock, scrollByUnit, setThumbRollover, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
      • Methods inherited from class javax.swing.plaf.ComponentUI

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

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

      • MAX_BUMPS_WIDTH_KEY

        public static final java.lang.String MAX_BUMPS_WIDTH_KEY
        See Also:
        Constant Field Values
      • shadowColor

        private java.awt.Color shadowColor
      • highlightColor

        private java.awt.Color highlightColor
      • darkShadowColor

        private java.awt.Color darkShadowColor
      • thumbColor

        private java.awt.Color thumbColor
      • thumbShadow

        private java.awt.Color thumbShadow
      • thumbHighlightColor

        private java.awt.Color thumbHighlightColor
    • Constructor Detail

      • PlasticScrollBarUI

        public PlasticScrollBarUI()
    • Method Detail

      • createUI

        public static javax.swing.plaf.ComponentUI createUI​(javax.swing.JComponent b)
      • installDefaults

        protected void installDefaults()
        Overrides:
        installDefaults in class javax.swing.plaf.metal.MetalScrollBarUI
      • createDecreaseButton

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

        protected javax.swing.JButton createIncreaseButton​(int orientation)
        Overrides:
        createIncreaseButton in class javax.swing.plaf.metal.MetalScrollBarUI
      • configureScrollBarColors

        protected void configureScrollBarColors()
        Overrides:
        configureScrollBarColors in class javax.swing.plaf.metal.MetalScrollBarUI
      • paintTrack

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

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

        private void paintBumps​(java.awt.Graphics g,
                                javax.swing.JComponent c,
                                int x,
                                int y,
                                int width,
                                int height)
      • paintThumb3D

        private void paintThumb3D​(java.awt.Graphics g,
                                  java.awt.Rectangle thumbBounds)
      • useNarrowBumps

        private static boolean useNarrowBumps()