public interface ILcdGXYEditorProvider<T extends ILcdGXYEditor> extends Serializable, Cloneable
ILcdGXYLayer
with an ILcdGXYEditor
to edit
the objects in the layers model.
An ILcdGXYEditorProvider
is part of an ILcdGXYLayer
and is responsible to
provide a suitable editor for every object that is in the layers model.
Since editors are stateful with regard to the object they are editing, their state has to be updated
by the editor provider before it is returned to the layer that will use the editor to edit the object based
on user interactions on the view. An implementation of the getGXYEditor(Object)
getGXYEditor} method
therefore should have the following structure:
public ILcdGXYEditor getGXYEditor(Object aObject) {
ILcdGXYEditor editor = ... // find the editor for the object
editor.setObject( aObject );
return editor;
}
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Redefines
Object.clone() to make it public. |
T |
getGXYEditor(Object aObject)
Finds an
ILcdGXYEditor that can be used to edit the object passed. |
T getGXYEditor(Object aObject)
ILcdGXYEditor
that can be used to edit the object passed.
The editor provider is responsible for setting the object to the editor before returning the editor. An implementation should therefore have the following structure:
public ILcdGXYEditor getGXYEditor(Object aObject) {
ILcdGXYEditor editor = ... // find the editor for the object
editor.setObject( aObject );
return editor;
}
aObject
- the object to find an editor forObject clone()
Object.clone()
to make it public.