| 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 = 0Sprite to clear back to
| entity | property |
protected var entity:EntityThe entity represented by this class.
| hitzone | property |
protected var hitzone:SpriteHitzone for the sprite - must be set by subclass-specific code.
| interactive | property |
public var interactive:Boolean = trueDoes object respond to clicks?
| layer | property |
protected var layer:Number = 0Map layer
| listenSprite | property |
protected var listenSprite:SpriteThe clickable sprite that will receive events.
| paint | property |
public var paint:MapPaintReference to parent MapPaint
| purgable | property |
public var purgable:Boolean = trueCan it be deleted when offscreen?
| redrawDue | property |
protected var redrawDue:Boolean = falseRedraw called while suspended?
| sprites | property |
protected var sprites:ArrayInstances in display list
| stateClasses | property |
protected var stateClasses:ObjectSpecial context-sensitive classes such as :hover.
| styleList | property |
protected var styleList:StyleListCurrent StyleList for this entity.
| suspended | property |
protected var suspended:Boolean = falseIs 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):voidAdd object (stroke/fill/roadname) to layer sprite
Parameterss:DisplayObject |
|
spritetype:uint |
|
sublayer:int (default = -1) |
| applyStateClasses | () | method |
public function applyStateClasses(tags:Object):Objectapplies 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():BooleanActually do the redraw. To be overwritten.
ReturnsBoolean |
| invalidateStyleList | () | method |
public function invalidateStyleList():void
| mouseEvent | () | method |
protected function mouseEvent(event:MouseEvent):voidParameters
event:MouseEvent |
| offsetSprites | () | method |
protected function offsetSprites(x:Number, y:Number):voidParameters
x:Number |
|
y:Number |
| protectSprites | () | method |
public function protectSprites():void
| redraw | () | method |
public function redraw():BooleanRequest redraw
ReturnsBoolean |
| relationAdded | () | method |
protected function relationAdded(event:RelationMemberEvent):voidParameters
event:RelationMemberEvent |
| relationRemoved | () | method |
protected function relationRemoved(event:RelationMemberEvent):voidParameters
event:RelationMemberEvent |
| relationTagChanged | () | method |
| removeGenericEventListeners | () | method |
protected function removeGenericEventListeners():voidRemove the default event listeners.
| removeListenSprite | () | method |
public function removeListenSprite():void
| removeRelationListeners | () | method |
protected function removeRelationListeners():void
| removeSprites | () | method |
public function removeSprites():voidRemove all sprites associated with this entity, and clear hitzone.
| resumeRedraw | () | method |
| setHighlight | () | method |
public function setHighlight(settings:Object):voidParameters
settings:Object |
| setListenSprite | () | method |
protected function setListenSprite():void
| setStateClass | () | method |
public function setStateClass(stateType:String, isOn:*):BooleanSets 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):voidTemporarily 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