Package jexer
Class TProgressBar
- java.lang.Object
-
- jexer.TWidget
-
- jexer.TProgressBar
-
-
Constructor Summary
Constructors Constructor Description TProgressBar(TWidget parent, int x, int y, int width, int value)
Public constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
draw()
Draw a static progress bar.int
getCompletedChar()
Get the filled-in part of the bar.int
getLeftBorderChar()
Get the left border character.int
getMaxValue()
Get the value that corresponds to 100% progress.int
getMinValue()
Get the value that corresponds to 0% progress.int
getRemainingChar()
Get the remaining to be filled in part of the bar.int
getRightBorderChar()
Get the right border character.int
getValue()
Get the current value of the progress.void
setCompletedChar(int ch)
Set the filled-in part of the bar.void
setHeight(int height)
Override TWidget's height: we can only set height at construction time.void
setLeftBorderChar(int ch)
Set the left border character.void
setMaxValue(int maxValue)
Set the value that corresponds to 100% progress.void
setMinValue(int minValue)
Set the value that corresponds to 0% progress.void
setRemainingChar(int ch)
Set the remaining to be filled in part of the bar.void
setRightBorderChar(int ch)
Set the right border character.void
setValue(int value)
Set the current value of the progress.-
Methods inherited from class jexer.TWidget
activate, activate, activate, activateAll, addButton, addCalendar, addCheckBox, addCheckBox, addComboBox, addDirectoryList, addDirectoryList, addDirectoryList, addDirectoryList, addEditor, addField, addField, addField, addField, addImage, addImage, addLabel, addLabel, addLabel, addLabel, addLabel, addLabel, addList, addList, addList, addList, addPanel, addPasswordField, addPasswordField, addPasswordField, addProgressBar, addRadioGroup, addRadioGroup, addSpinner, addSplitPane, addTable, addTable, addText, addText, addTreeViewWidget, addTreeViewWidget, close, compareTo, doRepaint, drawBox, drawBox, drawBoxShadow, drawChildren, fileOpenBox, fileOpenBox, fileOpenBox, fileOpenBox, fileSaveBox, getAbsoluteX, getAbsoluteY, getActiveChild, getApplication, getAttrXY, getChildren, getClipboard, getCursorAbsoluteX, getCursorAbsoluteY, getCursorX, getCursorY, getCustomMousePointer, getHeight, getLayoutManager, getMouseStyle, getParent, getScreen, getTheme, getWidgetUnderMouse, getWidth, getWindow, getX, getY, handleEvent, hasChild, hLineXY, inputBox, inputBox, inputBox, isAbsoluteActive, isActive, isCursorVisible, isDrawable, isEchoKeystrokes, isEnabled, isPixelMouse, isVisible, messageBox, messageBox, mouseWouldHit, onCommand, onIdle, onKeypress, onMenu, onMouseDoubleClick, onMouseDown, onMouseMotion, onMouseUp, onResize, putAll, putAttrXY, putAttrXY, putCharXY, putCharXY, putCharXY, putStringXY, putStringXY, remove, remove, remove, remove, removeAll, resetTabOrder, setActive, setCursorVisible, setCursorX, setCursorY, setCustomMousePointer, setDimensions, setEchoKeystrokes, setEchoKeystrokes, setEnabled, setLayoutManager, setMouseStyle, setParent, setupForTWindow, setVisible, setWidth, setWindow, setX, setY, splitHorizontal, splitVertical, switchWidget, toPrettyString, toPrettyString, toString, vLineXY
-
-
-
-
Constructor Detail
-
TProgressBar
public TProgressBar(TWidget parent, int x, int y, int width, int value)
Public constructor.- Parameters:
parent
- parent widgetx
- column relative to parenty
- row relative to parentwidth
- width of progress barvalue
- initial value of percent complete
-
-
Method Detail
-
setHeight
public void setHeight(int height)
Override TWidget's height: we can only set height at construction time.
-
getMinValue
public int getMinValue()
Get the value that corresponds to 0% progress.- Returns:
- the value that corresponds to 0% progress
-
setMinValue
public void setMinValue(int minValue)
Set the value that corresponds to 0% progress.- Parameters:
minValue
- the value that corresponds to 0% progress
-
getMaxValue
public int getMaxValue()
Get the value that corresponds to 100% progress.- Returns:
- the value that corresponds to 100% progress
-
setMaxValue
public void setMaxValue(int maxValue)
Set the value that corresponds to 100% progress.- Parameters:
maxValue
- the value that corresponds to 100% progress
-
getValue
public int getValue()
Get the current value of the progress.- Returns:
- the current value of the progress
-
setValue
public void setValue(int value)
Set the current value of the progress.- Parameters:
value
- the current value of the progress
-
setLeftBorderChar
public void setLeftBorderChar(int ch)
Set the left border character.- Parameters:
ch
- the char to use
-
getLeftBorderChar
public int getLeftBorderChar()
Get the left border character.- Returns:
- the char
-
setCompletedChar
public void setCompletedChar(int ch)
Set the filled-in part of the bar.- Parameters:
ch
- the char to use
-
getCompletedChar
public int getCompletedChar()
Get the filled-in part of the bar.- Returns:
- the char
-
setRemainingChar
public void setRemainingChar(int ch)
Set the remaining to be filled in part of the bar.- Parameters:
ch
- the char to use
-
getRemainingChar
public int getRemainingChar()
Get the remaining to be filled in part of the bar.- Returns:
- the char
-
setRightBorderChar
public void setRightBorderChar(int ch)
Set the right border character.- Parameters:
ch
- the char to use
-
getRightBorderChar
public int getRightBorderChar()
Get the right border character.- Returns:
- the char
-
-