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,java.io.Serializable,java.lang.Cloneable
public class PatternDateTimeFormat extends java.text.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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_PATTERNThe 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
Constructors Constructor Description PatternDateTimeFormat()Creates a new instance of format.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PatternDateTimeFormatclone()Overrides Cloneablejava.lang.StringBufferformat(java.util.Date date, java.lang.StringBuffer toAppendTo, java.text.FieldPosition fieldPosition)protected java.lang.StringgetName()FOR INTERNAL USE ONLY Returns the XML attribute name for this dataset.java.lang.StringgetPattern()Returns the format pattern.java.util.Dateparse(java.lang.String source, java.text.ParsePosition pos)voidreadProperties(org.w3c.dom.Element element)Reads the XML properties of a chart format.voidsaveProperties(java.lang.StringBuilder buffer, int depth)Writes the format properties to output.voidsetFormatingProperties(com.inet.report.chart.format.FormatingProperties properties)Sets the location specific formating properties, e.g.voidsetPattern(java.lang.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
-
-
-
-
Field Detail
-
DEFAULT_PATTERN
public static final java.lang.String DEFAULT_PATTERN
The default pattern with date and time parts.- See Also:
- Constant Field Values
-
-
Method Detail
-
getPattern
public java.lang.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(String)
-
setPattern
public void setPattern(java.lang.String pattern)
Sets the format pattern. The pattern should have the Java format, see this class doc.- Parameters:
pattern- the pattern (nullnot permitted)- Since:
- 8.0
- See Also:
getPattern()
-
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
public java.lang.StringBuffer format(java.util.Date date, java.lang.StringBuffer toAppendTo, java.text.FieldPosition fieldPosition)- Specified by:
formatin classjava.text.DateFormat
-
parse
public java.util.Date parse(java.lang.String source, java.text.ParsePosition pos)- Specified by:
parsein classjava.text.DateFormat
-
saveProperties
public void saveProperties(java.lang.StringBuilder buffer, int depth)Writes the format properties to output.- Specified by:
savePropertiesin interfaceChartFormat- Parameters:
buffer- the outputdepth- the depth of XML indent
-
readProperties
public void readProperties(org.w3c.dom.Element element)
Reads the XML properties of a chart format.- Specified by:
readPropertiesin interfaceChartFormat- Parameters:
element- DOM element- See Also:
ChartFormat.saveProperties(StringBuilder, int)
-
clone
public PatternDateTimeFormat clone()
Overrides Cloneable- Specified by:
clonein interfaceChartFormat- Overrides:
clonein classjava.text.DateFormat- Returns:
- the chart format
-
getName
protected java.lang.String getName()
FOR INTERNAL USE ONLY Returns the XML attribute name for this dataset.- Returns:
- the name.
-
-