Packageorg.openscales.core.control
Classpublic class DataOriginators
InheritanceDataOriginators Inheritance Control Inheritance flash.display.Sprite

Instances of DataOriginators are used to keep the different originator informations (logo / copyright) for all the layer of a map. This orignators are keep on a list which is updated when layers are changed (add / remove / visibility change...) This list is updated when the extent and the resolution of the map is changed This list is also updated when an originator is add or change on the layer. This list contains originators with no double. This DataOriginators class represents a list of originators to be stored on a DataOriginatorsDisplay component.



Public Properties
 PropertyDefined By
 Inheritedactive : Boolean
Control
 InheritedisReduced : Boolean
Indicates if the control display is normal or reduced
Control
  map : Map
[override] Set the map linked to this DataOriginators control
DataOriginators
  originators : Vector.<DataOriginator>
Number of layers refering to a same originator.
DataOriginators
  originatorsLayersCount : HashMap
Number of layers refering to a same originator.
DataOriginators
 Inheritedposition : Pixel
Control
Protected Properties
 PropertyDefined By
 Inherited_active : Boolean = false
Control
 Inherited_isReduced : Boolean
Control
 Inherited_map : Map = null
Control
Public Methods
 MethodDefined By
  
DataOriginators(position:Pixel = null)
Constructor of the class DataOriginators.
DataOriginators
  
addOriginator(originator:DataOriginator):void
Add an originator in the list If the originator exist : increment its layers count Else add The originator in the list and set the layers count to 1
DataOriginators
  
addOriginators(layer:Layer):void
Add all originators of one layer If the originator exist : increment its layers count Else add The originator in the list and set the layers count to 1
DataOriginators
  
destroy():void
[override]
DataOriginators
 Inherited
draw():void
Control
  
Find an originator in the originators list by its key.
DataOriginators
  
Call when a layerEvent occur Three LayerEvent are handled : LAYER_ADDED LAYER_REMOVED LAYER_VISIBLE_CHANGED After this events originators have to be updated
DataOriginators
  
Call when a MapEvent occur MapEvent handled : MOVE_END After this events originators have to be updated.
DataOriginators
 Inherited
to be overrided in sub classes
Control
  
Call when an LayerEvent.LAYER_CHANGED_ORIGINATORS occur (when the originators list of a layer changed) LayerEvent handled : LAYER_CHANGED_ORIGINATORS After this events originators have to be updated.
DataOriginators
  
removeAll():void
Remove all the originators.
DataOriginators
  
Remove an originator in the list If the originator layers count is > 1, decrement it Else remove the originator from the list
DataOriginators
  
Remove all originators of a given layer.
DataOriginators
 Inherited
resize(event:MapEvent):void
Control
 Inherited
toggleDisplay(event:Event = null):void
Control
  
Update the current list of originators according to the current layers in the map.
DataOriginators
Property Detail
mapproperty
map:Map[override]

Set the map linked to this DataOriginators control


Implementation
    public function get map():Map
    public function set map(value:Map):void
originatorsproperty 
originators:Vector.<DataOriginator>

Number of layers refering to a same originator.


Implementation
    public function get originators():Vector.<DataOriginator>
    public function set originators(value:Vector.<DataOriginator>):void
originatorsLayersCountproperty 
originatorsLayersCount:HashMap

Number of layers refering to a same originator.


Implementation
    public function get originatorsLayersCount():HashMap
    public function set originatorsLayersCount(value:HashMap):void
Constructor Detail
DataOriginators()Constructor
public function DataOriginators(position:Pixel = null)

Constructor of the class DataOriginators. The current layers on the map are use to create the fisrt list of originators This first list of originator is made by calling generateLinkedList.

Parameters
position:Pixel (default = null) — Indicates the position of this component in the current stage
Method Detail
addOriginator()method
public function addOriginator(originator:DataOriginator):void

Add an originator in the list If the originator exist : increment its layers count Else add The originator in the list and set the layers count to 1

Parameters

originator:DataOriginator — The DataOriginator to add in the list

addOriginators()method 
public function addOriginators(layer:Layer):void

Add all originators of one layer If the originator exist : increment its layers count Else add The originator in the list and set the layers count to 1

Parameters

layer:Layer — The layer which contains a list of originators to add.

destroy()method 
override public function destroy():void

findOriginatorByKey()method 
public function findOriginatorByKey(key:String):DataOriginator

Find an originator in the originators list by its key.

Parameters

key:String — key of the searched originator.

Returns
DataOriginator — The DataOriginator corresponding to the given name if find else return null
onLayerChanged()method 
public function onLayerChanged(event:LayerEvent):void

Call when a layerEvent occur Three LayerEvent are handled : LAYER_ADDED LAYER_REMOVED LAYER_VISIBLE_CHANGED After this events originators have to be updated

Parameters

event:LayerEvent — The event received.

onMapChanged()method 
public function onMapChanged(event:MapEvent):void

Call when a MapEvent occur MapEvent handled : MOVE_END After this events originators have to be updated.

Parameters

event:MapEvent — The event received.

onOriginatorListChange()method 
public function onOriginatorListChange(event:LayerEvent):void

Call when an LayerEvent.LAYER_CHANGED_ORIGINATORS occur (when the originators list of a layer changed) LayerEvent handled : LAYER_CHANGED_ORIGINATORS After this events originators have to be updated.

Parameters

event:LayerEvent — The event received.

removeAll()method 
public function removeAll():void

Remove all the originators.

removeOriginator()method 
public function removeOriginator(originator:DataOriginator):void

Remove an originator in the list If the originator layers count is > 1, decrement it Else remove the originator from the list

Parameters

originator:DataOriginator — The DataOriginator to remove from the list

removeOriginators()method 
public function removeOriginators(layer:Layer):void

Remove all originators of a given layer. If the originator layers count is > 1, decrement it Else remove the originator from the list

Parameters

layer:Layer — The layer which contains the originators list to remove.

updateOriginators()method 
public function updateOriginators():void

Update the current list of originators according to the current layers in the map. Reset the layers counters to zero. Remove originator if no layer refer to it anymore. Add an originator if a layer refer to one which is not in the list. or increment the number of layers for the existing originator.