this.indicatorMoveEffect = new Glow(0);
this.tickValueFont = tickValueFont == null ? Font.font(FONT_NAME, 17d * sizeScale) : tickValueFont;
final double defaultAngle = getTickValue(getViewingStartAngle()) <= getTickValue(getViewingEndAngle()) ?
getViewingStartAngle() : getViewingEndAngle();
this.angleProperty = new SimpleDoubleProperty(defaultAngle) {
@Override
public final void set(final double v) {
final double nav = calibrateViewingAngle(v);
if (nav >= 0) {
super.set(nav);
final double ntv = getTickValue(nav);
if (tickValueProperty.get() != ntv) {
tickValueProperty.set(ntv);
}
}
}
};
this.tickValueProperty = new SimpleDoubleProperty() {
@Override
public final void set(final double v) {
double ntv = tickValueFormat != null ? Double.parseDouble(getFormatedTickValue(v, false)) : v;
ntv = snapToTicksProperty.get() ? closestTickMarkValue(ntv) : ntv;
super.set(ntv);
final double nav = getViewingAngle(ntv);
if (angleProperty.get() != nav) {
angleProperty.set(nav);
}
}
};
this.dialCenterFillProperty = new SimpleObjectProperty<Paint>(
this.indicatorType == IndicatorType.KNOB ?
new RadialGradient(0, 0, this.centerX, this.centerY,
this.dialCenterOuterRadius, false, CycleMethod.NO_CYCLE,
new Stop(0, Color.DARKGRAY.darker()), new Stop(0.8d, Color.DARKGRAY.darker()),
new Stop(0.85d, Color.LIGHTGRAY), new Stop(0.97d, Color.DARKGRAY.darker()))
: Color.BLACK);
this.minorTickMarkFillProperty = new SimpleObjectProperty<Paint>(Color.GRAY.brighter());
this.majorTickMarkFillProperty = new SimpleObjectProperty<Paint>(Color.WHITE);
this.tickMarkLabelFillProperty = new SimpleObjectProperty<Paint>(Color.WHITE);
this.tickValueDisplayFillProperty = new SimpleObjectProperty<Paint>(new LinearGradient(
0, 0, 0, 1d, true, CycleMethod.NO_CYCLE,
new Stop(0, Color.DARKGRAY.darker()), new Stop(0.4d, Color.BLACK)));
this.tickValueDisplayTextFillProperty = new SimpleObjectProperty<Paint>(Color.WHITE);
this.outerRimFillProperty = new SimpleObjectProperty<Paint>(Color.BLACK);
this.outerRimEffectFillProperty = new SimpleObjectProperty<Color>(Color.LIGHTCYAN);
this.centerGaugeFillProperty = new SimpleObjectProperty<Paint>(
this.indicatorType == IndicatorType.KNOB ? Color.BLACK :
new RadialGradient(0, 0, this.centerX, this.centerY,
this.innerRadius, false, CycleMethod.NO_CYCLE,
new Stop(0, Color.WHITESMOKE),
new Stop(0.7d, Color.BLACK)));
this.indicatorFillProperty = new SimpleObjectProperty<Paint>(
this.indicatorType == IndicatorType.KNOB ? Color.BLACK : Color.ORANGERED);
this.indicatorOpacityProperty = new SimpleDoubleProperty(1);
this.dialCenterOpacityProperty = new SimpleDoubleProperty(1);
this.intensityIndicatorRegionsProperty = new SimpleObjectProperty<Gauge.IntensityIndicatorRegions>(
intensityRegions == null ? INTENSITY_REGIONS_DEFAULT : intensityRegions);
this.lightingAzimuthProperty = new SimpleDoubleProperty(270d);
this.lightingElevationProperty = new SimpleDoubleProperty(50d);
this.highlightFillProperty = new SimpleObjectProperty<Paint>(Color.WHITE);
this.snapToTicksProperty = new SimpleBooleanProperty(false);
createChildren();
Platform.runLater(new Runnable() {
@Override