Revision 21 org.gvsig.vectorediting/trunk/docs/dt-gvsig-edicion.rst
dt-gvsig-edicion.rst | ||
---|---|---|
96 | 96 |
|
97 | 97 |
With this context, an example use case of a editing tool to create a Curve geometry will be as follows: |
98 | 98 |
|
99 |
* The user clicks on the create Curve button, and the related Extension activates the CurveEditingTool. |
|
100 |
* The EditingBehavior asks the tool for a mouse icon to use, or uses a default one. |
|
101 |
* The EditingBehavior asks the tool for the first parameter. |
|
102 |
* The CurveEditingTool responds with a parameter of type *List of Points*. |
|
99 |
* The user clicks on the create Curve button, and the related Extension calls EditingManager and execute activateTool("CreateCurve", mapControl); |
|
100 |
* Manager gets the EditingBehavior associated with MapControl and calls activateTool("CreateCurve"); |
|
101 |
* The EditingVBehavior creates a EditingService with the rigth provider. |
|
102 |
* The EditingBehavior asks the service for a mouse icon to use, or uses a default one. |
|
103 |
* The EditingBehavior asks the service for the first parameter. |
|
104 |
* The EditingService responds with a parameter of type *List of Points*. |
|
103 | 105 |
* The EditingBehavior activates a message in the console asking for the X,Y values of the next Point. |
104 | 106 |
* The user has then three options to provide the point: |
105 | 107 |
* Click with the mouse left button in the map. |
... | ... | |
112 | 114 |
* With an option in the contextual menu. |
113 | 115 |
* This process is repited until the user ends the list of points. |
114 | 116 |
* The EditingBehavior notifies the tool the list of Points is finished. |
115 |
* The tool creates a curve with the provided points, and a Feature is created and inserted into the current Layer FeatureStore.
|
|
116 |
* The tool ends and it is activated again by default. The user may create another Curve or activate another tool.
|
|
117 |
* In any point of the process, the user may activate another tool o pulse the *Esc* to finish the current tool execution and start again. **NOTE: if the user has already provided some data, ?ask him to confirm the cancelation and lose the data?** |
|
117 |
* The service creates a curve with the provided points, and a Feature is created and inserted into the current Layer FeatureStore.
|
|
118 |
* The service ends and it is activated again by default. The user may create another Curve or activate another tool.
|
|
119 |
* In any point of the process, the user may activate another tool o pulse the *Esc* to finish the current tool execution and start again. **NOTE: if the user has already provided some data, ?ask him to confirm the cancelation and lose the data?** I think that we have to show a dialog to ask him to confirm the cancelation and lose data. Editing pluging has to allow user to disable this.
|
|
118 | 120 |
|
119 | 121 |
API |
120 | 122 |
---- |
... | ... | |
206 | 208 |
|
207 | 209 |
* Methods to create features / geometries. |
208 | 210 |
|
209 |
* createFeature (Feature feature, FeatureStore featureStore) |
|
210 |
* createGeometry(Geometry geometry, FeatureStore featureStore) |
|
211 |
* createGeometryAndSelect(Geometry geometry, FeatureStore featureStore) |
|
211 |
* insertFeatureIntoFeatureStore (Feature feature, FeatureStore featureStore) :: void |
|
212 |
* insertGeometryIntoFeatureStore(Geometry geometry, FeatureStore featureStore) :: void |
|
212 | 213 |
|
213 | 214 |
* Methods to delete features / geometries. |
214 | 215 |
|
215 |
* deleteFeature(Feature feature, FeatureStore featureStore)
|
|
216 |
* deleteGeometry(Geometry geometry, FeatureStore featureStore)
|
|
216 |
* deleteFeatureFromFeatureStore(Feature feature, FeatureStore featureStore) :: void
|
|
217 |
* deleteGeometryFromFeatureStore(Geometry geometry, FeatureStore featureStore) :: void
|
|
217 | 218 |
|
218 | 219 |
* Methods to update features / geometries |
219 | 220 |
|
220 |
* updateFeature(Feature feature, FeatureStore featureStore) |
|
221 |
* updateGeometry(Geometry geometry, FeatureStore featureStore) |
|
222 |
* updateGeometryAndSelect(Geometry geometry, FeatureStore featureStore) |
|
221 |
* updateFeatureInFeatureStore(Feature feature, FeatureStore featureStore) :: void |
|
222 |
* updateGeometryInFeatureStore(Geometry geometry, FeatureStore featureStore) :: void |
|
223 | 223 |
|
224 | 224 |
* ?Get the Symbol to draw a Geometry?. |
225 | 225 |
|
226 | 226 |
* Create new Features based on another ones, following the common criteria about the alphanumeric information: |
227 |
* New Features created from an old one (ex: Split): clone all data, but the primary keys. |
|
228 |
* New Feature created from a set of Features (ex: Union): for every attribute, if the values are the same for all the source Features, ignoring null values, clone it. Otherwise leave as null. |
|
229 | 227 |
|
230 |
.. admonition:: Note |
|
228 |
* splitFeatureAndInsertIntoFeatureStore(Feature featureToSplit, Geometry splitter, FeatureStore featureStore) :: void |
|
229 |
splitFeature(Feature featureToSplit, Geomety splitter) :: Collection<Feature> |
|
230 |
New Features created from an old one clone all data, but the primary keys. |
|
231 |
* unionFeaturesAndInsertIntoFeatureStore(Collecion<Feature> featuresToUnion, FeatureStore featureStore) :: void |
|
232 |
New Feature created from a set of Features (ex: Union): for every attribute, if the values are the same for all the source Features, |
|
233 |
ignoring null values, clone it. Otherwise leave as null. |
|
231 | 234 |
|
232 |
There is no methods to this. |
|
233 |
|
|
234 | 235 |
|
236 |
|
|
235 | 237 |
DefaultEditingServiceInfo and DefaultEditingServiceParameter |
236 | 238 |
************************************************************** |
237 | 239 |
|
... | ... | |
274 | 276 |
* isValidValue(EditingServiceParameter param, Object value) :: boolean |
275 | 277 |
Check if the value is valid for the param received. |
276 | 278 |
|
277 |
.. admonition:: Doubt |
|
278 |
|
|
279 |
Not sure if return a Set or a List. |
|
280 |
|
|
281 | 279 |
* ?Ask for the Geometries or Features created, updated or removed by the tool? |
282 | 280 |
|
283 | 281 |
.. admonition:: Doubt |
Also available in: Unified diff