Module com.googlecode.lanterna
Package com.googlecode.lanterna.gui2
Class ProgressBar.LargeProgressBarRenderer
- java.lang.Object
-
- com.googlecode.lanterna.gui2.ProgressBar.LargeProgressBarRenderer
-
- All Implemented Interfaces:
ComponentRenderer<ProgressBar>
- Enclosing class:
- ProgressBar
public static class ProgressBar.LargeProgressBarRenderer extends java.lang.Object implements ComponentRenderer<ProgressBar>
This progress bar renderer implementation takes slightly more space (three rows) and draws a slightly more complicates progress bar with fixed measurers to mark 25%, 50% and 75%. Maybe you have seen this one before somewhere?
-
-
Constructor Summary
Constructors Constructor Description LargeProgressBarRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
drawComponent(TextGUIGraphics graphics, ProgressBar component)
Using the supplied graphics object, draws the component passed in.TerminalSize
getPreferredSize(ProgressBar component)
Given the supplied component, how large does this renderer want the component to be? Notice that this is the responsibility of the renderer and not the component itself, since the component has no idea what its visual representation looks like.
-
-
-
Method Detail
-
getPreferredSize
public TerminalSize getPreferredSize(ProgressBar component)
Description copied from interface:ComponentRenderer
Given the supplied component, how large does this renderer want the component to be? Notice that this is the responsibility of the renderer and not the component itself, since the component has no idea what its visual representation looks like.- Specified by:
getPreferredSize
in interfaceComponentRenderer<ProgressBar>
- Parameters:
component
- Component to calculate the preferred size of- Returns:
- The size this renderer would like the component to take up
-
drawComponent
public void drawComponent(TextGUIGraphics graphics, ProgressBar component)
Description copied from interface:ComponentRenderer
Using the supplied graphics object, draws the component passed in.- Specified by:
drawComponent
in interfaceComponentRenderer<ProgressBar>
- Parameters:
graphics
- Graphics object to use for drawingcomponent
- Component to draw
-
-