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
ConstructorsConstructorDescriptionModulepathResources(Module module, String baseName, Locale locale) Creates a new object which wraps the provided resource bundle. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(@Nullable String key) Class<?> getFormatted(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.@Nullable Resourcesstatic ResourcesgetResources(Module module, String baseName) Get the appropriate ResourceBundle subclass.static ModulepathResourcesgetResources(Module module, String baseName, Locale locale) Get the appropriate ResourceBundle subclass.static ModulepathResourcesgetResources(String moduleName, String baseName) Get the appropriate ResourceBundle subclass.protected @Nullable ObjecthandleGetObject(String key) @Nullable ObjectvoidsetBaseClass(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(Module module, String baseName, 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 ModulepathResources getResources(String moduleName, 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 Resources getResources(Module module, 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(Module module, String baseName, 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
-