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 voiddraw()Draw a static progress bar.intgetCompletedChar()Get the filled-in part of the bar.intgetLeftBorderChar()Get the left border character.intgetMaxValue()Get the value that corresponds to 100% progress.intgetMinValue()Get the value that corresponds to 0% progress.intgetRemainingChar()Get the remaining to be filled in part of the bar.intgetRightBorderChar()Get the right border character.intgetValue()Get the current value of the progress.voidsetCompletedChar(int ch)Set the filled-in part of the bar.voidsetHeight(int height)Override TWidget's height: we can only set height at construction time.voidsetLeftBorderChar(int ch)Set the left border character.voidsetMaxValue(int maxValue)Set the value that corresponds to 100% progress.voidsetMinValue(int minValue)Set the value that corresponds to 0% progress.voidsetRemainingChar(int ch)Set the remaining to be filled in part of the bar.voidsetRightBorderChar(int ch)Set the right border character.voidsetValue(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, 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, getLocale, getMouseStyle, getParent, getScreen, getTheme, getWidgetUnderMouse, getWidth, getWindow, getX, getY, handleEvent, hasChild, hLineXY, 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, setLocale, setMouseStyle, setParent, setupForTWindow, setVisible, setWidth, setWindow, setX, setY, splitHorizontal, splitVertical, switchWidget, toPrettyString, toPrettyString, toString, vLineXY, 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
-
-