Class CalendarUnitDateFormatter
Defines a default date formatter which is used by TradeChartAxisLabelFormatter
Implements
Inherited Members
Namespace:
Assembly: .dll
Syntax
public class CalendarUnitDateFormatter implements labelProviders.ICalendarUnitDateFormatter
Constructors
CalendarUnitDateFormatter()
Creates a new instance of CalendarUnitDateFormatter class.
Declaration
public CalendarUnitDateFormatter()
CalendarUnitDateFormatter(Locale locale, TimeZone timeZone)
Creates a new instance of CalendarUnitDateFormatter class.
Declaration
public CalendarUnitDateFormatter(Locale locale, TimeZone timeZone)
Parameters
Type | Name | Description |
---|---|---|
Locale | locale | The Locale to use by this formatter. |
TimeZone | timeZone | The TimeZone to use by this formatter. |
Methods
createFormatterForCalendarUnit(int calendarUnit)
Creates formatter for specified calendar unit
Declaration
protected labelProviders.SynchronizedSimpleDataFormatWrapper createFormatterForCalendarUnit(int calendarUnit)
Parameters
Type | Name | Description |
---|---|---|
int | calendarUnit | Calendar unit to use |
Returns
Type | Description |
---|---|
labelProviders.SynchronizedSimpleDataFormatWrapper | The date formatter created for specified calendar unit |
format(Date date, int calendarUnit)
Formats date for the axis according to the specified calendarUnit
.
Declaration
public CharSequence format(Date date, int calendarUnit)
Parameters
Type | Name | Description |
---|---|---|
Date | date | |
int | calendarUnit |
Returns
Type | Description |
---|---|
CharSequence |
getLocale()
Gets locale used by this date formatter.
Declaration
public final Locale getLocale()
Returns
Type | Description |
---|---|
Locale |
getTimeZone()
Gets time zone used by this date formatter.
Declaration
public final TimeZone getTimeZone()
Returns
Type | Description |
---|---|
TimeZone |
tryApplyDefaultFormat(String defaultFormat)
Tries to apply default format to underlying default DateFormat.
Declaration
public void tryApplyDefaultFormat(String defaultFormat)
Parameters
Type | Name | Description |
---|---|---|
String | defaultFormat |