Class ScrollBar.DefaultScrollBarRenderer

  • All Implemented Interfaces:
    ComponentRenderer<ScrollBar>
    Enclosing class:
    ScrollBar

    public static class ScrollBar.DefaultScrollBarRenderer
    extends ScrollBar.ScrollBarRenderer
    Default renderer for ScrollBar which will be used unless overridden. This will draw a scrollbar using arrows at each extreme end, a background color for spaces between those arrows and the tracker and then the tracker itself in three different styles depending on the size of the tracker. All characters and colors are customizable through whatever theme is currently in use.
    • Field Detail

      • growScrollTracker

        private boolean growScrollTracker
    • Constructor Detail

      • DefaultScrollBarRenderer

        public DefaultScrollBarRenderer()
        Default constructor
    • Method Detail

      • setGrowScrollTracker

        public void setGrowScrollTracker​(boolean growScrollTracker)
        Should tracker automatically grow in size along with the ScrollBar (default: true)
        Parameters:
        growScrollTracker - Automatically grow tracker
      • drawComponent

        public void drawComponent​(TextGUIGraphics graphics,
                                  ScrollBar component)
        Description copied from interface: ComponentRenderer
        Using the supplied graphics object, draws the component passed in.
        Parameters:
        graphics - Graphics object to use for drawing
        component - Component to draw
      • clampRatio

        private float clampRatio​(float value)