Package com.inet.report.chart.format
Class PatternDateTimeFormat
java.lang.Object
java.text.Format
java.text.DateFormat
com.inet.report.chart.format.PatternDateTimeFormat
- All Implemented Interfaces:
ChartFormat
,Serializable
,Cloneable
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
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.text.DateFormat
DateFormat.Field
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The default pattern with date and time parts.Fields inherited from class java.text.DateFormat
AM_PM_FIELD, calendar, DATE_FIELD, DAY_OF_WEEK_FIELD, DAY_OF_WEEK_IN_MONTH_FIELD, DAY_OF_YEAR_FIELD, DEFAULT, ERA_FIELD, FULL, HOUR_OF_DAY0_FIELD, HOUR_OF_DAY1_FIELD, HOUR0_FIELD, HOUR1_FIELD, LONG, MEDIUM, MILLISECOND_FIELD, MINUTE_FIELD, MONTH_FIELD, numberFormat, SECOND_FIELD, SHORT, TIMEZONE_FIELD, WEEK_OF_MONTH_FIELD, WEEK_OF_YEAR_FIELD, YEAR_FIELD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Overrides Cloneableformat
(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) protected String
getName()
FOR INTERNAL USE ONLY Returns the XML attribute name for this dataset.Returns the format pattern.parse
(String source, ParsePosition pos) void
readProperties
(Element element) Reads the XML properties of a chart format.void
saveProperties
(StringBuilder buffer, int depth) Writes the format properties to output.void
setFormatingProperties
(com.inet.report.chart.format.FormatingProperties properties) Sets the location specific formating properties, e.g. locale, time zone, first day of week.void
setPattern
(String pattern) Sets the format pattern.Methods inherited from class java.text.DateFormat
equals, format, format, getAvailableLocales, getCalendar, getDateInstance, getDateInstance, getDateInstance, getDateTimeInstance, getDateTimeInstance, getDateTimeInstance, getInstance, getNumberFormat, getTimeInstance, getTimeInstance, getTimeInstance, getTimeZone, hashCode, isLenient, parse, parseObject, setCalendar, setLenient, setNumberFormat, setTimeZone
Methods inherited from class java.text.Format
format, formatToCharacterIterator, parseObject
-
Field Details
-
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
Returns the format pattern. The pattern should have the Java format, see this class doc.- Returns:
- the pattern.
- Since:
- 8.0
- See Also:
-
setPattern
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 interfaceChartFormat
- Parameters:
properties
- the properties object (null
not permitted)
-
format
- Specified by:
format
in classDateFormat
-
parse
- Specified by:
parse
in classDateFormat
-
saveProperties
Writes the format properties to output.- Specified by:
saveProperties
in interfaceChartFormat
- Parameters:
buffer
- the outputdepth
- the depth of XML indent
-
readProperties
Reads the XML properties of a chart format.- Specified by:
readProperties
in interfaceChartFormat
- Parameters:
element
- DOM element- See Also:
-
clone
Overrides Cloneable- Specified by:
clone
in interfaceChartFormat
- Overrides:
clone
in classDateFormat
- Returns:
- the chart format
-
getName
FOR INTERNAL USE ONLY Returns the XML attribute name for this dataset.- Returns:
- the name.
-