public class UIDefaultsLookup extends 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 | Description |
---|---|
UIDefaultsLookup() |
Modifier and Type | Method | Description |
---|---|---|
static Object |
get(Object key) |
|
static Object |
get(Object key,
Locale l) |
|
static boolean |
getBoolean(Object key) |
If the value of
key is boolean, return the boolean value, otherwise return false. |
static boolean |
getBoolean(Object key,
boolean defaultValue) |
If the value of
key is boolean, return the boolean value, otherwise return false. |
static boolean |
getBoolean(Object key,
Locale l) |
If the value of
key for the given Locale is boolean, return the boolean value,
otherwise return false. |
static Border |
getBorder(Object key) |
If the value of
key is a Border return it, otherwise return null . |
static Border |
getBorder(Object key,
Locale l) |
If the value of
key for the given Locale is a Border return it, otherwise
return null . |
static Color |
getColor(Object key) |
If the value of
key is a Color return it, otherwise return null . |
static Color |
getColor(Object key,
Locale l) |
If the value of
key for the given Locale is a Color return it, otherwise
return null . |
static Dimension |
getDimension(Object key) |
If the value of
key is a Dimension return it, otherwise return null . |
static Dimension |
getDimension(Object key,
Locale l) |
If the value of
key for the given Locale is a Dimension return it,
otherwise return null . |
static Font |
getFont(Object key) |
If the value of
key is a Font return it, otherwise return null . |
static Font |
getFont(Object key,
Locale l) |
If the value of
key for the given Locale is a Font return it, otherwise
return null . |
static Icon |
getIcon(Object key) |
If the value of
key is an Icon return it, otherwise return null . |
static Icon |
getIcon(Object key,
Locale l) |
If the value of
key for the given Locale is an Icon return it, otherwise
return null . |
static Insets |
getInsets(Object key) |
If the value of
key is an Insets return it, otherwise return null . |
static Insets |
getInsets(Object key,
Locale l) |
If the value of
key for the given Locale is an Insets return it, otherwise
return null . |
static int |
getInt(Object key) |
If the value of
key is an Integer return its integer value, otherwise return 0. |
static int |
getInt(Object key,
Locale l) |
If the value of
key for the given Locale is an Integer return its integer
value, otherwise return 0. |
static String |
getString(Object key) |
If the value of
key is a String return it, otherwise return null . |
static String |
getString(Object key,
Locale l) |
If the value of
key for the given Locale is a String return it, otherwise
return null . |
static void |
put(UIDefaults table,
String key,
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(UIDefaults table, String key, Object value)
public static Font getFont(Object key)
key
is a Font
return it, otherwise return null
.key
- the desired keykey
is a Font
, return the Font
object; otherwise
return null
public static Font getFont(Object key, 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 null
public static Color getColor(Object key)
key
is a Color
return it, otherwise return null
.key
- the desired keykey
is a Color
, return the Color
object;
otherwise return null
public static Color getColor(Object key, 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 null
public static Icon getIcon(Object key)
key
is an Icon
return it, otherwise return null
.key
- the desired keykey
is an Icon
, return the Icon
object; otherwise
return null
public static Icon getIcon(Object key, 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 null
public static Border getBorder(Object key)
key
is a Border
return it, otherwise return null
.key
- the desired keykey
is a Border
, return the Border
object;
otherwise return null
public static Border getBorder(Object key, 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 null
public static String getString(Object key)
key
is a String
return it, otherwise return null
.key
- the desired keykey
is a String
, return the String
object;
otherwise return null
public static String getString(Object key, Locale l)
key
for the given Locale
is a String
return it, otherwise
return null
.key
- the desired keyl
- the desired Locale
key
for the given Locale
is a String
, return the
String
object; otherwise return null
public static int getInt(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(Object key, 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(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(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(Object key, 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 Insets getInsets(Object key)
key
is an Insets
return it, otherwise return null
.key
- the desired keykey
is an Insets
, return the Insets
object;
otherwise return null
public static Insets getInsets(Object key, 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 null
public static Dimension getDimension(Object key)
key
is a Dimension
return it, otherwise return null
.key
- the desired keykey
is a Dimension
, return the Dimension
object;
otherwise return null
public static Dimension getDimension(Object key, 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