private AnimationTimer timer;
@Override public void init() {
thermoMeter = SimpleGaugeBuilder.create()
.prefSize(400, 400)
.sections(new Section(0, 16.66666, "0"),
new Section(16.66666, 33.33333, "1"),
new Section(33.33333, 50.0, "2"),
new Section(50.0, 66.66666, "3"),
new Section(66.66666, 83.33333, "4"),
new Section(83.33333, 100.0, "5"))
.title("Temperature")
.unit("C")
.value(20)
.styleClass(SimpleGauge.STYLE_CLASS_GREEN_TO_RED_6)
.build();
wattMeter = SimpleGaugeBuilder.create()
.prefSize(400, 400)
.sections(new Section(0, 16.66666, "0"),
new Section(16.66666, 33.33333, "1"),
new Section(33.33333, 50.0, "2"),
new Section(50.0, 66.66666, "3"),
new Section(66.66666, 83.33333, "4"),
new Section(83.33333, 100.0, "5"))
.unit("W")
.measuredRangeVisible(true)
.rangeFill(Color.rgb(0, 0, 200, 0.5))
.styleClass(SimpleGauge.STYLE_CLASS_GREEN_TO_DARKGREEN_6)
.build();
energyMeter = SimpleGaugeBuilder.create()
.prefSize(400, 400)
.sections(new Section(0, 10, "A++"),
new Section(10, 20, "A+"),
new Section(20, 30, "A"),
new Section(30, 40, "B"),
new Section(40, 50, "C"),
new Section(50, 60, "D"),
new Section(60, 70, "E"),
new Section(70, 80, "F"),
new Section(80, 90, "G"),
new Section(90, 100, "H"))
.sectionTextVisible(true)
.unit("W")
.styleClass(SimpleGauge.STYLE_CLASS_GREEN_TO_RED_10)
.build();