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 Rectangleboundsprivate final Graphics2Dgraphicsprivate final FontlabelFontprivate final IntegermaxWidthprivate final Stringlabelprivate final IntegerlineWidthprivate final IntegerpointerSizeprivate final Integerxprivate final Integery
-
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 RectanglegetBounds()How much space this occupies. Graphics2DgetGraphics()FontgetLabelFont()final IntegergetMaxWidth()StringgetLabel()IntegergetLineWidth()final IntegergetPointerSize()IntegergetX()IntegergetY()<Error class: unknown class>drawStatic()Draw any "static" parts that don't get updated. UnitupdateValue(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!!!
-
-
-
-