Class PointerGauge

  • All Implemented Interfaces:

    
    public final class PointerGauge
    
                        

    A very simple circular- or arc-style "gauge" (e.g. "dial", "dial pointer"), without resorting to large libraries.

    • graphics = the canvas to draw on

    • width, height = the drawing area size

    or

    • image = a rendered image

    • minimumValue, maximumValue = range of expected values: the pointer won't go beyond these (default 0-100)

    • label = optional label in the center of the dial

    • shape = either Shape.SEMICIRCLE (default) or Shape.CIRCLE

    • foreground = color for the dial, ticks, and pointer (default Color.WHITE)

    • background = color of the middle of the dial (default Color.BLACK)

    • font = name of the font to use for the tick labels and the optional dial label (default "SansSerif")

    • fontColor = color for said font (defaults to foreground)