Revision 32 org.gvsig.vectorediting/trunk/docs/dt-gvsig-edicion.rst
dt-gvsig-edicion.rst | ||
---|---|---|
140 | 140 |
* activateTool(String name, MapControl mapControl) :: void |
141 | 141 |
If mapControl has EditingBehavior added as tool, this method calls activateTool of EditingBehavior. |
142 | 142 |
|
143 |
* beginEdition(FLyrVect layer, DefaultViewPanel view) throws DataException :: void |
|
144 |
Notifies observers before and after to set store in edit mode. Checks if there is a EditingBehavior registered at MapControl. If there is not a EditingBehavior registered, it will instance one and it will add it to MapControl. Moreover, shows console at of view, set caret at console, adds observers and refresh menus. |
|
145 |
|
|
143 | 146 |
|
144 | 147 |
EditingService (extends Service) |
145 | 148 |
***************************************************** |
... | ... | |
149 | 152 |
* start() :: void |
150 | 153 |
* getNextParameter() :: EditingServiceParameter |
151 | 154 |
* setValueParameter(EditingServiceParameter param, Object value) :: void |
152 |
* drawOperation(Point mousePosition) :: Geometry |
|
155 |
* drawOperation(Point2D mousePosition) :: Geometry
|
|
153 | 156 |
* stop() :: void |
154 |
* Set<EditingServiceParameter> getParameters() :: Set<EditingServiceParameter
|
|
157 |
* List<EditingServiceParameter> getParameters() :: List<EditingServiceParameter
|
|
155 | 158 |
* void finishOperation(MapControl mapcontrol); |
156 |
* isValidvalue(EditingServiceParameter param, Object value); |
|
157 | 159 |
|
158 | 160 |
|
159 | 161 |
EditingServiceInfo |
... | ... | |
164 | 166 |
* Tool name getName :: String |
165 | 167 |
* Tool description (?use as contextual help?) getDescription :: String |
166 | 168 |
* Mouse icon. getMouseIcon() :: Image |
167 |
* The geometry type being managed. getSupportedPrimitiveGeometryType() :: int
|
|
169 |
* The geometry types being managed. getSupportedPrimitiveGeometryType() :: int[]
|
|
168 | 170 |
* If the tool creates new geometries. createsNewGeometries() :: boolean |
169 | 171 |
* The list of the parameters. getParameters() :: List<EditingServiceParameter> |
170 | 172 |
|
... | ... | |
186 | 188 |
* equals(EditingServiceParameter param) :: boolean |
187 | 189 |
Compares two parameters. |
188 | 190 |
|
191 |
* getConsoleMenssage() |
|
192 |
Get message to show on console. |
|
193 |
|
|
189 | 194 |
EditingBehavior |
190 | 195 |
***************************************************** |
191 | 196 |
|
192 | 197 |
* activateTool(String name); |
193 | 198 |
Activates tool creating an EditingService and ask for the next parameter. |
194 | 199 |
|
200 |
* void cleanBehavior(); |
|
201 |
Set activeService and currentParam to null and show a message on console to warn user that has to active a new tool. This operation will be called when user changes active layer or set layer in edit mode. |
|
202 |
|
|
195 | 203 |
SPI |
196 | 204 |
----- |
197 | 205 |
|
... | ... | |
201 | 209 |
EditingpProviderManager (extends ProviderManager) |
202 | 210 |
***************************************************** |
203 | 211 |
|
204 |
* No methods. |
|
212 |
* getServiceInfo(String name) throws ServiceException :: EditingServiceInfo |
|
213 |
Return information about one service. (see EditingServiceInfo) |
|
205 | 214 |
|
206 | 215 |
EditingProviderServices (extends ProviderServices) |
207 | 216 |
***************************************************** |
... | ... | |
267 | 276 |
* stop() :: void |
268 | 277 |
Cancels the execution of the tool. |
269 | 278 |
|
270 |
* Set<EditingServiceParameter> getParameters() :: Set<EditingServiceParameter
|
|
271 |
Returns a set with all parameters required by the tool
|
|
279 |
* List<EditingServiceParameter> getParameters() :: List<EditingServiceParameter
|
|
280 |
Returns a list with all parameters required by the tool
|
|
272 | 281 |
|
273 | 282 |
* finishOperation(MapControl mapcontrol) :: void |
274 | 283 |
Indicates that the tool doesn't need more values. |
275 | 284 |
|
276 |
* isValidValue(EditingServiceParameter param, Object value) :: boolean |
|
277 |
Check if the value is valid for the param received. |
|
278 |
|
|
279 | 285 |
* ?Ask for the Geometries or Features created, updated or removed by the tool? |
280 | 286 |
|
281 | 287 |
.. admonition:: Doubt |
... | ... | |
316 | 322 |
BaseEditingServiceExtension |
317 | 323 |
***************************************************** |
318 | 324 |
|
319 |
Default implementation to be used by editing tool plugins. Maybe BaseEditingServiceExtension implements execute action (activateTool) and each tool implements if it is enable or not.
|
|
325 |
Provides utils to extensions.
|
|
320 | 326 |
|
327 |
* protected getActiveView() :: DefaultViewPanel |
|
328 |
Returns active view. |
|
329 |
|
|
330 |
* protected canBeEdited(FLyrVect layer) :: boolean |
|
331 |
Returns true if layer can be edited. Return false if layer can not be edited. |
|
332 |
|
|
333 |
* protected getActiveLayer(DefaultViewPanel vista) :: FLyrVect |
|
334 |
Returns active layer from view that receives as parameter. |
|
335 |
|
|
336 |
* protected isApplicable(GeometryType[] supportedTypes, int shapeType) :: boolean |
|
337 |
Returns true if extension can be applied to that shapetype. |
|
338 |
|
|
339 |
* protected loadGeometryTypes(int[] types) :: GeometryType[] |
|
340 |
Return a collection of geo types from a collection of geometry.types. |
|
341 |
|
|
321 | 342 |
.. admonition:: Doubt |
322 | 343 |
|
323 | 344 |
Not sure if there is a mechanism to be able to have a single final implementation, or each extension must extend this one. |
Also available in: Unified diff