public class TimeAxisDateFormat
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static int |
LONG
Constants for long style pattern.
|
static int |
SHORT
Constants for short style pattern.
|
| Constructor and Description |
|---|
TimeAxisDateFormat(java.util.Locale locale,
java.util.TimeZone timezone,
boolean isThaiGregorian)
Constructs an instance of TimeAxisDateFormat.
|
| Modifier and Type | Method and Description |
|---|---|
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 |
formatTooltip(java.util.Date date,
int index,
java.lang.String scale)
Returns the tooltip for 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
|
public static final int LONG
public static final int SHORT
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.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.SHORTpublic java.lang.String formatTooltip(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.InvalidScaleExceptionpublic 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.InvalidScaleExceptionpublic 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 setInvalidScaleExceptionpublic java.lang.String[] getScaleFormatPatterns(java.lang.String scale)
throws InvalidScaleException
scale - the time scale for which the format patterns are setInvalidScaleExceptionpublic void setTimeZone(java.util.TimeZone timeZone)
timeZone - the time zone to use when a date is formattedpublic java.util.TimeZone getTimeZone()