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.
ServiceLoader| Modifier and Type | Method and Description |
|---|---|
String[] |
eras(String calendarType,
Locale locale,
TextWidth textWidth)
|
Locale[] |
getAvailableLocales()
Yields the supported languages.
|
ResourceBundle.Control |
getControl()
Returns a suitable object for controlling access to resources.
|
String[] |
getSupportedCalendarTypes()
Defines the supported calendar types.
|
String[] |
meridiems(String calendarType,
Locale locale,
TextWidth textWidth)
Deprecated.
Will be removed in next major release!
|
default String[] |
meridiems(String calendarType,
Locale locale,
TextWidth textWidth,
OutputContext outputContext)
|
String[] |
months(String calendarType,
Locale locale,
TextWidth textWidth,
OutputContext outputContext,
boolean leapForm)
|
String[] |
quarters(String calendarType,
Locale locale,
TextWidth textWidth,
OutputContext outputContext)
|
boolean |
supportsCalendarType(String calendarType)
Queries if a calendar type is supported by this text provider.
|
boolean |
supportsLanguage(Locale language)
Queries if a language is supported by this text provider.
|
String[] |
weekdays(String calendarType,
Locale locale,
TextWidth textWidth,
OutputContext outputContext)
|
boolean supportsCalendarType(String calendarType)
Queries if a calendar type is supported by this text provider.
calendarType - the calendar type to be checkedtrue if given calendar type is supported else falseCalendarTypeboolean supportsLanguage(Locale language)
Queries if a language is supported by this text provider.
language - the language to be checkedtrue if given language is supported else falseString[] getSupportedCalendarTypes()
Defines the supported calendar types.
CalendarTypeLocale[] getAvailableLocales()
Yields the supported languages.
Only the language part will be evaluated.
Locale.getLanguage()String[] months(String calendarType, 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")?String[] quarters(String calendarType, Locale locale, TextWidth textWidth, OutputContext outputContext)
calendarType - calendar typelocale - language of text outputtextWidth - text widthoutputContext - output contextString[] weekdays(String calendarType, Locale locale, TextWidth textWidth, OutputContext outputContext)
calendarType - calendar typelocale - language of text outputtextWidth - text widthoutputContext - output contextString[] eras(String calendarType, Locale locale, TextWidth textWidth)
calendarType - calendar typelocale - language of text outputtextWidth - text widthString[] meridiems(String calendarType, Locale locale, TextWidth textWidth)
calendarType - calendar typelocale - language of text outputtextWidth - text widthmeridiems(String, Locale, TextWidth, OutputContext)default String[] meridiems(String calendarType, Locale locale, TextWidth textWidth, OutputContext outputContext)
calendarType - calendar typelocale - language of text outputtextWidth - text widthoutputContext - output contextResourceBundle.Control getControl()
Returns a suitable object for controlling access to resources.
Copyright © 2014–2017. All rights reserved.