Class DurationConverter
java.lang.Object
javafx.css.StyleConverter<Number, javafx.util.Duration>
com.dlsc.gemsfx.util.DurationConverter
A CSS
StyleConverter that converts a numeric millisecond value to a
Duration.
Usage in CSS:
-fx-animation-duration: 300; /* 300 milliseconds */
In Java:
new CssMetaData<>("-fx-animation-duration", DurationConverter.getInstance(), Duration.millis(200)) { … }
-
Nested Class Summary
Nested classes/interfaces inherited from class javafx.css.StyleConverter
javafx.css.StyleConverter.StringStore -
Method Summary
Modifier and TypeMethodDescriptionjavafx.util.Durationstatic DurationConverterReturns the singleton instance of this converter.toString()Methods inherited from class javafx.css.StyleConverter
cacheValue, clearCache, convert, getBooleanConverter, getCachedValue, getColorConverter, getDurationConverter, getEffectConverter, getEnumConverter, getFontConverter, getInsetsConverter, getPaintConverter, getSizeConverter, getStringConverter, getUrlConverter, readBinary, writeBinary
-
Method Details
-
getInstance
Returns the singleton instance of this converter.- Returns:
- the singleton
DurationConverter
-
convert
-
toString
-