Packageorg.openscales.core.handler.feature.draw
Classpublic class AbstractEditHandler
InheritanceAbstractEditHandler Inheritance Handler
ImplementsIEditFeature
SubclassesAbstractEditCollectionHandler, EditPointHandler

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



Public Properties
 PropertyDefined 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
 InheritedtoggleHandlerActivity : Function
Getter and setter of the callback function used when the handler's activity changes
Handler
Protected Properties
 PropertyDefined 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
 MethodDefined 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
  
This function is launched when you click on a vertice(Virtual or not) for the moment nothing is done
AbstractEditHandler
  
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
 MethodDefined by
 Inherited
Add the listeners to the associated map
Handler
 Inherited
Remove the listeners to the associated map
Handler
Property detail
activeproperty
active:Boolean  [write-only]

inheritDoc

Implementation
    public function set active(value:Boolean):void
_drawContainerproperty 
protected var _drawContainer:Sprite = null

This sprite is used to draw temporaries features during dragging

_featureClickHandlerproperty 
protected var _featureClickHandler:FeatureClickHandler = null

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

featureClickHandlerproperty 
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
_featureCurrentlyDragproperty 
protected var _featureCurrentlyDrag:Feature = null

The feature currently dragged

_isUsedAloneproperty 
protected var _isUsedAlone:Boolean = true

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

_layerToEditproperty 
protected var _layerToEdit:FeatureLayer = null

the layer concerned by the edition

layerToEditproperty 
layerToEdit:FeatureLayer  [read-write]Implementation
    public function get layerToEdit():FeatureLayer
    public function set layerToEdit(value:FeatureLayer):void
mapproperty 
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)