This class enables one to store an entry in the defaultstable that isn't constructed until the first time it'slooked up with one of thegetXXX(key)methods.Lazy values are useful for defaults that are expensiveto construct or are seldom retrieved. The first timeaLazyValueis retrieved its "real value" is computedby callingLazyValue.createValue()and the realvalue is used to replace theLazyValuein theUIDefaultstable. Subsequent lookups for the same key returnthe real value. Here's an example of aLazyValuethat constructs aBorder:
Object borderLazyValue = new UIDefaults.LazyValue() {public Object createValue(UIDefaults table) {return new BorderFactory.createLoweredBevelBorder();}};uiDefaultsTable.put("MyBorder", borderLazyValue);
Creates the actual value retrieved from theUIDefaultstable. When an object that implements this interface isretrieved from the table, this method is used to createthe real value, which is then stored in the table andreturned to the calling method.