Package com.inet.report.chart.format
Class DateTimeFormat
java.lang.Object
java.text.Format
java.text.DateFormat
com.inet.report.chart.format.DateTimeFormat
- All Implemented Interfaces:
ChartFormat
,Serializable
,Cloneable
This is a date and time format with predefined locale-sensitive styles.
For more information to the system defined date and time styles see http://docs.oracle.com/javase/8/docs/api/java/text/DateFormat.html.
For more information to the system defined date and time styles see http://docs.oracle.com/javase/8/docs/api/java/text/DateFormat.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 custom data formatstatic final String
The custom data format for day of week in full form, if one existsstatic final String
The custom data format for month and years in abbreviated formstatic final String
The custom data format for month in full form, if one existsstatic final String
The custom data format for month and years in full formstatic final String
The custom data format for yearsstatic final String
System default format for full date and time, seeDateFormat.FULL
static final String
System default format for long date and time, seeDateFormat.LONG
static final String
System default format for medium date and time, seeDateFormat.MEDIUM
static final String
System default format for short date and time, seeDateFormat.SHORT
static final String
The custom time format for minutes in abbreviated formstatic final String
The custom time format for seconds in abbreviated formFields 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) Returns the date format pattern constant, e.g.protected String
getName()
FOR INTERNAL USE ONLY Returns the XML attribute name for this dataset.Returns the time format pattern constant, e.g.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
setDatePatternConstant
(String patternConstant) Sets the date format pattern constant, e.g.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
setTimePatternConstant
(String patternConstant) Sets the time format pattern constant, e.g.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
-
PATTERN_CONSTANT_FULL
System default format for full date and time, seeDateFormat.FULL
- See Also:
-
PATTERN_CONSTANT_LONG
System default format for long date and time, seeDateFormat.LONG
- See Also:
-
PATTERN_CONSTANT_MEDIUM
System default format for medium date and time, seeDateFormat.MEDIUM
- See Also:
-
PATTERN_CONSTANT_SHORT
System default format for short date and time, seeDateFormat.SHORT
- See Also:
-
PATTERN_CONSTANT_DATE_D_MMMM_YYYY
The custom data format- See Also:
-
PATTERN_CONSTANT_DATE_YYYY
The custom data format for years- See Also:
-
PATTERN_CONSTANT_DATE_MMMM_YYYY
The custom data format for month and years in full form- See Also:
-
PATTERN_CONSTANT_DATE_MMM_YY
The custom data format for month and years in abbreviated form- See Also:
-
PATTERN_CONSTANT_DATE_MMMM
The custom data format for month in full form, if one exists- See Also:
-
PATTERN_CONSTANT_DATE_EEEE
The custom data format for day of week in full form, if one exists- See Also:
-
PATTERN_CONSTANT_TIME_MM
The custom time format for minutes in abbreviated form- See Also:
-
PATTERN_CONSTANT_TIME_SS
The custom time format for seconds in abbreviated form- See Also:
-
-
Constructor Details
-
DateTimeFormat
public DateTimeFormat()Creates a new instance of format. Initializes the pattern constants with system default format SHORT.- Since:
- 8.0
-
-
Method Details
-
getDatePatternConstant
Returns the date format pattern constant, e.g. PATTERN_CONSTANT_DATE_YYYY.- Returns:
- the pattern constant.
- Since:
- 8.0
- See Also:
-
setDatePatternConstant
Sets the date format pattern constant, e.g. PATTERN_CONSTANT_DATE_YYYY.- Parameters:
patternConstant
- the pattern constant (null
permitted)- Since:
- 8.0
- See Also:
-
getTimePatternConstant
Returns the time format pattern constant, e.g. PATTERN_CONSTANT_TIME_MM.- Returns:
- the pattern constant.
- Since:
- 8.0
- See Also:
-
setTimePatternConstant
Sets the time format pattern constant, e.g. PATTERN_CONSTANT_TIME_MM.- Parameters:
patternConstant
- the pattern constant (null
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:
-
getName
FOR INTERNAL USE ONLY Returns the XML attribute name for this dataset.- Returns:
- the name.
-
clone
Overrides Cloneable- Specified by:
clone
in interfaceChartFormat
- Overrides:
clone
in classDateFormat
- Returns:
- the chart format
-