/** * Sets the current height in feet * @param VALUE */ @Override public void setValue(final double VALUE) { if (isEnabled()) { this.value100 = (VALUE % 1000) / 100; this.value1000 = (VALUE % 10000) / 100; this.value10000 = (VALUE % 100000) / 100; if (isValueCoupled()) { setLcdValue(VALUE); } fireStateChanged(); this.oldValue = VALUE; repaint(); } }
/** * Sets the current height in feet * @param VALUE */ @Override public void setValue(final double VALUE) { if (isEnabled()) { this.value100 = (VALUE % 1000) / 100; this.value1000 = (VALUE % 10000) / 100; this.value10000 = (VALUE % 100000) / 100; if (isValueCoupled()) { setLcdValue(VALUE); } fireStateChanged(); this.oldValue = VALUE; repaint(); } }
if (!isEnabled()) { G2.drawImage(disabledImage, 0, 0, null);
if (!isEnabled()) { G2.drawImage(disabledImage, 0, 0, null);
@Override public void setValueAnimated(final double VALUE) { if (isEnabled()) { if (timeline.getState() == Timeline.TimelineState.PLAYING_FORWARD || timeline.getState() == Timeline.TimelineState.PLAYING_REVERSE) { timeline.abort(); } timeline = new Timeline(this); timeline.addPropertyToInterpolate("value", this.oldValue, VALUE); timeline.setEase(new Spline(0.5f)); double range = Math.abs(this.value100 - VALUE); double fraction = range / 1000; timeline.setDuration((long) (1000 * fraction)); timeline.play(); } }
@Override public void setValueAnimated(final double VALUE) { if (isEnabled()) { if (timeline.getState() == Timeline.TimelineState.PLAYING_FORWARD || timeline.getState() == Timeline.TimelineState.PLAYING_REVERSE) { timeline.abort(); } timeline = new Timeline(this); timeline.addPropertyToInterpolate("value", this.oldValue, VALUE); timeline.setEase(new Spline(0.5f)); double range = Math.abs(this.value100 - VALUE); double fraction = range / 1000; timeline.setDuration((long) (1000 * fraction)); timeline.play(); } }