Packagenet.systemeD.halcyon
Classpublic class WayUI
InheritanceWayUI Inheritance EntityUI

The graphical representation of a Way.



Public Properties
 PropertyDefined by
  centroid_x : Number
X coord of the centre of the area
WayUI
  centroid_y : Number
Y coord of the centre of the area
WayUI
  drawExcept : Number
vertex to draw exclusively, or not at all (used by DragWayNode)
WayUI
  drawOnly : Number
"
WayUI
  heading : Array
Angle at each node
WayUI
 Inheritedinteractive : Boolean = true
Does object respond to clicks?
EntityUI
  nameformat : TextFormat
WayUI
 Inheritedpaint : MapPaint
Reference to parent MapPaint
EntityUI
  patharea : Number
Area of the way
WayUI
  pathlength : Number
Total length of way
WayUI
 Inheritedpurgable : Boolean = true
Can it be deleted when offscreen?
EntityUI
Protected Properties
 PropertyDefined by
 InheritedclearLimit : uint = 0
Sprite to clear back to
EntityUI
 Inheritedentity : Entity
The entity represented by this class.
EntityUI
 Inheritedhitzone : Sprite
Hitzone for the sprite - must be set by subclass-specific code.
EntityUI
 Inheritedlayer : Number = 0
Map layer
EntityUI
 InheritedlistenSprite : Sprite
The clickable sprite that will receive events.
EntityUI
 InheritedredrawDue : Boolean = false
Redraw called while suspended?
EntityUI
 Inheritedsprites : Array
Instances in display list
EntityUI
 InheritedstateClasses : Object
Special context-sensitive classes such as :hover.
EntityUI
 InheritedstyleList : StyleList
Current StyleList for this entity.
EntityUI
 Inheritedsuspended : Boolean = false
Is drawing suspended?
EntityUI
Public Methods
 MethodDefined by
  
WayUI(way:Way, paint:MapPaint)
WayUI
 Inherited
applyStateClasses(tags:Object):Object
applies the state classes (eg :hover, :area) for this entityUI to the given list of 'real' tags.
EntityUI
  
doRedraw():Boolean
Go through the complex process of drawing this way, including applying styles, casings, fills, fonts...
WayUI
  
getNodeAt(x:Number, y:Number):Node
WayUI
  
hitTest(x:Number, y:Number):Way
WayUI
 Inherited
EntityUI
 Inherited
EntityUI
  
recalculate():void
Calculate pathlength, patharea, centroid_x, centroid_y, heading[].
WayUI
 Inherited
redraw():Boolean
Request redraw
EntityUI
  
redrawMultis():void
Redraw other ways that are the "outer" part of a multipolygon of which we are the "inner"
WayUI
  
WayUI
 Inherited
EntityUI
 Inherited
Remove all sprites associated with this entity, and clear hitzone.
EntityUI
  
Continue redrawing as normal.
WayUI
 Inherited
setHighlight(settings:Object):void
EntityUI
  
setHighlightOnNodes(settings:Object):void
Mark every node in this way as highlighted, and redraw it.
WayUI
 Inherited
setStateClass(stateType:String, isOn:*):Boolean
Sets a state class (eg :hover, :dupe) for this entityUI.
EntityUI
  
solidLines(g:Graphics, inners:Array):void
Draw solid polyline
WayUI
  
Don't redraw until further notice.
WayUI
 Inherited
toString():String
EntityUI
 Inherited
EntityUI
  
WayUI
Protected Methods
 MethodDefined by
 Inherited
addToLayer(s:DisplayObject, spritetype:uint, sublayer:int = -1):void
Add object (stroke/fill/roadname) to layer sprite
EntityUI
 Inherited
EntityUI
 Inherited
mouseEvent(event:MouseEvent):void
EntityUI
 Inherited
offsetSprites(x:Number, y:Number):void
EntityUI
  
WayUI
  
WayUI
  
WayUI
 Inherited
Remove the default event listeners.
EntityUI
 Inherited
EntityUI
 Inherited
EntityUI
 Inherited
EntityUI
 Inherited
tagChanged(event:TagEvent):void
EntityUI
Public Constants
 ConstantDefined by
 InheritedDEFAULT_TEXTFIELD_PARAMS : Object
[static]
EntityUI
Protected Constants
 ConstantDefined by
 InheritedCASINGSPRITE : uint = 1
EntityUI
 InheritedFILLSPRITE : uint = 0
EntityUI
 InheritedNAMESPRITE : uint = 3
EntityUI
 InheritedNODECLICKSPRITE : uint = 1
EntityUI
 InheritedSTROKESPRITE : uint = 2
EntityUI
 InheritedWAYCLICKSPRITE : uint = 0
EntityUI
Property detail
centroid_xproperty
public var centroid_x:Number

X coord of the centre of the area

centroid_yproperty 
public var centroid_y:Number

Y coord of the centre of the area

drawExceptproperty 
public var drawExcept:Number

vertex to draw exclusively, or not at all (used by DragWayNode)

drawOnlyproperty 
public var drawOnly:Number

"

headingproperty 
public var heading:Array

Angle at each node

nameformatproperty 
public var nameformat:TextFormat
pathareaproperty 
public var patharea:Number

Area of the way

pathlengthproperty 
public var pathlength:Number

Total length of way

Constructor detail
WayUI()constructor
public function WayUI(way:Way, paint:MapPaint)Parameters
way:Way
 
paint:MapPaint
Method detail
doRedraw()method
public override function doRedraw():Boolean

Go through the complex process of drawing this way, including applying styles, casings, fills, fonts...

Returns
Boolean
getNodeAt()method 
public function getNodeAt(x:Number, y:Number):NodeParameters
x:Number
 
y:Number

Returns
Node
hitTest()method 
public function hitTest(x:Number, y:Number):WayParameters
x:Number
 
y:Number

Returns
Way
recalculate()method 
public function recalculate():void

Calculate pathlength, patharea, centroid_x, centroid_y, heading[]. this could be made scale-independent - would speed up redraw

redrawMultis()method 
public function redrawMultis():void

Redraw other ways that are the "outer" part of a multipolygon of which we are the "inner"

relationAdded()method 
protected override function relationAdded(event:RelationMemberEvent):voidParameters
event:RelationMemberEvent
relationRemoved()method 
protected override function relationRemoved(event:RelationMemberEvent):voidParameters
event:RelationMemberEvent
relationTagChanged()method 
protected override function relationTagChanged(event:TagEvent):voidParameters
event:TagEvent
removeEventListeners()method 
public function removeEventListeners():void
resumeRedraw()method 
public override function resumeRedraw(event:EntityEvent):void

Continue redrawing as normal.

Parameters
event:EntityEvent
setHighlightOnNodes()method 
public function setHighlightOnNodes(settings:Object):void

Mark every node in this way as highlighted, and redraw it.

Parameters
settings:Object — Style state that it applies to.

See also

solidLines()method 
public function solidLines(g:Graphics, inners:Array):void

Draw solid polyline

Parameters
g:Graphics
 
inners:Array
suspendRedraw()method 
public override function suspendRedraw(event:EntityEvent):void

Don't redraw until further notice.

Parameters
event:EntityEvent
updateHighlights()method 
public function updateHighlights():void