Class DefaultTimeFormatter

    • Field Detail

      • dateFormat

        protected final java.time.format.DateTimeFormatter[] dateFormat
      • oldIndex

        protected int oldIndex
      • formatterIndex

        protected int formatterIndex
      • timeZone

        protected javafx.beans.property.ObjectProperty<java.time.ZoneOffset> timeZone
    • Constructor Detail

      • DefaultTimeFormatter

        public DefaultTimeFormatter​(Axis axis)
        Construct a DefaultFormatter for the given NumberAxis
        Parameters:
        axis - The axis to format tick marks for
      • DefaultTimeFormatter

        public DefaultTimeFormatter()
        Construct a DefaultFormatter for the given NumberAxis
    • Method Detail

      • timeZoneOffsetProperty

        public javafx.beans.property.ObjectProperty<java.time.ZoneOffset> timeZoneOffsetProperty()
        A time-zone offset from Greenwich/UTC, such as +02:00.

        A time-zone offset is the amount of time that a time-zone differs from Greenwich/UTC. This is usually a fixed number of hours and minutes.

        Returns:
        ZoneOffset property that is being used to compute the local time axis
      • getTimeZoneOffset

        public java.time.ZoneOffset getTimeZoneOffset()
        Returns:
        Returns the A time-zone offset from Greenwich/UTC, such as +02:00.
      • setTimeZoneOffset

        public void setTimeZoneOffset​(java.time.ZoneOffset newOffset)
        Parameters:
        newOffset - the ZoneOffset to be taken into account (UTC if 'null'.
      • getCurrentLocalDateTimeStamp

        public java.lang.String getCurrentLocalDateTimeStamp()
      • formatHighResString

        public java.lang.String formatHighResString​(java.lang.Number utcValueSeconds)
      • toString

        public java.lang.String toString​(java.lang.Number utcValueSeconds)
        Description copied from interface: AxisLabelFormatter
        Converts the object provided into its string form. Format of the returned string is defined by the specific converter.
        Specified by:
        toString in interface AxisLabelFormatter
        Specified by:
        toString in class javafx.util.StringConverter<java.lang.Number>
        Parameters:
        utcValueSeconds - the number to be converted
        Returns:
        a string representation of the object passed in.
      • fromString

        public java.lang.Number fromString​(java.lang.String string)
        Description copied from interface: AxisLabelFormatter
        Converts the string provided into an object defined by the specific converter. Format of the string and type of the resulting object is defined by the specific converter.
        Specified by:
        fromString in interface AxisLabelFormatter
        Specified by:
        fromString in class javafx.util.StringConverter<java.lang.Number>
        Parameters:
        string - the string to be converted back into a number
        Returns:
        an object representation of the string passed in.