Class ALcyLspCreateControllerModel
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.
- Since:
- 2012.1
- See Also:
-
Constructor Summary
ModifierConstructorDescriptionprotected
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 -
Method Summary
Modifier and TypeMethodDescriptionfinal TLcyLspCreateLayerAction
Returns the action that is used to create a new layer in case no appropriate existing layer can be found.Returns the layer to which new objects will be added.Gets the layer to which the created object should be added.final ILcyLspMapComponent
Returns the map component on which the selected layers will be updated when new elements are created.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.final void
setCurrentLayer
(ILspInteractivePaintableLayer aCurrentLayer) Sets the layer in which new objects will be created.Methods inherited from class com.luciad.view.lightspeed.controller.manipulation.ALspCreateControllerModel
canceled, create, finished, getMaximumPointCount, getMinimumPointCount, getPaintRepresentation
-
Constructor Details
-
ALcyLspCreateControllerModel
protected ALcyLspCreateControllerModel()Creates a basic controller model. It expects the layer to be set before actually using it (seesetCurrentLayer(com.luciad.view.lightspeed.layer.ILspInteractivePaintableLayer)
- See Also:
-
ALcyLspCreateControllerModel
protected ALcyLspCreateControllerModel(ILcyLspMapComponent aMapComponent, TLcyLspCreateLayerAction aCreateLayerAction) Creates a new controller model that is capable of creating new layers for the given map- Parameters:
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 set
-
-
Method Details
-
getCurrentLayer
Returns the layer to which new objects will be added. If this is
null
, theTLcyLspCreateLayerAction
which is passed in the constructor will be used to create a new layer.- Returns:
- The layer to which new objects will be added
-
setCurrentLayer
Sets the layer in which new objects will be created.
- Parameters:
aCurrentLayer
- The layer to which new objects will be added
-
getCreateLayerAction
Returns the action that is used to create a new layer in case no appropriate existing layer can be found.
- Returns:
- The action
-
setCreateLayerAction
Sets the action that is used to create a new layer in case no appropriate existing layer can be found.
- Parameters:
aCreateLayerAction
- The new action
-
getLayer
Description copied from class:ALspCreateControllerModel
Gets the layer to which the created object should be added.- Specified by:
getLayer
in classALspCreateControllerModel
- Parameters:
aView
- the view the layer should belong to- Returns:
- the layer to create objects for, or null if the controller model cannot create objects for the given view
-
getMapComponent
Returns the map component on which the selected layers will be updated when new elements are created.- Returns:
- The map component. Can be
null
-