Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |
getXXX(key)
methods.
Lazy values are useful for defaults that are expensive
to construct or are seldom retrieved. The first time
a LazyValue is retrieved its "real value" is computed
by calling LazyValue.createValue()
and the real
value is used to replace the LazyValue in the UIDefaults
table. Subsequent lookups for the same key return
the real value. Here's an example of a LazyValue that
constructs a Border:
Object borderLazyValue = new UIDefaults.LazyValue() { public Object createValue(UIDefaults table) { return new BorderFactory.createLoweredBevelBorder(); } }; uiDefaultsTable.put("MyBorder", borderLazyValue);
Method Summary | |
Object | createValue(UIDefaults table)
|
Method Detail |
public Object createValue(UIDefaults table)
Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |