Packagecom.kapit.visualizer.renderer
Classpublic class GenericSprite
InheritanceGenericSprite Inheritance GenericObject Inheritance mx.core.UIComponent
ImplementsIGenericItem

GenericSprite is a visual type that represents any data entity. It can have its own ItemRenderer to visually represent its informational content (data attribute). In the case where this IGenericItem have logical children (expandCollapseChildren), the expand/collapse options are enabled and links status (logical or direct) are automatically updated.



Public Properties
 PropertyDefined by
 InheritedallowCollapseExpand : Boolean
Indicator if the Visualizer element should have an Expand/Collapse behaviour.
GenericObject
 InheritedbuttonPlacement : String
Expand Collapse Button Placement.
GenericObject
 InheritedclickFilters : Array
GenericObject
  CLICK_GLOW_DATA : Object
[static]
GenericSprite
 InheritedcollapseButtonClass : Class
Collapse Icon shown when the node is expanded.
GenericObject
 InheritedCOLLAPSE_GROUP : uint = 3
[static] "Group children are collapsed" Flag.
GenericObject
 InheritedcollapseParent : GenericObject
Parent of the Visualizer element if there is any.
GenericObject
 InheritedCOLLAPSE_SPRITE : uint = 0
[static] "Sprite children are collapsed" Flag.
GenericObject
 InheritedcollpaseOverButtonClass : Class
Collapse Icon shown when the node is expanded and the Expand/Collapse Button is rolled over.
GenericObject
 InheritedconnectedElements : Dictionary
GenericObject
 InheritedconsiderClick : Boolean
Indicator if Click events should be listened
GenericObject
 InheritedconsiderDoubleClick : Boolean
Indicator if Double Click events should be listened
GenericObject
 InheritedconsiderRollOut : Boolean
Indicator if Roll Out events should be listened
GenericObject
 InheritedconsiderRollOver : Boolean
Indicator if Roll Over events should be listened
GenericObject
 Inheriteddata : Object
GenericObject
 Inheriteddecorator : Sprite
Visualizer element decorator (Image, TextField, animation....)
GenericObject
  DEFAULT_DROP_SHADOW : Object
[static]
GenericSprite
  DEFAULT_GLOW_DATA : Object
[static]
GenericSprite
 InheritedexpandButtonClass : Class
Expand Icon shown when the node is collapsed.
GenericObject
 InheritedexpandCollapseElements : Array
Visualizer element collapse/expand children.
GenericObject
 InheritedEXPAND_GROUP : uint = 4
[static] "Group children are expanded" Flag.
GenericObject
 InheritedexpandOverButtonClass : Class
Expand Icon shown when the node is collapsed and the Expand/Collapse Button is rolled over.
GenericObject
 InheritedEXPAND_SPRITE : uint = 1
[static] "Sprite children are expanded" Flag.
GenericObject
  filters : Array
[write-only]
GenericSprite
  height : Number
GenericSprite
 InheritedhighlightFilters : Array
GenericObject
 InheritedidleFilers : Array
GenericObject
 InheritedIDLE_GROUP : uint = 5
[static] "Group with no Expand/Collapse functionality" Flag..
GenericObject
 InheritedIDLE_SPRITE : uint = 2
[static] "Sprite with no Expand/Collapse functionality" Flag.
GenericObject
  isMoveable : Boolean
Indicator if the sprite can be dragged or moved.
GenericSprite
  isSelected : Boolean
GenericSprite
  itemRenderer : Object
The custom item renderer for the sprite.
GenericSprite
 InheritedkDataItem : KDataItem
GenericObject
  level : uint
GenericSprite
 InheritedLINK : uint = 6
[static] Link Flag.
GenericObject
  LINKED_GLOW_DATA : Object
[static]
GenericSprite
 Inheritedlinks : Array
Links to which a GenericSprite or a GenericGroup is connected.
GenericObject
 Inheritedlock : Boolean
GenericObject
  loops : Array
GenericSprite
 Inheritedmanager : IManager
Visualizer element manager.
GenericObject
  oldIdleFilters : Array
GenericSprite
 InheritedshowExpandCollapseButton : Boolean
GenericObject
 Inheritedtype : uint
Visualizer element type indicating behavioural state.
GenericObject
 InheritedUID : String
Visualizer element Unique ID.
GenericObject
 Inheritedview : GenericView
Viewer to which the Visualizer element belongs
GenericObject
  width : Number
GenericSprite
Protected Properties
 PropertyDefined by
 Inherited_decoratorLayer : UIComponent
GenericObject
 Inherited_expandButton : Button
GenericObject
Public Methods
 MethodDefined by
  
GenericSprite(view:GenericView)
Constructor.
GenericSprite
  
addExpandCollapsedElement(child:GenericObject, collapsed:Boolean = true):void
Adds an expand/Collapse child to the sprite.
GenericSprite
  
animatedCollapse(collapsedElements:Array, recursiveCollpase:Boolean = true, parent:GenericObject = null, noEvent:Boolean = false, tweeners:Array = null, internalCollapse:Boolean = false, doAnimation:Boolean = true):void
Handles an animated collapse.
GenericSprite
  
collapse(withAnimation:Boolean = false, recursiveCollpase:Boolean = true, parent:GenericObject = null, noEvent:Boolean = false, doAnimation:Boolean = true):Array
Collapses and hides the children elements (if they exist) and dispatches an COLLAPSED_ELEMENTS event with reference to the collapsed elements.
GenericSprite
  
expand(noEvent:Boolean = false):void
Expands and displays the children elements (if they exist) and dispatches an EXAPNDED_ELEMENTS event with reference to the expanded elements.
GenericSprite
  
Returns the other link extremity given one valid link.
GenericSprite
 Inherited
initListeners(considerCLICK:Boolean = true, considerDoubleCLICK:Boolean = true, considerRollOUT:Boolean = true, considerRollOVER:Boolean = true, allowCollapseEXPAND:Boolean = true):void
nitialises and registers Visualizer element listeners.
GenericObject
  
initSprite(container:UIComponent, spriteManager:IManager, renderer:Object, uid:String = null, parent:GenericObject = null, type:uint = 2):void
nitializes the sprite, renderers it graphically according to its itemRenderer and adds it to its container.
GenericSprite
  
Removes an expand/Collapse child from the sprite.
GenericSprite
 Inherited
setPlacement(rectangle:Rectangle, updateReferences:Boolean = false):void
Sets the Visualizer element spatial parameters and updates its environment (links, decorators...).
GenericObject
  
staticCollapse(collapsedElements:Array, recursiveCollpase:Boolean = true, parent:GenericObject = null, noEvent:Boolean = false):void
Performs a collapse of the GenericSprite without performing animation.
GenericSprite
 Inherited
GenericObject
  
updateLinks():void
Updates in/out sprite links path according to its actual coordinates and redraws thesse links.
GenericSprite
Protected Methods
 MethodDefined by
 Inherited
GenericObject
 Inherited
handleClickEvent(event:Event):void
Handles click event if considered.
GenericObject
 Inherited
handleDoubleClickEvent(event:Event):void
Handles double click event if considered.
GenericObject
 Inherited
handleRollOutEvent(event:Event):void
Handles roll out event if considered.
GenericObject
 Inherited
handleRollOverEvent(event:Event):void
Handles roll over event if considered.
GenericObject
  
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
GenericSprite
Public Constants
 ConstantDefined by
 InheritedBUTTON_AT_BOTTOM_LEFT : String = "bottomLeft"
[static] xpand/Collapse Button placed at the bottom-left.
GenericObject
 InheritedBUTTON_AT_BOTTOM_RIGHT : String = "bottomRight"
[static] xpand/Collapse Button placed at the bottom-right.
GenericObject
 InheritedBUTTON_AT_MID_BOTTOM : String = "midBottom"
[static] xpand/Collapse Button placed at the bottom and X centered.
GenericObject
 InheritedBUTTON_AT_MID_LEFT : String = "midLeft"
[static] xpand/Collapse Button placed at the left and Y centered.
GenericObject
 InheritedBUTTON_AT_MID_RIGHT : String = "midRight"
[static] xpand/Collapse Button placed at the right and Y centered.
GenericObject
 InheritedBUTTON_AT_MID_TOP : String = "midTOP"
[static] xpand/Collapse Button placed at the top and X centered.
GenericObject
 InheritedBUTTON_AT_TOP_LEFT : String = "topLeft"
[static] xpand/Collapse Button placed at the top-left.
GenericObject
 InheritedBUTTON_AT_TOP_Right : String = "topRight"
[static] xpand/Collapse Button placed at the top-right.
GenericObject
Property detail
CLICK_GLOW_DATAproperty
public static var CLICK_GLOW_DATA:Object
DEFAULT_DROP_SHADOWproperty 
public static var DEFAULT_DROP_SHADOW:Object
DEFAULT_GLOW_DATAproperty 
public static var DEFAULT_GLOW_DATA:Object
filtersproperty 
filters:Array  [write-only]Implementation
    public function set filters(value:Array):void
heightproperty 
height:Number  [read-write]

Implementation
    public function get height():Number
    public function set height(value:Number):void
isMoveableproperty 
isMoveable:Boolean  [read-write]

Indicator if the sprite can be dragged or moved.

Implementation
    public function get isMoveable():Boolean
    public function set isMoveable(value:Boolean):void
isSelectedproperty 
isSelected:Boolean  [read-write]Implementation
    public function get isSelected():Boolean
    public function set isSelected(value:Boolean):void
itemRendererproperty 
itemRenderer:Object  [read-write]

The custom item renderer for the sprite. No default item renderer is defined. Custom Item renderer can be defined at initialisation time or in the IContentFactory associated with the view.

Implementation
    public function get itemRenderer():Object
    public function set itemRenderer(value:Object):void
levelproperty 
level:uint  [read-write]Implementation
    public function get level():uint
    public function set level(value:uint):void
LINKED_GLOW_DATAproperty 
public static var LINKED_GLOW_DATA:Object
loopsproperty 
public var loops:Array
oldIdleFiltersproperty 
public var oldIdleFilters:Array
widthproperty 
width:Number  [read-write]

Implementation
    public function get width():Number
    public function set width(value:Number):void
Constructor detail
GenericSprite()constructor
public function GenericSprite(view:GenericView)

Constructor.

Parameters
view:GenericView — View to which this link belongs.
Method detail
addExpandCollapsedElement()method
public function addExpandCollapsedElement(child:GenericObject, collapsed:Boolean = true):void

Adds an expand/Collapse child to the sprite. The child can be added in a collapsed or expanded status

Parameters
child:GenericObject — Child GenericSprite.
 
collapsed:Boolean (default = true) — Parent state after adding the element.
animatedCollapse()method 
public function animatedCollapse(collapsedElements:Array, recursiveCollpase:Boolean = true, parent:GenericObject = null, noEvent:Boolean = false, tweeners:Array = null, internalCollapse:Boolean = false, doAnimation:Boolean = true):void

Handles an animated collapse.

Parameters
collapsedElements:Array — indicates if collapse process must be recursive, meaning that it collapses all its subTree.
 
recursiveCollpase:Boolean (default = true) — Collapse action parent (used only for internal recursive collapse). When calling this method, this parameter must be ignored.
 
parent:GenericObject (default = null) — Indicates if the method should dispatch a a ELEMENTS_EXPANDED_COLLAPSED event.
 
noEvent:Boolean (default = false) — Tweeners used for animation.
 
tweeners:Array (default = null) — Indicates if the collapse action is under a parent collapse process.
 
internalCollapse:Boolean (default = false)
 
doAnimation:Boolean (default = true)
collapse()method 
public function collapse(withAnimation:Boolean = false, recursiveCollpase:Boolean = true, parent:GenericObject = null, noEvent:Boolean = false, doAnimation:Boolean = true):Array

Collapses and hides the children elements (if they exist) and dispatches an COLLAPSED_ELEMENTS event with reference to the collapsed elements.

Parameters
withAnimation:Boolean (default = false) — Collapse elements with animation.
 
recursiveCollpase:Boolean (default = true) — indicates if collapse process must be recursive, meaning that it collapses all its subTree.
 
parent:GenericObject (default = null) — Collapse action parent (used only for internal recursive collapse). When calling this method, this parameter must be ignored.
 
noEvent:Boolean (default = false) — Indicates if the method should dispatch a a ELEMENTS_EXPANDED_COLLAPSED event.
 
doAnimation:Boolean (default = true)

Returns
Array — Collapsed Elements.
expand()method 
public function expand(noEvent:Boolean = false):void

Expands and displays the children elements (if they exist) and dispatches an EXAPNDED_ELEMENTS event with reference to the expanded elements.

Parameters
noEvent:Boolean (default = false) — Indicates if the method should dispatch a a ELEMENTS_EXPANDED_COLLAPSED event.
getOtherSprite()method 
public function getOtherSprite(link:GenericLink):GenericObject

Returns the other link extremity given one valid link.

Parameters
link:GenericLink — Link connecting the sprite to another extremity.

Returns
GenericObject — Link extremity.
initSprite()method 
public function initSprite(container:UIComponent, spriteManager:IManager, renderer:Object, uid:String = null, parent:GenericObject = null, type:uint = 2):void

nitializes the sprite, renderers it graphically according to its itemRenderer and adds it to its container.

Parameters
container:UIComponent — Container to which this sprite belongs.
 
spriteManager:IManager — Sprite manager that controls dispatched events and link behaviour (controller).
 
renderer:Object — Item renderer of the sprite.
 
uid:String (default = null) — Unique Identifier of the sprite. If null, a sprite UID will be assigned by RendererFactory.
 
parent:GenericObject (default = null) — Collapse/Expand Parent controlling the visibility of the sprite.
 
type:uint (default = 2) — Sprite type (EXPAND_SPRITE, COLLAPSE_SPRITE, or IDLE_SPRITE).
removeExpandCollapsedElement()method 
public function removeExpandCollapsedElement(child:GenericObject):void

Removes an expand/Collapse child from the sprite.

Parameters
child:GenericObject
staticCollapse()method 
public function staticCollapse(collapsedElements:Array, recursiveCollpase:Boolean = true, parent:GenericObject = null, noEvent:Boolean = false):void

Performs a collapse of the GenericSprite without performing animation.

Parameters
collapsedElements:Array — indicates if collapse process must be recursive, meaning that it collapses all its subTree.
 
recursiveCollpase:Boolean (default = true) — Collapse action parent (used only for internal recursive collapse). When calling this method, this parameter must be ignored.
 
parent:GenericObject (default = null) — Indicates if the method should dispatch a a ELEMENTS_EXPANDED_COLLAPSED event.
 
noEvent:Boolean (default = false)
updateDisplayList()method 
protected override function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):voidParameters
unscaledWidth:Number
 
unscaledHeight:Number
updateLinks()method 
public override function updateLinks():void

Updates in/out sprite links path according to its actual coordinates and redraws thesse links.