Package crackers.kobots.graphics.widgets
Class HorizontalPercentageIndicator
-
- All Implemented Interfaces:
-
crackers.kobots.graphics.widgets.KobotsWidget
public final class HorizontalPercentageIndicator implements KobotsWidget<Int>
Shows a sliding pointer between 0 and 100 horizontally.
-
-
Field Summary
Fields Modifier and Type Field Description private final Rectangle
bounds
private final Graphics2D
graphics
private final Font
labelFont
private final Integer
maxWidth
private final String
label
private final Integer
lineWidth
private final Integer
pointerSize
private final Integer
x
private final Integer
y
-
Constructor Summary
Constructors Constructor Description HorizontalPercentageIndicator(Graphics2D graphics, Font labelFont, Integer maxWidth, String label, Integer lineWidth, Integer pointerSize, Integer x, Integer y)
-
Method Summary
Modifier and Type Method Description Rectangle
getBounds()
How much space this occupies. Graphics2D
getGraphics()
Font
getLabelFont()
final Integer
getMaxWidth()
String
getLabel()
Integer
getLineWidth()
final Integer
getPointerSize()
Integer
getX()
Integer
getY()
<Error class: unknown class>
drawStatic()
Draw any "static" parts that don't get updated. Unit
updateValue(Integer currentValue)
Update the display to the current value. -
-
Method Detail
-
getGraphics
Graphics2D getGraphics()
-
getLabelFont
Font getLabelFont()
-
getMaxWidth
final Integer getMaxWidth()
-
getLineWidth
Integer getLineWidth()
-
getPointerSize
final Integer getPointerSize()
-
drawStatic
<Error class: unknown class> drawStatic()
Draw any "static" parts that don't get updated.
-
updateValue
Unit updateValue(Integer currentValue)
Update the display to the current value. THIS IS NOT THREAD-SAFE!!!
-
-
-
-