Package crackers.kobots.graphics.widgets
Class DirectionPointer
-
- All Implemented Interfaces:
-
crackers.kobots.graphics.widgets.KobotsWidget
public final class DirectionPointer implements KobotsWidget<Int>
Draws a "pointer" within a square box defined by 2 x the size. If the label is set, the bounding box will be higher than size by the font height of the labelFont.
-
-
Field Summary
Fields Modifier and Type Field Description private final Rectangleboundsprivate final Graphics2Dgraphicsprivate final FontlabelFontprivate final BooleanclockWiseprivate final Stringlabelprivate final IntegerlineWidthprivate final Integerxprivate final Integeryprivate final IntegerstartAngleprivate final IntegerendAngle
-
Method Summary
Modifier and Type Method Description RectanglegetBounds()How much space this occupies. Graphics2DgetGraphics()FontgetLabelFont()final BooleangetClockWise()StringgetLabel()IntegergetLineWidth()IntegergetX()IntegergetY()final IntegergetStartAngle()final IntegergetEndAngle()UnitdrawStatic()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()
-
getClockWise
final Boolean getClockWise()
-
getLineWidth
Integer getLineWidth()
-
getStartAngle
final Integer getStartAngle()
-
getEndAngle
final Integer getEndAngle()
-
drawStatic
Unit 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 GUARANTEED TO BE THREAD-SAFE!!!
-
-
-
-