- java.lang.Object
-
- javafx.util.StringConverter<Number>
-
- eu.ess.xaos.ui.plot.TimeAxis.TimeConverter
-
- Enclosing class:
- TimeAxis
public static class TimeAxis.TimeConverter extends StringConverter<Number>
ConvertsNumbers to/from "[-][H…HH:][MM:]SS[.sss]" strings. Hours grater than 23 will never be converted in days, instead they can be clamped to 0..23 or not.
-
-
Constructor Summary
Constructors Constructor Description TimeConverter()TimeConverter(TimeUnit minTimeUnit, TimeUnit maxTimeUnit)
-
-
-
Constructor Detail
-
TimeConverter
public TimeConverter()
-
TimeConverter
public TimeConverter(TimeUnit minTimeUnit, TimeUnit maxTimeUnit) throws IllegalArgumentException, NullPointerException
Creates a new time converted with the specified minimum and maximum time units used to convert fromNumbertoString.- Parameters:
minTimeUnit- FromTimeUnit.MILLISECONDSup toTimeUnit.SECONDS, clamped otherwise.maxTimeUnit- FromTimeUnit.DAYSdown toTimeUnit.SECONDS, clamped otherwise. IfTimeUnit.HOURS, the hours will be clamped to 0..23, otherwise ifTimeUnit.DAYSthe total amount of hours will be used.- Throws:
IllegalArgumentException- IfminTimeUnit > maxTimeUnit.NullPointerException- If one or both parameters arenull.
-
-
Method Detail
-
fromString
public Number fromString(String value)
- Specified by:
fromStringin classStringConverter<Number>
-
toString
public String toString(Number value)
- Specified by:
toStringin classStringConverter<Number>
-
-