This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
javax.swing
interface UIDefaults.LazyValue
- All Known Implementing Classes:
- UIDefaults.LazyInputMap, UIDefaults.ProxyLazyValue
public static interface UIDefaults.LazyValue
This class enables one to store an entry in the defaults
table that isn't constructed until the first time it's
looked up with one of the 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 |
Creates the actual value retrieved from the UIDefaults
table.
|
createValue
public Object createValue(UIDefaults table)
-
Creates the actual value retrieved from the
UIDefaults
table. When an object that implements this interface is
retrieved from the table, this method is used to create
the real value, which is then stored in the table and
returned to the calling method.
- Parameters:
table
- a UIDefaults
table
- Returns:
- the created
Object
This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
This page displays the
Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
The official Sun™ documentation can be found here at
http://java.sun.com/javase/6/docs/api/.