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 Rectangle
bounds
private final Graphics2D
graphics
private final Font
labelFont
private final Boolean
clockWise
private final String
label
private final Integer
lineWidth
private final Integer
x
private final Integer
y
private final Integer
startAngle
private final Integer
endAngle
-
Method Summary
Modifier and Type Method Description Rectangle
getBounds()
How much space this occupies. Graphics2D
getGraphics()
Font
getLabelFont()
final Boolean
getClockWise()
String
getLabel()
Integer
getLineWidth()
Integer
getX()
Integer
getY()
final Integer
getStartAngle()
final Integer
getEndAngle()
Unit
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()
-
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!!!
-
-
-
-