public class UIDefaultsLookup
extends java.lang.Object
setTrace(boolean) and setDebug(boolean) to turn on the trace so that it will print out which UIDefaults we
are trying to get.| Constructor and Description |
|---|
UIDefaultsLookup() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
get(java.lang.Object key) |
static java.lang.Object |
get(java.lang.Object key,
java.util.Locale l) |
static boolean |
getBoolean(java.lang.Object key)
If the value of
key is boolean, return the boolean value, otherwise return false. |
static boolean |
getBoolean(java.lang.Object key,
boolean defaultValue)
If the value of
key is boolean, return the boolean value, otherwise return false. |
static boolean |
getBoolean(java.lang.Object key,
java.util.Locale l)
If the value of
key for the given Locale is boolean, return the boolean value,
otherwise return false. |
static javax.swing.border.Border |
getBorder(java.lang.Object key)
If the value of
key is a Border return it, otherwise return null. |
static javax.swing.border.Border |
getBorder(java.lang.Object key,
java.util.Locale l)
If the value of
key for the given Locale is a Border return it, otherwise
return null. |
static java.awt.Color |
getColor(java.lang.Object key)
If the value of
key is a Color return it, otherwise return null. |
static java.awt.Color |
getColor(java.lang.Object key,
java.util.Locale l)
If the value of
key for the given Locale is a Color return it, otherwise
return null. |
static java.awt.Dimension |
getDimension(java.lang.Object key)
If the value of
key is a Dimension return it, otherwise return null. |
static java.awt.Dimension |
getDimension(java.lang.Object key,
java.util.Locale l)
If the value of
key for the given Locale is a Dimension return it,
otherwise return null. |
static java.awt.Font |
getFont(java.lang.Object key)
If the value of
key is a Font return it, otherwise return null. |
static java.awt.Font |
getFont(java.lang.Object key,
java.util.Locale l)
If the value of
key for the given Locale is a Font return it, otherwise
return null. |
static javax.swing.Icon |
getIcon(java.lang.Object key)
If the value of
key is an Icon return it, otherwise return null. |
static javax.swing.Icon |
getIcon(java.lang.Object key,
java.util.Locale l)
If the value of
key for the given Locale is an Icon return it, otherwise
return null. |
static java.awt.Insets |
getInsets(java.lang.Object key)
If the value of
key is an Insets return it, otherwise return null. |
static java.awt.Insets |
getInsets(java.lang.Object key,
java.util.Locale l)
If the value of
key for the given Locale is an Insets return it, otherwise
return null. |
static int |
getInt(java.lang.Object key)
If the value of
key is an Integer return its integer value, otherwise return 0. |
static int |
getInt(java.lang.Object key,
java.util.Locale l)
If the value of
key for the given Locale is an Integer return its integer
value, otherwise return 0. |
static java.lang.String |
getString(java.lang.Object key)
If the value of
key is a String return it, otherwise return null. |
static java.lang.String |
getString(java.lang.Object key,
java.util.Locale l)
If the value of
key for the given Locale is a String return it, otherwise
return null. |
static void |
put(javax.swing.UIDefaults table,
java.lang.String key,
java.lang.Object value) |
static void |
setDebug(boolean debug)
Sets the debug mode.
|
static void |
setTrace(boolean trace)
Sets the trace mode.
|
public static void setDebug(boolean debug)
debug - true or false.public static void setTrace(boolean trace)
trace - true or false.public static void put(javax.swing.UIDefaults table,
java.lang.String key,
java.lang.Object value)
public static java.lang.Object get(java.lang.Object key)
public static java.lang.Object get(java.lang.Object key,
java.util.Locale l)
public static java.awt.Font getFont(java.lang.Object key)
key is a Font return it, otherwise return null.key - the desired keykey is a Font, return the Font object; otherwise
return nullpublic static java.awt.Font getFont(java.lang.Object key,
java.util.Locale l)
key for the given Locale is a Font return it, otherwise
return null.key - the desired keyl - the desired localekey and Locale is a Font, return the
Font object; otherwise return nullpublic static java.awt.Color getColor(java.lang.Object key)
key is a Color return it, otherwise return null.key - the desired keykey is a Color, return the Color object;
otherwise return nullpublic static java.awt.Color getColor(java.lang.Object key,
java.util.Locale l)
key for the given Locale is a Color return it, otherwise
return null.key - the desired keyl - the desired localekey and Locale is a Color, return the
Color object; otherwise return nullpublic static javax.swing.Icon getIcon(java.lang.Object key)
key is an Icon return it, otherwise return null.key - the desired keykey is an Icon, return the Icon object; otherwise
return nullpublic static javax.swing.Icon getIcon(java.lang.Object key,
java.util.Locale l)
key for the given Locale is an Icon return it, otherwise
return null.key - the desired keyl - the desired localekey and Locale is an Icon, return the
Icon object; otherwise return nullpublic static javax.swing.border.Border getBorder(java.lang.Object key)
key is a Border return it, otherwise return null.key - the desired keykey is a Border, return the Border object;
otherwise return nullpublic static javax.swing.border.Border getBorder(java.lang.Object key,
java.util.Locale l)
key for the given Locale is a Border return it, otherwise
return null.key - the desired keyl - the desired localekey and Locale is a Border, return the
Border object; otherwise return nullpublic static java.lang.String getString(java.lang.Object key)
key is a String return it, otherwise return null.key - the desired keykey is a String, return the String object;
otherwise return nullpublic static java.lang.String getString(java.lang.Object key,
java.util.Locale l)
key for the given Locale is a String return it, otherwise
return null.key - the desired keyl - the desired Localekey for the given Locale is a String, return the
String object; otherwise return nullpublic static int getInt(java.lang.Object key)
key is an Integer return its integer value, otherwise return 0.key - the desired keykey is an Integer, return its value, otherwise return 0public static int getInt(java.lang.Object key,
java.util.Locale l)
key for the given Locale is an Integer return its integer
value, otherwise return 0.key - the desired keyl - the desired localekey and Locale is an Integer, return its value,
otherwise return 0public static boolean getBoolean(java.lang.Object key)
key is boolean, return the boolean value, otherwise return false.key - an Object specifying the key for the desired boolean valuekey is boolean, return the boolean value, otherwise return false.public static boolean getBoolean(java.lang.Object key,
boolean defaultValue)
key is boolean, return the boolean value, otherwise return false.key - an Object specifying the key for the desired boolean valuedefaultValue - the default value if the key is missingkey is boolean, return the boolean value, otherwise return false.public static boolean getBoolean(java.lang.Object key,
java.util.Locale l)
key for the given Locale is boolean, return the boolean value,
otherwise return false.key - an Object specifying the key for the desired boolean valuel - the desired localekey and Locale is boolean, return the boolean value, otherwise
return false.public static java.awt.Insets getInsets(java.lang.Object key)
key is an Insets return it, otherwise return null.key - the desired keykey is an Insets, return the Insets object;
otherwise return nullpublic static java.awt.Insets getInsets(java.lang.Object key,
java.util.Locale l)
key for the given Locale is an Insets return it, otherwise
return null.key - the desired keyl - the desired localekey and Locale is an Insets, return the
Insets object; otherwise return nullpublic static java.awt.Dimension getDimension(java.lang.Object key)
key is a Dimension return it, otherwise return null.key - the desired keykey is a Dimension, return the Dimension object;
otherwise return nullpublic static java.awt.Dimension getDimension(java.lang.Object key,
java.util.Locale l)
key for the given Locale is a Dimension return it,
otherwise return null.key - the desired keyl - the desired localekey and Locale is a Dimension, return the
Dimension object; otherwise return null