/** * Invalides the current value so that the next invocation of <code>createValue</code> will ask for the property * again. */ public void invalidate() { if (pcl != null) { toolkit.removePropertyChangeListener(getKey(), pcl); toolkit = null; pcl = null; value = null; } }
/** * Returns the value from the desktop. */ protected Object getValueFromDesktop() { if (this.toolkit == null) { this.toolkit = Toolkit.getDefaultToolkit(); } Object value = toolkit.getDesktopProperty(getKey()); pcl = new WeakPCL(this, toolkit); toolkit.addPropertyChangeListener(getKey(), pcl); return value; }