Package | net.systemeD.halcyon |
Class | public class EntityUI |
Subclasses | MarkerUI, NodeUI, WayUI |
Property | Defined by | ||
---|---|---|---|
interactive : Boolean = true Does object respond to clicks?
| EntityUI | ||
paint : MapPaint
Reference to parent MapPaint
| EntityUI | ||
purgable : Boolean = true Can it be deleted when offscreen?
| EntityUI |
Property | Defined by | ||
---|---|---|---|
clearLimit : uint = 0 Sprite to clear back to
| EntityUI | ||
entity : Entity
The entity represented by this class.
| EntityUI | ||
hitzone : Sprite Hitzone for the sprite - must be set by subclass-specific code.
| EntityUI | ||
layer : Number = 0 Map layer
| EntityUI | ||
listenSprite : Sprite The clickable sprite that will receive events.
| EntityUI | ||
redrawDue : Boolean = false Redraw called while suspended?
| EntityUI | ||
sprites : Array Instances in display list
| EntityUI | ||
stateClasses : Object Special context-sensitive classes such as :hover.
| EntityUI | ||
styleList : StyleList
Current StyleList for this entity.
| EntityUI | ||
suspended : Boolean = false Is drawing suspended?
| EntityUI |
Method | Defined by | ||
---|---|---|---|
Constructor function, adds a bunch of event listeners.
| EntityUI | ||
applyStateClasses(tags:Object):Object
applies the state classes (eg :hover, :area) for this entityUI to the given list of 'real' tags.
| EntityUI | ||
doRedraw():Boolean
Actually do the redraw.
| EntityUI | ||
invalidateStyleList():void
| EntityUI | ||
protectSprites():void
| EntityUI | ||
redraw():Boolean
Request redraw
| EntityUI | ||
removeListenSprite():void
| EntityUI | ||
removeSprites():void
Remove all sprites associated with this entity, and clear hitzone.
| EntityUI | ||
resumeRedraw(event:EntityEvent):void
Resume redrawing.
| EntityUI | ||
setHighlight(settings:Object):void
| EntityUI | ||
setStateClass(stateType:String, isOn:*):Boolean
Sets a state class (eg :hover, :dupe) for this entityUI.
| EntityUI | ||
suspendRedraw(event:EntityEvent):void
Temporarily suspend redrawing of object.
| EntityUI | ||
toString():String
| EntityUI | ||
unprotectSprites():void
| EntityUI |
Method | Defined by | ||
---|---|---|---|
addToLayer(s:DisplayObject, spritetype:uint, sublayer:int = -1):void
Add object (stroke/fill/roadname) to layer sprite
| EntityUI | ||
attachRelationListeners():void
| EntityUI | ||
mouseEvent(event:MouseEvent):void
| EntityUI | ||
offsetSprites(x:Number, y:Number):void
| EntityUI | ||
relationAdded(event:RelationMemberEvent):void
| EntityUI | ||
relationRemoved(event:RelationMemberEvent):void
| EntityUI | ||
relationTagChanged(event:TagEvent):void
| EntityUI | ||
removeGenericEventListeners():void
Remove the default event listeners.
| EntityUI | ||
removeRelationListeners():void
| EntityUI | ||
setListenSprite():void
| EntityUI | ||
statusChanged(event:EntityEvent):void
| EntityUI | ||
tagChanged(event:TagEvent):void
| EntityUI |
Constant | Defined by | ||
---|---|---|---|
DEFAULT_TEXTFIELD_PARAMS : Object [static]
| EntityUI |
Constant | Defined by | ||
---|---|---|---|
CASINGSPRITE : uint = 1 | EntityUI | ||
FILLSPRITE : uint = 0 | EntityUI | ||
NAMESPRITE : uint = 3 | EntityUI | ||
NODECLICKSPRITE : uint = 1 | EntityUI | ||
STROKESPRITE : uint = 2 | EntityUI | ||
WAYCLICKSPRITE : uint = 0 | EntityUI |
clearLimit | property |
protected var clearLimit:uint = 0
Sprite to clear back to
entity | property |
protected var entity:Entity
The entity represented by this class.
hitzone | property |
protected var hitzone:Sprite
Hitzone for the sprite - must be set by subclass-specific code.
interactive | property |
public var interactive:Boolean = true
Does object respond to clicks?
layer | property |
protected var layer:Number = 0
Map layer
listenSprite | property |
protected var listenSprite:Sprite
The clickable sprite that will receive events.
paint | property |
public var paint:MapPaint
Reference to parent MapPaint
purgable | property |
public var purgable:Boolean = true
Can it be deleted when offscreen?
redrawDue | property |
protected var redrawDue:Boolean = false
Redraw called while suspended?
sprites | property |
protected var sprites:Array
Instances in display list
stateClasses | property |
protected var stateClasses:Object
Special context-sensitive classes such as :hover.
styleList | property |
protected var styleList:StyleList
Current StyleList for this entity.
suspended | property |
protected var suspended:Boolean = false
Is drawing suspended?
EntityUI | () | constructor |
public function EntityUI(entity:Entity, paint:MapPaint)
Constructor function, adds a bunch of event listeners.
Parametersentity:Entity |
|
paint:MapPaint |
addToLayer | () | method |
protected function addToLayer(s:DisplayObject, spritetype:uint, sublayer:int = -1):void
Add object (stroke/fill/roadname) to layer sprite
Parameterss:DisplayObject |
|
spritetype:uint |
|
sublayer:int (default = -1 )
|
applyStateClasses | () | method |
public function applyStateClasses(tags:Object):Object
applies the state classes (eg :hover, :area) for this entityUI to the given list of 'real' tags. This then gives you a modified list of tags used for styling the entityUI.
Parameterstags:Object |
Object |
attachRelationListeners | () | method |
protected function attachRelationListeners():void
doRedraw | () | method |
public function doRedraw():Boolean
Actually do the redraw. To be overwritten.
ReturnsBoolean |
invalidateStyleList | () | method |
public function invalidateStyleList():void
mouseEvent | () | method |
protected function mouseEvent(event:MouseEvent):void
Parameters
event:MouseEvent |
offsetSprites | () | method |
protected function offsetSprites(x:Number, y:Number):void
Parameters
x:Number |
|
y:Number |
protectSprites | () | method |
public function protectSprites():void
redraw | () | method |
public function redraw():Boolean
Request redraw
ReturnsBoolean |
relationAdded | () | method |
protected function relationAdded(event:RelationMemberEvent):void
Parameters
event:RelationMemberEvent |
relationRemoved | () | method |
protected function relationRemoved(event:RelationMemberEvent):void
Parameters
event:RelationMemberEvent |
relationTagChanged | () | method |
removeGenericEventListeners | () | method |
protected function removeGenericEventListeners():void
Remove the default event listeners.
removeListenSprite | () | method |
public function removeListenSprite():void
removeRelationListeners | () | method |
protected function removeRelationListeners():void
removeSprites | () | method |
public function removeSprites():void
Remove all sprites associated with this entity, and clear hitzone.
resumeRedraw | () | method |
setHighlight | () | method |
public function setHighlight(settings:Object):void
Parameters
settings:Object |
setListenSprite | () | method |
protected function setListenSprite():void
setStateClass | () | method |
public function setStateClass(stateType:String, isOn:*):Boolean
Sets a state class (eg :hover, :dupe) for this entityUI. If the state class has changed it will invalidate the style list to force the style to be recalculated during redraw.
ParametersstateType:String |
|
isOn:* |
Boolean |
statusChanged | () | method |
suspendRedraw | () | method |
public function suspendRedraw(event:EntityEvent):void
Temporarily suspend redrawing of object.
Parametersevent:EntityEvent |
tagChanged | () | method |
toString | () | method |
public function toString():String
Returns
String |
unprotectSprites | () | method |
public function unprotectSprites():void
CASINGSPRITE | constant |
protected const CASINGSPRITE:uint = 1
DEFAULT_TEXTFIELD_PARAMS | constant |
public static const DEFAULT_TEXTFIELD_PARAMS:Object
FILLSPRITE | constant |
protected const FILLSPRITE:uint = 0
NAMESPRITE | constant |
protected const NAMESPRITE:uint = 3
NODECLICKSPRITE | constant |
protected const NODECLICKSPRITE:uint = 1
STROKESPRITE | constant |
protected const STROKESPRITE:uint = 2
WAYCLICKSPRITE | constant |
protected const WAYCLICKSPRITE:uint = 0