org.openide.explorer 6.5.22 1

Interface InplaceEditor.Factory

Enclosing interface:

public static interface InplaceEditor.Factory

A factory for inplace editor instances. A module may provide a property editor which provides a custom inplace editor for any properties of the type it edits. This is accomplished as follows:

A note about using InplaceEditor instances to render properties: If a custom property editor is, as is encouraged, using an instance of its InplaceEditor to paint the value rendered in table cells, this method must not return the instance being used for rendering - that instance may be reconfigured at any time with a different value in order to paint another cell on the property sheet.

Method Summary
 InplaceEditor getInplaceEditor()
          Fetch or create an inplace editor instance.

Method Detail


InplaceEditor getInplaceEditor()
Fetch or create an inplace editor instance. The system guarantees that there will never be more than one open inplace editor at a time, so it is safe to return the same static instance repeatedly from this method - when the editor is opened, it will be configured for the property it is editing. The optimal approach to implementing this method is to create the editor on the first call, and maintain a reference to it using a static field, so a single instance may be shared, but hold the reference to it using java.lang.ref.WeakReference or java.lang.ref.SoftReference, so that the instance may be garbage collected if it is no longer needed.

An inplace editor instance

org.openide.explorer 6.5.22 1

Built on July 11 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.