Module com.googlecode.lanterna
Package com.googlecode.lanterna.gui2
Class ScrollBar.DefaultScrollBarRenderer
- java.lang.Object
-
- com.googlecode.lanterna.gui2.ScrollBar.ScrollBarRenderer
-
- com.googlecode.lanterna.gui2.ScrollBar.DefaultScrollBarRenderer
-
- All Implemented Interfaces:
ComponentRenderer<ScrollBar>
- Enclosing class:
- ScrollBar
public static class ScrollBar.DefaultScrollBarRenderer extends ScrollBar.ScrollBarRenderer
Default renderer forScrollBar
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 Summary
Fields Modifier and Type Field Description private boolean
growScrollTracker
-
Constructor Summary
Constructors Constructor Description DefaultScrollBarRenderer()
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private float
clampRatio(float value)
void
drawComponent(TextGUIGraphics graphics, ScrollBar component)
Using the supplied graphics object, draws the component passed in.void
setGrowScrollTracker(boolean growScrollTracker)
Should tracker automatically grow in size along with theScrollBar
(default:true
)-
Methods inherited from class com.googlecode.lanterna.gui2.ScrollBar.ScrollBarRenderer
getPreferredSize
-
-
-
-
Method Detail
-
setGrowScrollTracker
public void setGrowScrollTracker(boolean growScrollTracker)
Should tracker automatically grow in size along with theScrollBar
(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 drawingcomponent
- Component to draw
-
clampRatio
private float clampRatio(float value)
-
-