public abstract class ALspCreateEditorModel<T extends ILcdShape> extends Object
create
method is assumed
to be of the same type. If the type changes, an event should be fired internally using
the fireChangeEvent(javax.swing.event.ChangeEvent)
method.Constructor and Description |
---|
ALspCreateEditorModel() |
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener aChangeListener)
Adds a change listener to this create editor model, that is notified every time a call to
the
create method results in a new
type of shape. |
abstract T |
create(TLspContext aContext)
Creates a new shape, based on the given context.
|
protected void |
fireChangeEvent(ChangeEvent aEvent)
Subclasses of
ALspCreateEditorModel should call this method
every time a change occurs in the output type of the create(com.luciad.view.lightspeed.TLspContext)
method. |
void |
removeChangeListener(ChangeListener aChangeListener)
Removes a previously registered change listener
|
public abstract T create(TLspContext aContext)
fireChangeEvent
method should be called to notify all listeners of this create editor model.aContext
- context information. Contains the view
and layer for which the shape should be created.
Important here is that the created shape is defined
in the same reference as the model in this context.public void addChangeListener(ChangeListener aChangeListener)
create
method results in a new
type of shape.aChangeListener
- a change listenerfireChangeEvent(javax.swing.event.ChangeEvent)
public void removeChangeListener(ChangeListener aChangeListener)
aChangeListener
- a change listener that was previously registeredprotected void fireChangeEvent(ChangeEvent aEvent)
ALspCreateEditorModel
should call this method
every time a change occurs in the output type of the create(com.luciad.view.lightspeed.TLspContext)
method. This notifies all listeners so they can act accordingly to the changed state.aEvent
- the event to fire