valueText.setText(limitString + String.format(Locale.US, "%." + getSkinnable().getDecimals() + "f", currentValue));
valueText.setTranslateX((size - valueText.getLayoutBounds().getWidth()) * 0.5);
// Check threshold
if (thresholdExceeded) {
if (currentValue < getSkinnable().getThreshold()) {
getSkinnable().fireEvent(new ValueEvent(this, null, ValueEvent.VALUE_UNDERRUN));
thresholdExceeded = false;
}
} else {
if (currentValue > getSkinnable().getThreshold()) {
getSkinnable().fireEvent(new ValueEvent(this, null, ValueEvent.VALUE_EXCEEDED));
thresholdExceeded = true;
}
}
// Check each marker
for (Marker marker : getSkinnable().getMarkers().keySet()) {