Java Code Examples for javafx.util.Duration#lessThan()

The following examples show how to use javafx.util.Duration#lessThan() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HeatControl.java    From Enzo with Apache License 2.0 4 votes vote down vote up
private Duration clamp(final Duration MIN_VALUE, final Duration MAX_VALUE, final Duration VALUE) {
    if (VALUE.lessThan(MIN_VALUE)) return MIN_VALUE;
    if (VALUE.greaterThan(MAX_VALUE)) return MAX_VALUE;
    return VALUE;
}
 
Example 2
Source File: Gauge.java    From Enzo with Apache License 2.0 4 votes vote down vote up
private Duration clamp(final Duration MIN_VALUE, final Duration MAX_VALUE, final Duration VALUE) {
    if (VALUE.lessThan(MIN_VALUE)) return MIN_VALUE;
    if (VALUE.greaterThan(MAX_VALUE)) return MAX_VALUE;
    return VALUE;
}
 
Example 3
Source File: RadialBargraph.java    From Enzo with Apache License 2.0 4 votes vote down vote up
private Duration clamp(final Duration MIN_VALUE, final Duration MAX_VALUE, final Duration VALUE) {
    if (VALUE.lessThan(MIN_VALUE)) return MIN_VALUE;
    if (VALUE.greaterThan(MAX_VALUE)) return MAX_VALUE;
    return VALUE;
}
 
Example 4
Source File: SimpleGauge.java    From Enzo with Apache License 2.0 4 votes vote down vote up
private Duration clamp(final Duration MIN_VALUE, final Duration MAX_VALUE, final Duration VALUE) {
    if (VALUE.lessThan(MIN_VALUE)) return MIN_VALUE;
    if (VALUE.greaterThan(MAX_VALUE)) return MAX_VALUE;
    return VALUE;
}