Packageorg.axiis.core
Classpublic class AxiisSprite
InheritanceAxiisSprite Inheritance mx.core.FlexSprite

AxiisSprites render individual drawingGeometries from layouts.



Public Properties
 PropertyDefined By
  activeState : State
[read-only] The state the AxiisSprite is currently renderering
AxiisSprite
  bounds : Rectangle
A rectangle representing the top-left corner and dimensions of the geometries this AxiisSprite renders.
AxiisSprite
  data : Object
The data that this AxiisSprite's geometries represent.
AxiisSprite
  dataTipAnchorPoint : Point
A point relative to the parentLayout that determines where anchored data tips should be positioned.
AxiisSprite
  dataTipContentClass : IFactory
A ClassFactory that creates the UIComponent that should be used in the data tip for this AxiisSprite.
AxiisSprite
  drawingSprites : Array
[read-only] The children of this AxiisSprite that act as the sprites that represent other data items from the layout's dataProvider.
AxiisSprite
  index : int
The index into the layout's dataProvider where data is found.
AxiisSprite
  label : String
The label for the object rendered.
AxiisSprite
  layout : AbstractLayout
The layout that created and parents this AxiisSprite.
AxiisSprite
  layoutSprites : Array
[read-only] The children of this AxiisSprite that act as the sprites for other layouts.
AxiisSprite
  scaleFill : Boolean = true
Whether or not the fills in this geometry should be scaled within the bounds rectangle.
AxiisSprite
  selected : Boolean = false
Selected will trigger on/off by double click state
AxiisSprite
  states : Array
An array of states that should be activated or deactivated as the user interacts with this AxiisSprite.
AxiisSprite
  value : Object
The value of the object being rendered.
AxiisSprite
Protected Properties
 PropertyDefined By
  stateToSpriteHash : Dictionary
A hash which maps states to the sprites that reflect the rendered states.
AxiisSprite
Public Methods
 MethodDefined By
  
Constructor.
AxiisSprite
  
Adds a AxiisSprite as one of the drawingSprites.
AxiisSprite
  
Adds a AxiisSprite as one of the layoutSprites.
AxiisSprite
  
Can be called external to sprite to clear states
AxiisSprite
  
dispose():void
Prepares the AxiisSprite for garbage collection.
AxiisSprite
  
render(state:State = null):void
Displays the child sprite for the state parameter and hides all others.
AxiisSprite
  
setState(state:State):void
Can be called external to sprite to force entry of state
AxiisSprite
  
storeGeometries(geometries:Array, state:State = null):void
Draws the specified geometries to a child of the AxiisSprite.
AxiisSprite
Protected Methods
 MethodDefined By
  
Makes all descendents enter the state specfied.
AxiisSprite
  
activateStateForParents(stateForAncestors:State, stateForAncestorSiblings:State):void
Makes all ancestores and their siblings enter the state specfied.
AxiisSprite
  
Makes all siblings (AxiisSprites with the same parent) enter the state specfied.
AxiisSprite
  
findStatesForEventType(eventType:String):State
Returns a state from the states array with the eventType as its enterStateEvent.
AxiisSprite
  
handleStateTriggeringEvent(event:Event):void
Handler for any event from the states enterStateEvent.
AxiisSprite
Public Constants
 ConstantDefined By
  EVENT_SELECTED : String = selected
[static]
AxiisSprite
  EVENT_UNSELECTED : String = unselected
[static]
AxiisSprite
Property Detail
activeStateproperty
activeState:State  [read-only]

The state the AxiisSprite is currently renderering


Implementation
    public function get activeState():State
boundsproperty 
public var bounds:Rectangle

A rectangle representing the top-left corner and dimensions of the geometries this AxiisSprite renders.

dataproperty 
public var data:Object

The data that this AxiisSprite's geometries represent.

dataTipAnchorPointproperty 
dataTipAnchorPoint:Point  [read-write]

A point relative to the parentLayout that determines where anchored data tips should be positioned.


Implementation
    public function get dataTipAnchorPoint():Point
    public function set dataTipAnchorPoint(value:Point):void
dataTipContentClassproperty 
public var dataTipContentClass:IFactory

A ClassFactory that creates the UIComponent that should be used in the data tip for this AxiisSprite.

drawingSpritesproperty 
drawingSprites:Array  [read-only]

The children of this AxiisSprite that act as the sprites that represent other data items from the layout's dataProvider.


Implementation
    public function get drawingSprites():Array
indexproperty 
public var index:int

The index into the layout's dataProvider where data is found.

labelproperty 
public var label:String

The label for the object rendered. This is the same label the object took on during the layout render cycle.

layoutproperty 
public var layout:AbstractLayout

The layout that created and parents this AxiisSprite.

layoutSpritesproperty 
layoutSprites:Array  [read-only]

The children of this AxiisSprite that act as the sprites for other layouts.


Implementation
    public function get layoutSprites():Array
scaleFillproperty 
public var scaleFill:Boolean = true

Whether or not the fills in this geometry should be scaled within the bounds rectangle.

selectedproperty 
public var selected:Boolean = false

Selected will trigger on/off by double click state

This property can be used as the source for data binding.

statesproperty 
states:Array  [read-write]

An array of states that should be activated or deactivated as the user interacts with this AxiisSprite.


Implementation
    public function get states():Array
    public function set states(value:Array):void

See also

State
stateToSpriteHashproperty 
protected var stateToSpriteHash:Dictionary

A hash which maps states to the sprites that reflect the rendered states.

valueproperty 
public var value:Object

The value of the object being rendered. This is the same value the object took on during the layout render cycle.

Constructor Detail
AxiisSprite()Constructor
public function AxiisSprite()

Constructor.

Method Detail
activateStateForChildren()method
protected function activateStateForChildren(state:State):void

Makes all descendents enter the state specfied.

Parameters

state:State — The state that the descendents should enter.

activateStateForParents()method 
protected function activateStateForParents(stateForAncestors:State, stateForAncestorSiblings:State):void

Makes all ancestores and their siblings enter the state specfied.

Parameters

stateForAncestors:State — The state that the ancestors should enter.
 
stateForAncestorSiblings:State — The state that the siblings of the ancestors should enter.

activateStateForSiblings()method 
protected function activateStateForSiblings(state:State):void

Makes all siblings (AxiisSprites with the same parent) enter the state specfied.

Parameters

state:State — The state that the siblings should enter.

addDrawingSprite()method 
public function addDrawingSprite(aSprite:AxiisSprite):void

Adds a AxiisSprite as one of the drawingSprites.

Parameters

aSprite:AxiisSprite

addLayoutSprite()method 
public function addLayoutSprite(aSprite:AxiisSprite):void

Adds a AxiisSprite as one of the layoutSprites.

Parameters

aSprite:AxiisSprite

clearStates()method 
public function clearStates():void

Can be called external to sprite to clear states

dispose()method 
public function dispose():void

Prepares the AxiisSprite for garbage collection.

findStatesForEventType()method 
protected function findStatesForEventType(eventType:String):State

Returns a state from the states array with the eventType as its enterStateEvent. If more than one state has the same event type, the one with at lowest index in the array is returned. If no state is found, the DEFAULT_STATE is returned.

Parameters

eventType:String — The event type to search for.

Returns
State
handleStateTriggeringEvent()method 
protected function handleStateTriggeringEvent(event:Event):void

Handler for any event from the states enterStateEvent. This begins the state change process and propagates state changes to the level specified by the state in question.

Parameters

event:Event

render()method 
public function render(state:State = null):void

Displays the child sprite for the state parameter and hides all others. If no state is provided, the default state is used instead.

Parameters

state:State (default = null) — The state this AxiisSprite should show.

setState()method 
public function setState(state:State):void

Can be called external to sprite to force entry of state

Parameters

state:State

storeGeometries()method 
public function storeGeometries(geometries:Array, state:State = null):void

Draws the specified geometries to a child of the AxiisSprite. The child is stored in a Dictionary keyed on the state passed in.

Parameters

geometries:Array
 
state:State (default = null)

Constant Detail
EVENT_SELECTEDConstant
public static const EVENT_SELECTED:String = selected

EVENT_UNSELECTEDConstant 
public static const EVENT_UNSELECTED:String = unselected