|
Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components 11g Release 2 (11.1.2.0.0) E17492-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.adf.view.faces.bi.component.gantt.TimeAxisDateFormat
public class TimeAxisDateFormat
The date formatter for TimeAxis control. The behavior of this class may be customized by providing arrays of formatting patterns for time axis. When a date is formatted, its index is used to find a corresponding format pattern from the array (see format() method description for information about the date index). If the array is too small, the first pattern is used. Then the pattern is evaluated by Javas SimpleDateFormat class (see SimpleDateFormat documentation for more information). Within a pattern string, characters from A to Z and from a to z are reserved for pattern definition. They will be interpreted by SimpleDateFormat. Text can be quoted using single quotes (?) to avoid interpretation.
Field Summary | |
---|---|
static int |
LONG
Constants for long style pattern. |
static int |
SHORT
Constants for short style pattern. |
Constructor Summary | |
---|---|
TimeAxisDateFormat(java.util.Locale locale,
java.util.TimeZone timezone,
boolean isThaiGregorian)
Constructs an instance of TimeAxisDateFormat. |
Method Summary | |
---|---|
java.lang.String |
format(java.util.Date date,
int index,
java.lang.String scale)
Formats the specified date based on the time scale and index relative to the time scale. |
java.lang.String[] |
getScaleFormatPatterns(java.lang.String scale)
Gets custom format patterns for the major scale |
java.util.TimeZone |
getTimeZone()
Gets the time zone used when a date is formatted |
void |
setDefaultStylePattern(int style)
Specifies the default style pattern to use when date is formatted. |
void |
setScaleFormatPatterns(java.lang.String scale,
java.lang.String[] patterns)
Sets custom format patterns for the major scale |
void |
setTimeZone(java.util.TimeZone timeZone)
Sets the time zone to use when a date is formatted |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LONG
public static final int SHORT
Constructor Detail |
---|
public TimeAxisDateFormat(java.util.Locale locale, java.util.TimeZone timezone, boolean isThaiGregorian)
locale
- the locale for the formatter.timezone
- the timezone for the formatter.isThaiGregorian
- true
if the Thai Gregorian calendar is used. false
if otherwise.Method Detail |
---|
public void setDefaultStylePattern(int style)
style
- the style pattern to use when date is formattedoracle.adf.view.faces.bi.component.gantt.TimeAxisDateFormat.LONG
,
oracle.adf.view.faces.bi.component.gantt.TimeAxisDateFormat.SHORT
public java.lang.String format(java.util.Date date, int index, java.lang.String scale) throws InvalidScaleException
date
- the date to format.index
- the index relative to the time scale.scale
- the time scale in which the date is formatted.
InvalidScaleException
public void setScaleFormatPatterns(java.lang.String scale, java.lang.String[] patterns) throws InvalidScaleException
scale
- the time scale for which the format patterns are setpatterns
- the custom format patterns to set
InvalidScaleException
public java.lang.String[] getScaleFormatPatterns(java.lang.String scale) throws InvalidScaleException
scale
- the time scale for which the format patterns are set
InvalidScaleException
public void setTimeZone(java.util.TimeZone timeZone)
timeZone
- the time zone to use when a date is formattedpublic java.util.TimeZone getTimeZone()
|
Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components 11g Release 2 (11.1.2.0.0) E17492-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |