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
FieldsModifier and TypeFieldDescriptionstatic final StringThe custom data formatstatic final StringThe custom data format for day of week in full form, if one existsstatic final StringThe custom data format for month and years in abbreviated formstatic final StringThe custom data format for month in full form, if one existsstatic final StringThe custom data format for month and years in full formstatic final StringThe custom data format for yearsstatic final StringSystem default format for full date and time, seeDateFormat.FULLstatic final StringSystem default format for long date and time, seeDateFormat.LONGstatic final StringSystem default format for medium date and time, seeDateFormat.MEDIUMstatic final StringSystem default format for short date and time, seeDateFormat.SHORTstatic final StringThe custom time format for minutes in abbreviated formstatic final StringThe 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Overrides Cloneableformat(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) Returns the date format pattern constant, e.g.protected StringgetName()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) voidreadProperties(Element element) Reads the XML properties of a chart format.voidsaveProperties(StringBuilder buffer, int depth) Writes the format properties to output.voidsetDatePatternConstant(String patternConstant) Sets the date format pattern constant, e.g.voidsetFormatingProperties(com.inet.report.chart.format.FormatingProperties properties) Sets the location specific formating properties, e.g. locale, time zone, first day of week.voidsetTimePatternConstant(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, setTimeZoneMethods 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 (nullpermitted)- 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 (nullpermitted)- 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:
setFormatingPropertiesin interfaceChartFormat- Parameters:
properties- the properties object (nullnot permitted)
-
format
- Specified by:
formatin classDateFormat
-
parse
- Specified by:
parsein classDateFormat
-
saveProperties
Writes the format properties to output.- Specified by:
savePropertiesin interfaceChartFormat- Parameters:
buffer- the outputdepth- the depth of XML indent
-
readProperties
Reads the XML properties of a chart format.- Specified by:
readPropertiesin 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:
clonein interfaceChartFormat- Overrides:
clonein classDateFormat- Returns:
- the chart format
-