public final class ResourceBundleAccessor extends Object implements StringAndIconResourceAccessor
StringAndIconResourceAccessor
.Note: This class is not part of the public JGoodies Common API. It's intended for implementation purposes only. The class's API may change at any time.
Constructor and Description |
---|
ResourceBundleAccessor(ResourceBundle bundle) |
Modifier and Type | Method and Description |
---|---|
Icon |
getIcon(String key)
Returns the Icon resource associated with the given key.
|
String |
getString(String key,
Object... args)
Looks up and returns a String associated with the given resource key.
|
public ResourceBundleAccessor(ResourceBundle bundle)
public Icon getIcon(String key)
IconResourceAccessor
getIcon
in interface IconResourceAccessor
key
- the key used to look up the Iconpublic String getString(String key, Object... args)
String.format
with the
given arguments.In case the resource key is missing in the bundle, this implementation returns the key itself.
getString
in interface StringResourceAccessor
key
- the key in the resource bundleargs
- optional format arguments forwarded to String#format
String.format(String, Object...)
Copyright © 2014 JGoodies Software GmbH. All rights reserved.