Module org.jhotdraw8.application
Class ModulepathResources
java.lang.Object
java.util.ResourceBundle
org.jhotdraw8.application.resources.ModulepathResources
- All Implemented Interfaces:
Serializable,Resources
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.ResourceBundle
ResourceBundle.Control -
Field Summary
Fields inherited from interface org.jhotdraw8.application.resources.Resources
PARENT_RESOURCE_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(@Nullable String key) Class<?> getFormatted(@NonNull String key, Object... arguments) Returns a formatted string using javax.text.MessageFormat.getKeys()Returns a java.lang.Module if the resources have been created with named Java module on a Java VM that supports modules.getResources(@NonNull Module module, @NonNull String baseName) Get the appropriate ResourceBundle subclass.static ModulepathResourcesGet the appropriate ResourceBundle subclass.static @NonNull ModulepathResourcesgetResources(@NonNull String moduleName, @NonNull String baseName) Get the appropriate ResourceBundle subclass.voidsetBaseClass(Class<?> baseClass) voidtoString()Methods inherited from class java.util.ResourceBundle
clearCache, clearCache, getBaseBundleName, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getObject, getString, getStringArray, handleKeySet, keySet, setParentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jhotdraw8.application.resources.Resources
configureAction, configureAction, configureButton, configureButton, configureMenu, configureMenuItem, configureToolBarButton, configureToolBarButton, format, getAcceleratorProperty, getInteger, getKeyCombination, getLargeIconProperty, getMnemonic, getMnemonicProperty, getRoot, getSmallIconProperty, getString, getTextProperty, getToolTipTextProperty, messageFormat, substitutePlaceholders, translateKeyStrokeToKeyCombination
-
Constructor Details
-
ModulepathResources
public ModulepathResources(@NonNull Module module, @NonNull String baseName, @NonNull Locale locale) throws MissingResourceException Creates a new object which wraps the provided resource bundle.- Parameters:
baseName- the base namelocale- the locale- Throws:
MissingResourceException
-
-
Method Details
-
getResources
public static @NonNull ModulepathResources getResources(@NonNull String moduleName, @NonNull String baseName) throws MissingResourceException Get the appropriate ResourceBundle subclass.- Parameters:
baseName- the base name- Returns:
- the resource bundle
- Throws:
MissingResourceException- See Also:
-
getResources
public static @NonNull Resources getResources(@NonNull Module module, @NonNull String baseName) throws MissingResourceException Get the appropriate ResourceBundle subclass.- Parameters:
baseName- the base name- Returns:
- the resource bundle
- Throws:
MissingResourceException- See Also:
-
getResources
public static ModulepathResources getResources(@NonNull Module module, @NonNull String baseName, @NonNull Locale locale) throws MissingResourceException Get the appropriate ResourceBundle subclass.- Parameters:
baseName- the base namelocale- the locale- Returns:
- the resource bundle
- Throws:
MissingResourceException- See Also:
-
asResourceBundle
- Specified by:
asResourceBundlein interfaceResources
-
containsKey
- Specified by:
containsKeyin interfaceResources- Overrides:
containsKeyin classResourceBundle
-
getBaseClass
- Specified by:
getBaseClassin interfaceResources
-
getBaseName
- Specified by:
getBaseNamein interfaceResources
-
setBaseClass
-
getFormatted
Returns a formatted string using javax.text.MessageFormat.- Specified by:
getFormattedin interfaceResources- Parameters:
key- the keyarguments- the arguments- Returns:
- formatted String
-
handleGetObject
- Specified by:
handleGetObjectin classResourceBundle
-
handleGetObjectRecursively
- Specified by:
handleGetObjectRecursivelyin interfaceResources
-
toString
-
getModule
Description copied from interface:ResourcesReturns a java.lang.Module if the resources have been created with named Java module on a Java VM that supports modules. -
getKeys
- Specified by:
getKeysin interfaceResources- Specified by:
getKeysin classResourceBundle
-
getParent
-
getLocale
- Specified by:
getLocalein interfaceResources- Overrides:
getLocalein classResourceBundle
-
setParent
-