Text styles define three sizes for the formatted text - 'full', 'short' and 'narrow'. Each of these three sizes is available in both 'standard' and 'stand-alone' variations.
The difference between the three sizes is obvious in most languages. For example, in English the 'full' month is 'January', the 'short' month is 'Jan' and the 'narrow' month is 'J'. Note that the narrow size is often not unique. For example, 'January', 'June' and 'July' all have the 'narrow' text 'J'.
The difference between the 'standard' and 'stand-alone' forms is trickier to describe as there is no difference in English. However, in other languages there is a difference in the word used when the text is used alone, as opposed to in a complete date. For example, the word used for a month when used alone in a date picker is different to the word used for month in association with a day and year in a date.
Implementation Specification
This is an immutable and thread-safe enum.
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| public static final TextStyle | FULL
Full text, typically the full description. |
| public static final TextStyle | FULL_STANDALONE
Full text for stand-alone use, typically the full description. |
| public static final TextStyle | NARROW
Narrow text, typically a single letter. |
| public static final TextStyle | NARROW_STANDALONE
Narrow text for stand-alone use, typically a single letter. |
| public static final TextStyle | SHORT
Short text, typically an abbreviation. |
| public static final TextStyle | SHORT_STANDALONE
Short text for stand-alone use, typically an abbreviation. |
| private final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public TextStyle | |
| public TextStyle | Returns: the stand-alone style with the same sizeReturns the stand-alone style with the same size. |
| public boolean | Returns: true if the style is a stand-alone style.Returns true if the Style is a stand-alone style. |
| pack-priv int | Returns: the correspondingCalendar styleReturns the |
| public static TextStyle | |
| public static TextStyle[] | |
| pack-priv int | Returns: the relative index value to time zone names arrayReturns the relative index value to an element of the |
| calendarStyle | back to summary |
|---|---|
| private final int calendarStyle | |
| FULL | back to summary |
|---|---|
| public static final TextStyle FULL Full text, typically the full description. For example, day-of-week Monday might output "Monday". | |
| FULL_STANDALONE | back to summary |
|---|---|
| public static final TextStyle FULL_STANDALONE Full text for stand-alone use, typically the full description. For example, day-of-week Monday might output "Monday". | |
| NARROW | back to summary |
|---|---|
| public static final TextStyle NARROW Narrow text, typically a single letter. For example, day-of-week Monday might output "M". | |
| NARROW_STANDALONE | back to summary |
|---|---|
| public static final TextStyle NARROW_STANDALONE Narrow text for stand-alone use, typically a single letter. For example, day-of-week Monday might output "M". | |
| SHORT | back to summary |
|---|---|
| public static final TextStyle SHORT Short text, typically an abbreviation. For example, day-of-week Monday might output "Mon". | |
| SHORT_STANDALONE | back to summary |
|---|---|
| public static final TextStyle SHORT_STANDALONE Short text for stand-alone use, typically an abbreviation. For example, day-of-week Monday might output "Mon". | |
| zoneNameStyleIndex | back to summary |
|---|---|
| private final int zoneNameStyleIndex | |
| TextStyle | back to summary |
|---|---|
| private TextStyle(int calendarStyle, int zoneNameStyleIndex) | |
| asNormal | back to summary |
|---|---|
| public TextStyle asNormal() Returns the normal style with the same size.
| |
| asStandalone | back to summary |
|---|---|
| public TextStyle asStandalone() Returns the stand-alone style with the same size.
| |
| isStandalone | back to summary |
|---|---|
| public boolean isStandalone() Returns true if the Style is a stand-alone style.
| |
| toCalendarStyle | back to summary |
|---|---|
| pack-priv int toCalendarStyle() Returns the
| |
| valueOf | back to summary |
|---|---|
| public static TextStyle valueOf(String name) | |
| values | back to summary |
|---|---|
| public static TextStyle[] values() | |
| zoneNameStyleIndex | back to summary |
|---|---|
| pack-priv int zoneNameStyleIndex() Returns the relative index value to an element of the
| |