Package io.github.jonestimd.swing
Class ComponentResources
- java.lang.Object
-
- java.util.ResourceBundle
-
- java.util.ListResourceBundle
-
- io.github.jonestimd.swing.ComponentResources
-
public class ComponentResources extends java.util.ListResourceBundle
This resource bundle provides default values for custom components in this library.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ComponentResources.Provider
-
Field Summary
Fields Modifier and Type Field Description static java.util.ResourceBundle
BUNDLE
-
Constructor Summary
Constructors Constructor Description ComponentResources()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Object[][]
getContents()
static java.awt.Color
lookupColor(java.lang.String key)
Look up a color value from Provider bundles with fallback toBUNDLE
.static float
lookupFloat(java.lang.String key)
Look up a float value from Provider bundles with fallback toBUNDLE
.static javax.swing.Icon
lookupIcon(java.lang.String key)
Look up an icon value from Provider bundles with fallback toBUNDLE
.static int
lookupInt(java.lang.String key)
Look up an int value from Provider bundles with fallback toBUNDLE
.static java.lang.String
lookupString(java.lang.String key)
Look up a string value from Provider bundles with fallback toBUNDLE
.
-
-
-
Method Detail
-
lookupString
public static java.lang.String lookupString(java.lang.String key)
Look up a string value from Provider bundles with fallback toBUNDLE
.- Parameters:
key
- the resource key- Returns:
- the value from a
provider
if it exists, otherwise the value fromBUNDLE
- Throws:
java.util.MissingResourceException
- if the key is not defined in any of the bundles
-
lookupColor
public static java.awt.Color lookupColor(java.lang.String key)
Look up a color value from Provider bundles with fallback toBUNDLE
.- Parameters:
key
- the resource key- Returns:
- the value from
bundle
if it exists, otherwise the value fromBUNDLE
- Throws:
java.util.MissingResourceException
- if the key is not defined in any of the bundles
-
lookupIcon
public static javax.swing.Icon lookupIcon(java.lang.String key)
Look up an icon value from Provider bundles with fallback toBUNDLE
.- Parameters:
key
- the resource key- Returns:
- the value from
bundle
if it exists, otherwise the value fromBUNDLE
- Throws:
java.util.MissingResourceException
- if the key is not defined in any of the bundles
-
lookupInt
public static int lookupInt(java.lang.String key)
Look up an int value from Provider bundles with fallback toBUNDLE
.- Parameters:
key
- the resource key- Returns:
- the value from
bundle
if it exists, otherwise the value fromBUNDLE
- Throws:
java.util.MissingResourceException
- if the key is not defined in any of the bundles
-
lookupFloat
public static float lookupFloat(java.lang.String key)
Look up a float value from Provider bundles with fallback toBUNDLE
.- Parameters:
key
- the resource key- Returns:
- the value from
bundle
if it exists, otherwise the value fromBUNDLE
- Throws:
java.util.MissingResourceException
- if the key is not defined in any of the bundles
-
getContents
protected java.lang.Object[][] getContents()
- Specified by:
getContents
in classjava.util.ListResourceBundle
-
-