// ******************** Constructors **************************************
public Gauge() {
getStyleClass().add("gauge");
value = new DoublePropertyBase(0) {
@Override protected void invalidated() {
set(clamp(getMinValue(), getMaxValue(), get()));
}
@Override public Object getBean() { return this; }
@Override public String getName() { return "value"; }
};
minValue = new DoublePropertyBase(0) {
@Override protected void invalidated() {
//set(clamp(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, get()));
if (getValue() < get()) setValue(get());
if (getThreshold() < get()) setThreshold(get());
for (Marker marker : markers.keySet()) {
if (marker.getValue() < get()) marker.setValue(get());
}
for (Section section : sections) {
if (section.getStart() < get()) section.setStart(get());
if (section.getStop() < get()) section.setStop(get());
}
}
@Override public Object getBean() { return this; }
@Override public String getName() { return "minValue"; }
};
maxValue = new DoublePropertyBase(100) {
@Override protected void invalidated() {
//set(clamp(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, get()));
if (getValue() > get()) setValue(get());
if (getThreshold() > get()) setThreshold(get());
for (Marker marker : markers.keySet()) {