public class ProgressBar extends AbstractComponent
Component.Alignment
Constructor and Description |
---|
ProgressBar(int preferredWidth) |
Modifier and Type | Method and Description |
---|---|
protected TerminalSize |
calculatePreferredSize() |
char |
getCompleteFillChar() |
double |
getProgress() |
char |
getRemainingFillChar() |
boolean |
isCompletedPercentageShown() |
void |
repaint(TextGraphics graphics)
This is the main 'paint' method for a component, it's called when
lanterna wants the component to re-draw itself.
|
void |
setCompletedPercentageShown(boolean flag)
Controls whether the completion percentage will be shown to the left of the progress bar.
|
void |
setCompleteFillChar(char fill)
Sets the character used to fill the portion of the progress bar indicating the completed portion.
|
void |
setProgress(double progress) |
void |
setRemainingFillChar(char fill)
Sets the character used to fill the portion of the progress bar indicating the incomplete portion.
|
addBorder, addComponentListener, getAlignment, getComponentListeners, getGUIScreen, getMinimumSize, getParent, getPreferredSize, getWindow, invalidate, isScrollable, isVisible, removeComponentListener, setAlignment, setParent, setPreferredSize, setVisible, transformAccordingToAlignment
protected TerminalSize calculatePreferredSize()
calculatePreferredSize
in class AbstractComponent
public void repaint(TextGraphics graphics)
Component
graphics
- TextGraphics object to use for drawing the component and
getting information about the drawing contextpublic double getProgress()
public void setProgress(double progress)
public void setCompleteFillChar(char fill)
public char getCompleteFillChar()
public void setRemainingFillChar(char fill)
public char getRemainingFillChar()
public void setCompletedPercentageShown(boolean flag)
public boolean isCompletedPercentageShown()
Copyright © 2015. All Rights Reserved.