public abstract class ALcyLspCreateControllerModel extends ALspCreateControllerModel
Extension of ALspCreateControllerModel
which has a currentLayer
property. If
that property is null
, the given action to create a layer is used to make one.
It also changes the visible, selectable and editable properties of the layer to true
if needed. For the latter, a confirmation dialog is displayed. Furthermore, it selects the layer
that is being drawn on (ILcyLspMapComponent#setSelectedLayersAsList
, so that the user
knows about it.
ALcyGXYNewControllerModel
Modifier | Constructor and Description |
---|---|
protected |
ALcyLspCreateControllerModel()
Creates a basic controller model.
|
protected |
ALcyLspCreateControllerModel(ILcyLspMapComponent aMapComponent,
TLcyLspCreateLayerAction aCreateLayerAction)
Creates a new controller model that is capable of creating new layers for the given map
|
Modifier and Type | Method and Description |
---|---|
TLcyLspCreateLayerAction |
getCreateLayerAction()
Returns the action that is used to create a new layer in case no appropriate existing layer
can be found.
|
ILspInteractivePaintableLayer |
getCurrentLayer()
Returns the layer to which new objects will be added.
|
ILspInteractivePaintableLayer |
getLayer(ILspView aView)
Gets the layer to which the created object should be added.
|
ILcyLspMapComponent |
getMapComponent()
Returns the map component on which the selected layers will be updated when new elements are
created.
|
void |
setCreateLayerAction(TLcyLspCreateLayerAction aCreateLayerAction)
Sets the action that is used to create a new layer in case no appropriate existing layer can
be found.
|
void |
setCurrentLayer(ILspInteractivePaintableLayer aCurrentLayer)
Sets the layer in which new objects will be created.
|
canceled, create, finished, getMaximumPointCount, getMinimumPointCount, getPaintRepresentation
protected ALcyLspCreateControllerModel()
setCurrentLayer(com.luciad.view.lightspeed.layer.ILspInteractivePaintableLayer)
protected ALcyLspCreateControllerModel(ILcyLspMapComponent aMapComponent, TLcyLspCreateLayerAction aCreateLayerAction)
aMapComponent
- The map component on which the selected layer will be updated when
new elements are createdaCreateLayerAction
- The action that is used to create a new layer in case no current
layer is setpublic final ILspInteractivePaintableLayer getCurrentLayer()
Returns the layer to which new objects will be added. If this is null
, the TLcyLspCreateLayerAction
which is passed in the constructor will be used to create a new
layer.
public final void setCurrentLayer(ILspInteractivePaintableLayer aCurrentLayer)
Sets the layer in which new objects will be created.
aCurrentLayer
- The layer to which new objects will be addedpublic final TLcyLspCreateLayerAction getCreateLayerAction()
Returns the action that is used to create a new layer in case no appropriate existing layer can be found.
public final void setCreateLayerAction(TLcyLspCreateLayerAction aCreateLayerAction)
Sets the action that is used to create a new layer in case no appropriate existing layer can be found.
aCreateLayerAction
- The new actionpublic ILspInteractivePaintableLayer getLayer(ILspView aView)
ALspCreateControllerModel
getLayer
in class ALspCreateControllerModel
aView
- the view the layer should belong topublic final ILcyLspMapComponent getMapComponent()
null