|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.plaf.UIDefaultsLookup
public class UIDefaultsLookup
This class simply uses UIManager's get method to lookup the UIDefaults. We used this everywhere in our code so that
we have one central place to find out which UIDefaults we are using. Another good thing is you can use setTrace(boolean)
and setDebug(boolean)
to turn on the trace so that it will print out which UIDefaults we
are trying to get.
Constructor Summary | |
---|---|
UIDefaultsLookup()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UIDefaultsLookup()
Method Detail |
---|
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 Object get(Object key)
public static Object get(Object key, Locale l)
public static Font getFont(Object key)
key
is a Font
return it, otherwise return null
.
key
- the desired key
key
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 locale
key
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 key
key
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 locale
key
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 key
key
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 locale
key
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 key
key
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 locale
key
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 key
key
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 key
key
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 locale
key
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 value
key
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 missing
key
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 locale
key
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 key
key
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 locale
key
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 key
key
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 locale
key
and Locale
is a Dimension
, return the
Dimension
object; otherwise return null
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |