API Documentation | All Packages | All Classes | Index | Frames No Frames |
Class AbstractEditHandler

Package | org.openscales.core.handler.feature.draw
Class | public class AbstractEditHandler
Inheritance | AbstractEditHandler Handler
Implements | IEditFeature
Subclasses | AbstractEditCollectionHandler, EditPointHandler

Abstract edit handler never instanciate this class This class is the based class for the edition handlers

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined by
--- | --- | ---
|  | active : Boolean [write-only] inheritDoc | AbstractEditHandler
|  | featureClickHandler : FeatureClickHandler [write-only] Use this function only this when you want to use the handler alone if you want to modify at the same time different type of geometries use the LayerEditionHandler | AbstractEditHandler
|  | layerToEdit : FeatureLayer | AbstractEditHandler
|  | map : Map [write-only] Map Settings | AbstractEditHandler
|  | toggleHandlerActivity : Function Getter and setter of the callback function used when the handler's activity changes | Handler

Protected Properties

| Property | Defined by
--- | --- | ---
|  | _drawContainer : Sprite = null This sprite is used to draw temporaries features during dragging | AbstractEditHandler
|  | _featureClickHandler : FeatureClickHandler = null his handler is used for differenciation of mouse actions(drag drop clikc double click) during the edition . | AbstractEditHandler
|  | _featureCurrentlyDrag : Feature = null The feature currently dragged | AbstractEditHandler
|  | _isUsedAlone : Boolean = true To specify that the edition Handler is used alone(PathHandler || PointHandler etc) or associated with other handlers in LayerEditionHandler | AbstractEditHandler
|  | _layerToEdit : FeatureLayer = null the layer concerned by the edition | AbstractEditHandler

Public Methods

| Method | Defined by
--- | --- | ---
|  | AbstractEditHandler(map:Map = null, active:Boolean = false, layerToEdit:FeatureLayer = null, featureClickHandler:FeatureClickHandler = null, drawContainer:Sprite = null, isUsedAlone:Boolean = true) Constructor | AbstractEditHandler
|  | dragVerticeStart(vectorfeature:PointFeature):void This function is launched when you are dragging a vertice(Virtual or not) | AbstractEditHandler
|  | dragVerticeStop(vectorfeature:PointFeature):void This function is launched when you stop dragging a vertice(Virtual or not) | AbstractEditHandler
|  | editionModeStart():Boolean Start the edition Mode | AbstractEditHandler
|  | editionModeStop():Boolean Stop the edition Mode | AbstractEditHandler
|  | featureClick(event:FeatureEvent):void This function is launched when you click on a vertice(Virtual or not) for the moment nothing is done | AbstractEditHandler
|  | featureDoubleClick(event:FeatureEvent):void This function is launched when you double click on a vertice(Virtual or not) For the moment the vertice is deleted | AbstractEditHandler
|  | refreshEditedfeatures(event:MapEvent = null):void This function is used to start the edition of all vector features in a layer only use by LayerEditionHandler | AbstractEditHandler

Protected Methods
Hide Inherited Protected Methods
Show Inherited Protected Methods

| Method | Defined by
--- | --- | ---
|  | registerListeners():void Add the listeners to the associated map | Handler
|  | unregisterListeners():void Remove the listeners to the associated map | Handler

Property detail

active | property

`active:Boolean` [write-only]

inheritDoc

Implementation
`public function set active(value:Boolean):void`

_drawContainer | property |

`protected var _drawContainer:Sprite = null`

This sprite is used to draw temporaries features during dragging

_featureClickHandler | property |

`protected var _featureClickHandler:FeatureClickHandler = null`

his handler is used for differenciation of mouse actions(drag drop clikc double click) during the edition .

featureClickHandler | property |

`featureClickHandler:FeatureClickHandler` [write-only]

Use this function only this when you want to use the handler alone if you want to modify at the same time different type of geometries use the LayerEditionHandler

Implementation
`public function set featureClickHandler(value:FeatureClickHandler):void`

_featureCurrentlyDrag | property |

`protected var _featureCurrentlyDrag:Feature = null`

The feature currently dragged

_isUsedAlone | property |

`protected var _isUsedAlone:Boolean = true`

To specify that the edition Handler is used alone(PathHandler || PointHandler etc) or associated with other handlers in LayerEditionHandler

_layerToEdit | property |

`protected var _layerToEdit:FeatureLayer = null`

the layer concerned by the edition

layerToEdit | property |

`layerToEdit:FeatureLayer` [read-write]Implementation
`public function get layerToEdit():FeatureLayer`
`public function set layerToEdit(value:FeatureLayer):void`

map | property |

`map:Map` [write-only]

Map Settings

Implementation
`public function set map(value:Map):void`
Constructor detail

AbstractEditHandler | () | constructor

`public function AbstractEditHandler(map:Map = null, active:Boolean = false, layerToEdit:FeatureLayer = null, featureClickHandler:FeatureClickHandler = null, drawContainer:Sprite = null, isUsedAlone:Boolean = true)`

Constructor

Parameters

| `map:Map` (default = `null`)`` — Map object
| `active:Boolean` (default = `false`)`` — for handler activation
| `layerToEdit:FeatureLayer` (default = `null`)`` — the layer concerned by the edition
| `featureClickHandler:FeatureClickHandler` (default = `null`)`` — This handler is used for differenciation of mouse actions
| `drawContainer:Sprite` (default = `null`)`` — This sprite is used to draw temporaries features during dragging
| `isUsedAlone:Boolean` (default = `true`)``

Method detail

dragVerticeStart | () | method

`public function dragVerticeStart(vectorfeature:PointFeature):void`

This function is launched when you are dragging a vertice(Virtual or not)

Parameters

| `vectorfeature:PointFeature`

dragVerticeStop | () | method |

`public function dragVerticeStop(vectorfeature:PointFeature):void`

This function is launched when you stop dragging a vertice(Virtual or not)

Parameters

| `vectorfeature:PointFeature`

editionModeStart | () | method |

`public function editionModeStart():Boolean`

Start the edition Mode

Returns

| `Boolean`

editionModeStop | () | method |

`public function editionModeStop():Boolean`

Stop the edition Mode

Returns

| `Boolean`

featureClick | () | method |

`public function featureClick(event:FeatureEvent):void`

This function is launched when you click on a vertice(Virtual or not) for the moment nothing is done

Parameters

| `event:FeatureEvent`

featureDoubleClick | () | method |

`public function featureDoubleClick(event:FeatureEvent):void`

This function is launched when you double click on a vertice(Virtual or not) For the moment the vertice is deleted

Parameters

| `event:FeatureEvent`

refreshEditedfeatures | () | method |

`public function refreshEditedfeatures(event:MapEvent = null):void`

This function is used to start the edition of all vector features in a layer only use by LayerEditionHandler

Parameters

| `event:MapEvent` (default = `null`)``