Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.openide.explorer 6.5.22 1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.openide.explorer.propertysheet
Interface InplaceEditor.Factory

Enclosing interface:
  InplaceEditor

    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:

- The property editor must implement `ExPropertyEditor`.
- In the `attachEnv()` method of that interface, it must call `env.registerInplaceEditorFactory()`, passing an instance of `InplaceEditor.Factory`. If a user attempts to edit the property, the inplace editor returned from `Factory.getInplaceEditor()` will be used.

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

### getInplaceEditor

    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.

  Returns:
    An inplace editor instance

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.openide.explorer 6.5.22 1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Built on December 7 2006. | Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.