public interface TextProvider
This SPI-interface enables the access to calendrical
standard text informations and will be instantiated by a
ServiceLoader-mechanism.
The motivation is mainly to override the language-dependent forms of JDK-defaults with respect to standard elements like months, weekdays etc. Specific text forms which are not contained in JDK will instead be supplied by help of properties-files in the "data"-folder.
Specification: Implementations must have a public no-arg constructor.
ServiceLoader| Modifier and Type | Method and Description |
|---|---|
java.lang.String[] |
eras(java.lang.String calendarType,
java.util.Locale locale,
TextWidth textWidth)
|
java.util.Locale[] |
getAvailableLocales()
Yields the supported languages.
|
java.util.ResourceBundle.Control |
getControl()
Returns a suitable object for controlling access to resources.
|
java.lang.String[] |
getSupportedCalendarTypes()
Defines the supported calendar types.
|
java.lang.String[] |
meridiems(java.lang.String calendarType,
java.util.Locale locale,
TextWidth textWidth)
|
java.lang.String[] |
months(java.lang.String calendarType,
java.util.Locale locale,
TextWidth textWidth,
OutputContext outputContext,
boolean leapForm)
|
java.lang.String[] |
quarters(java.lang.String calendarType,
java.util.Locale locale,
TextWidth textWidth,
OutputContext outputContext)
|
java.lang.String[] |
weekdays(java.lang.String calendarType,
java.util.Locale locale,
TextWidth textWidth,
OutputContext outputContext)
|
java.lang.String[] getSupportedCalendarTypes()
Defines the supported calendar types.
CalendarTypejava.util.Locale[] getAvailableLocales()
Yields the supported languages.
java.lang.String[] months(java.lang.String calendarType,
java.util.Locale locale,
TextWidth textWidth,
OutputContext outputContext,
boolean leapForm)
calendarType - calendar typelocale - language of text outputtextWidth - text widthoutputContext - output contextleapForm - use leap form (for example the hebrew
month "Adar II")?java.lang.String[] quarters(java.lang.String calendarType,
java.util.Locale locale,
TextWidth textWidth,
OutputContext outputContext)
calendarType - calendar typelocale - language of text outputtextWidth - text widthoutputContext - output contextjava.lang.String[] weekdays(java.lang.String calendarType,
java.util.Locale locale,
TextWidth textWidth,
OutputContext outputContext)
calendarType - calendar typelocale - language of text outputtextWidth - text widthoutputContext - output contextjava.lang.String[] eras(java.lang.String calendarType,
java.util.Locale locale,
TextWidth textWidth)
calendarType - calendar typelocale - language of text outputtextWidth - text widthjava.lang.String[] meridiems(java.lang.String calendarType,
java.util.Locale locale,
TextWidth textWidth)
calendarType - calendar typelocale - language of text outputtextWidth - text widthjava.util.ResourceBundle.Control getControl()
Returns a suitable object for controlling access to resources.