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.ListResourceBundleThis resource bundle provides default values for custom components in this library.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceComponentResources.Provider
-
Field Summary
Fields Modifier and Type Field Description static java.util.ResourceBundleBUNDLE
-
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.ColorlookupColor(java.lang.String key)Look up a color value from Provider bundles with fallback toBUNDLE.static floatlookupFloat(java.lang.String key)Look up a float value from Provider bundles with fallback toBUNDLE.static javax.swing.IconlookupIcon(java.lang.String key)Look up an icon value from Provider bundles with fallback toBUNDLE.static intlookupInt(java.lang.String key)Look up an int value from Provider bundles with fallback toBUNDLE.static java.lang.StringlookupString(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
providerif 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
bundleif 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
bundleif 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
bundleif 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
bundleif 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:
getContentsin classjava.util.ListResourceBundle
-
-