Class PatternDateTimeFormat

java.lang.Object
java.text.Format
java.text.DateFormat
com.inet.report.chart.format.PatternDateTimeFormat
All Implemented Interfaces:
ChartFormat, Serializable, Cloneable

public class PatternDateTimeFormat extends DateFormat implements ChartFormat
This is a date time format defined by a pattern.
For more information on date and time patterns see http://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html
Since:
8.0
See Also:
  • Field Details

    • DEFAULT_PATTERN

      public static final String DEFAULT_PATTERN
      The default pattern with date and time parts.
      See Also:
  • Constructor Details

    • PatternDateTimeFormat

      public PatternDateTimeFormat()
      Creates a new instance of format.
      Since:
      8.0
  • Method Details

    • getPattern

      public String getPattern()
      Returns the format pattern. The pattern should have the Java format, see this class doc.
      Returns:
      the pattern.
      Since:
      8.0
      See Also:
    • setPattern

      public void setPattern(String pattern)
      Sets the format pattern. The pattern should have the Java format, see this class doc.
      Parameters:
      pattern - the pattern (null not permitted)
      Since:
      8.0
      See Also:
    • setFormatingProperties

      public void setFormatingProperties(com.inet.report.chart.format.FormatingProperties properties)
      Sets the location specific formating properties, e.g. locale, time zone, first day of week.
      Specified by:
      setFormatingProperties in interface ChartFormat
      Parameters:
      properties - the properties object (null not permitted)
    • format

      public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition)
      Specified by:
      format in class DateFormat
    • parse

      public Date parse(String source, ParsePosition pos)
      Specified by:
      parse in class DateFormat
    • saveProperties

      public void saveProperties(StringBuilder buffer, int depth)
      Writes the format properties to output.
      Specified by:
      saveProperties in interface ChartFormat
      Parameters:
      buffer - the output
      depth - the depth of XML indent
    • readProperties

      public void readProperties(Element element)
      Reads the XML properties of a chart format.
      Specified by:
      readProperties in interface ChartFormat
      Parameters:
      element - DOM element
      See Also:
    • clone

      public PatternDateTimeFormat clone()
      Overrides Cloneable
      Specified by:
      clone in interface ChartFormat
      Overrides:
      clone in class DateFormat
      Returns:
      the chart format
    • getName

      protected String getName()
      FOR INTERNAL USE ONLY Returns the XML attribute name for this dataset.
      Returns:
      the name.