Class CustomScrollBarUI

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

    public class CustomScrollBarUI
    extends javax.swing.plaf.basic.BasicScrollBarUI
    This scroll bar UI is to be used for the "RuneLite Obsidian" client theme. It is a part of the client's redesign as detailed on issue #1342
    • 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 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, scrollBarWidth, scrollListener, scrollTimer, thumbDarkShadowColor, thumbHighlightColor, thumbLightShadowColor, thumbRect, 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 javax.swing.JButton createDecreaseButton​(int orientation)
      Applies an empty button to the decrease (down arrow) button.
      protected javax.swing.JButton createEmptyButton()
      Creates an empty JButton to be used as the scroll bar's arrows (to disable the arrows).
      protected javax.swing.JButton createIncreaseButton​(int orientation)
      Applies an empty button to the increase (up arrow) button.
      static javax.swing.plaf.ComponentUI createUI​(javax.swing.JComponent c)  
      protected void paintThumb​(java.awt.Graphics graphics, javax.swing.JComponent jComponent, java.awt.Rectangle rectangle)
      Overrides the painting of the bar's thumb (the lighter part on top that users use to slide up and down the page).
      protected void paintTrack​(java.awt.Graphics graphics, javax.swing.JComponent jComponent, java.awt.Rectangle rectangle)
      Overrides the painting of the bar's track (the darker part underneath that extends the full page length).
      void setThumbColor​(java.awt.Color thumbColor)  
      void setTrackColor​(java.awt.Color trackColor)  
      • Methods inherited from class javax.swing.plaf.basic.BasicScrollBarUI

        addLayoutComponent, configureScrollBarColors, createArrowButtonListener, createModelListener, createPropertyChangeListener, createScrollListener, createTrackListener, getMaximumSize, getMaximumThumbSize, getMinimumThumbSize, getPreferredSize, getSupportsAbsolutePositioning, getThumbBounds, getTrackBounds, installComponents, installDefaults, installKeyboardActions, installListeners, installUI, isThumbRollover, layoutContainer, layoutHScrollbar, layoutVScrollbar, minimumLayoutSize, paint, paintDecreaseHighlight, paintIncreaseHighlight, preferredLayoutSize, removeLayoutComponent, scrollByBlock, scrollByUnit, setThumbBounds, 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
    • Constructor Detail

      • CustomScrollBarUI

        public CustomScrollBarUI()
    • Method Detail

      • paintTrack

        protected void paintTrack​(java.awt.Graphics graphics,
                                  javax.swing.JComponent jComponent,
                                  java.awt.Rectangle rectangle)
        Overrides the painting of the bar's track (the darker part underneath that extends the full page length).
        Overrides:
        paintTrack in class javax.swing.plaf.basic.BasicScrollBarUI
      • paintThumb

        protected void paintThumb​(java.awt.Graphics graphics,
                                  javax.swing.JComponent jComponent,
                                  java.awt.Rectangle rectangle)
        Overrides the painting of the bar's thumb (the lighter part on top that users use to slide up and down the page).
        Overrides:
        paintThumb in class javax.swing.plaf.basic.BasicScrollBarUI
      • createEmptyButton

        protected javax.swing.JButton createEmptyButton()
        Creates an empty JButton to be used as the scroll bar's arrows (to disable the arrows).
      • createUI

        public static javax.swing.plaf.ComponentUI createUI​(javax.swing.JComponent c)
      • createDecreaseButton

        protected javax.swing.JButton createDecreaseButton​(int orientation)
        Applies an empty button to the decrease (down arrow) button.
        Overrides:
        createDecreaseButton in class javax.swing.plaf.basic.BasicScrollBarUI
      • createIncreaseButton

        protected javax.swing.JButton createIncreaseButton​(int orientation)
        Applies an empty button to the increase (up arrow) button.
        Overrides:
        createIncreaseButton in class javax.swing.plaf.basic.BasicScrollBarUI
      • setThumbColor

        public void setThumbColor​(java.awt.Color thumbColor)
      • setTrackColor

        public void setTrackColor​(java.awt.Color trackColor)