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
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate 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
-
Field Details
-
growScrollTracker
private boolean growScrollTracker
-
-
Constructor Details
-
DefaultScrollBarRenderer
public DefaultScrollBarRenderer()Default constructor
-
-
Method Details
-
setGrowScrollTracker
public void setGrowScrollTracker(boolean growScrollTracker) Should tracker automatically grow in size along with theScrollBar
(default:true
)- Parameters:
growScrollTracker
- Automatically grow tracker
-
drawComponent
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)
-