Packageorg.axiis.core
Classpublic class BaseLayout
InheritanceBaseLayout Inheritance AbstractLayout Inheritance flash.events.EventDispatcher
Subclasses AxisBase, ConcentricWedgeLayout, GroupingBase, HBoxLayout, HCategoryAxis, RepeaterLayout, VBoxLayout

BaseLayout is a data driven layout engine that uses GeometryRepeaters and PropertyModifiers to transform geometries before drawing them to the screen.



Public Properties
 PropertyDefined By
 Inheritedbounds : Rectangle
A rectangle that acts as the bounding area for this layout
AbstractLayout
  buttonMode : Boolean = false
The value of the buttonMode flag to set for each child Sprite
BaseLayout
 InheritedchildSprites : Array
[read-only] The AxiisSprites this layout has created to render each item in its dataProvider.
AbstractLayout
 InheritedcurrentDatum : *
[read-only] The item in the dataProvider that the layout is currently rendering.
AbstractLayout
 InheritedcurrentIndex : int
[read-only] The index of the item in the dataProvider that the layout is currently rendering.
AbstractLayout
 InheritedcurrentLabel : String
[read-only] The label of the item in the dataProvider that the layout is currently rendering, as determine by taking currentDatum[labelField], if a labelField is defined.
AbstractLayout
 InheritedcurrentReference : Geometry
[read-only] The geometry that is being used to render the current data item as it appears after the necessary iterations of the referenceRepeater have been executed.
AbstractLayout
 InheritedcurrentValue : *
[read-only] The value of the item in the dataProvider that the layout is currently rendering, as determined by taking currentDatum[dataField], if a dataField is defined.
AbstractLayout
 InheriteddataField : Object
The property within each item in the dataProvider that contains the field used to determine the value of the item.
AbstractLayout
 InheriteddataFilterFunction : Function
This provides a way to further refine a layouts dataProvider by providing access to a custom filter data filter function.
AbstractLayout
 InheriteddataFilterIndex : Number
[read-only]
AbstractLayout
 InheriteddataItems : Array
[read-only] An array of objects extracted from the dataProvider.
AbstractLayout
 InheriteddataProvider : Object
An Array, ArrayCollection, or Object containing the data this layout should render.
AbstractLayout
 InheriteddataTipAnchorPoint : Object
An Object with x and y values used to determine the location of anchored data tips.
AbstractLayout
 InheriteddataTipContentClass : IFactory
A ClassFactory that creates the UIComponent that should be used in the data tip for this AxiisSprite.
AbstractLayout
 InheriteddataTipContentComponent : UIComponent
A component that gets passed to any data tip.
AbstractLayout
 InheriteddataTipLabelFunction : Function
A method used to determine the text that appears in the data tip for an item rendered by this layout.
AbstractLayout
 InheriteddataTipManager : IDataTipManager
The IDataTipManager responsible for laying out data tips for children of this layout.
AbstractLayout
 InheriteddrawingGeometries : Array
An array of geometries that should be drawn for each item in the data provider.
AbstractLayout
 Inheritedfills : Array
A placeholder for fills used within this layout.
AbstractLayout
 Inheritedheight : Number
The height of the layout.
AbstractLayout
  inheritParentBounds : Boolean = true
Whether or not the drawingGeometries should should have their initial bounds set to the currentReference of the parent layout.
BaseLayout
 InheriteditemCount : int
[read-only] The number of items in the dataProvider.
AbstractLayout
 InheritedlabelField : Object
The property within each item in the dataProvider that contains the field used to determine the label for the item.
AbstractLayout
 Inheritedlayouts : Array
The layouts that should be displayed within this layout.
AbstractLayout
 InheritedmsPerRenderFrame : Number = 50
Determines how long (milliseconds) a layout will spend on a given frame to render X number of datums
AbstractLayout
 Inheritedname : String
A string used to identify this layout.
AbstractLayout
 Inheritedpalettes : Array
A placeholder for palettes used within this layout.
AbstractLayout
 InheritedparentLayout : AbstractLayout
A reference to the layout that contains this layout.
AbstractLayout
 InheritedreferenceRepeater : GeometryRepeater
A GeometryRepeater that will be applied to the drawingGeometries once for each item in the dataProvider.
AbstractLayout
 Inheritedrendering : Boolean
[read-only] Whether or not this layout is currently in a render cycle.
AbstractLayout
  scaleFill : Boolean
Whether or not the fills in this geometry should be scaled within the bounds rectangle.
BaseLayout
 InheritedshowDataTips : Boolean
A flag that indicates to DataCanvas that it should listen for mouse events that signal the need to create a data tip.
AbstractLayout
 Inheritedstates : Array
An array of states that should be applied to this layout.
AbstractLayout
 Inheritedstrokes : Array
A placeholder for strokes used within this layout.
AbstractLayout
  useHandCursor : Boolean = false
The value of the useHandCursor flag to set each child Sprite
BaseLayout
 Inheritedvisible : Boolean
Whether or not this layout is visible.
AbstractLayout
 Inheritedwidth : Number
The width of the layout.
AbstractLayout
 Inheritedx : Number
The horizontal position of the top left corner of this layout within its parent.
AbstractLayout
 Inheritedy : Number
The vertical position of the top left corner of this layout within its parent.
AbstractLayout
Protected Properties
 PropertyDefined By
 Inheritedsprite : AxiisSprite
The sprite this layout is currently rendering to.
AbstractLayout
Public Methods
 MethodDefined By
  
Constructor.
BaseLayout
 Inherited
getProperty(obj:Object, propertyName:Object):*
Uses ObjectUtils.getProperty(this,obj,propertyName) to get a property on an object.
AbstractLayout
 Inherited
getSprite(owner:DataCanvas):Sprite
Returns the Sprite associated with this layout if owner is in fact the owner of this layout.
AbstractLayout
 Inherited
invalidate():void
Notifies the DataCanvas that this layout needs to be rendered.
AbstractLayout
 Inherited
Iterates over the items in the dataProvider and stores them in dataItems.
AbstractLayout
 Inherited
registerOwner(dataCanvas:DataCanvas):void
Registers a DisplayObject as the owner of this layout.
AbstractLayout
  
render(newSprite:AxiisSprite = null):void
Draws this layout to the specified AxiisSprite, tracking all changes made by data binding or the referenceRepeater.
BaseLayout
Protected Methods
 MethodDefined By
 Inherited
Marks all children as deselected.
AbstractLayout
  
The callback method called by the referenceRepeater after it applies the PropertyModifiers on each iteration.
BaseLayout
  
The callback method called by the referenceRepeater before it applies the PropertyModifiers on each iteration.
BaseLayout
  
Calls the render method on all child layouts.
BaseLayout
  
The callback method called by the referenceRepeater after it finishes its final iteration.
BaseLayout
Events
 Event Summary Defined By
  Dispatched when invalidate is called so the DataCanvas that owns this layout can being the process of redrawing the layout.BaseLayout
  Dispatched when an AxiisSprite is clicked.BaseLayout
  Dispatched when an AxiisSprite is mousedOver.BaseLayout
  Dispatched when an AxiisSprite is double clicked.BaseLayout
  Dispatched when an AxiisSprite is mousedOver.BaseLayout
  Dispatched when an AxiisSprite is mousedOut.BaseLayout
  Dispatched when an AxiisSprite is mousedOver.BaseLayout
  Dispatched before each individual child is rendered.BaseLayout
  Dispatched when an AxiisSprite is selectedBaseLayout
  Dispatched when an AxiisSprite is unselectedBaseLayout
  Dispatched at the beginning of the render method.BaseLayout
  Dispatched when layout has completed its render cycleBaseLayout
Property Detail
buttonModeproperty
public var buttonMode:Boolean = false

The value of the buttonMode flag to set for each child Sprite

inheritParentBoundsproperty 
public var inheritParentBounds:Boolean = true

Whether or not the drawingGeometries should should have their initial bounds set to the currentReference of the parent layout.

scaleFillproperty 
scaleFill:Boolean  [read-write]

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

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


Implementation
    public function get scaleFill():Boolean
    public function set scaleFill(value:Boolean):void
useHandCursorproperty 
public var useHandCursor:Boolean = false

The value of the useHandCursor flag to set each child Sprite

Constructor Detail
BaseLayout()Constructor
public function BaseLayout()

Constructor.

Method Detail
postIteration()method
protected function postIteration():void

The callback method called by the referenceRepeater after it applies the PropertyModifiers on each iteration. This method updates the currentReference property and creates or updates the AxiisSprite that renders the currentDatum. It is recommended that subclasses override this method to perform any computations that affect the drawingGeometries that are based on the drawingGeometries themselves.

preIteration()method 
protected function preIteration():void

The callback method called by the referenceRepeater before it applies the PropertyModifiers on each iteration. This method updates the currentIndex, currentDatum, currentValue, and currentLabel properties. It is recommended that subclasses override this method to perform any custom data-driven computations that affect the drawingGeometries.

render()method 
override public function render(newSprite:AxiisSprite = null):void

Draws this layout to the specified AxiisSprite, tracking all changes made by data binding or the referenceRepeater.

If no sprite is provided this layout will use the last AxiisSprite it rendered to, if such an AxiisSprite exists. Otherwise this returns immediately.

The render cycle occurs in several stages. By watching for these events or by binding onto the currentReference, currentIndex, or the currentDatum properties, you can inject your own logic into the render cycle. For example, if you bind a drawingGeometry's x position to currentReference.x and use a GeometryRepeater that adds 5 to the x property of the reference, the layout will render one geometry for each item in the dataProvider at every 5 pixels.

Parameters

newSprite:AxiisSprite (default = null) — The AxiisSprite this layout should render to.

renderChildLayouts()method 
protected function renderChildLayouts(child:AxiisSprite):void

Calls the render method on all child layouts.

Parameters

child:AxiisSprite

repeatComplete()method 
protected function repeatComplete():void

The callback method called by the referenceRepeater after it finishes its final iteration. Stop tracking changes to the drawingGeometries properties.

Event Detail
invalidateLayout Event
Event Object Type: flash.events.Event

Dispatched when invalidate is called so the DataCanvas that owns this layout can being the process of redrawing the layout.

itemClick Event  
Event Object Type: org.axiis.events.LayoutItemEvent

Dispatched when an AxiisSprite is clicked.

itemDataTip Event  
Event Object Type: org.axiis.events.LayoutItemEvent

Dispatched when an AxiisSprite is mousedOver.

itemDoubleClick Event  
Event Object Type: org.axiis.events.LayoutItemEvent

Dispatched when an AxiisSprite is double clicked.

itemMouseMove Event  
Event Object Type: org.axiis.events.LayoutItemEvent

Dispatched when an AxiisSprite is mousedOver.

itemMouseOut Event  
Event Object Type: org.axiis.events.LayoutItemEvent

Dispatched when an AxiisSprite is mousedOut.

itemMouseOver Event  
Event Object Type: org.axiis.events.LayoutItemEvent

Dispatched when an AxiisSprite is mousedOver.

itemPreDraw Event  
Event Object Type: flash.events.Event

Dispatched before each individual child is rendered.

itemSelected Event  
Event Object Type: org.axiis.events.LayoutItemEvent

Dispatched when an AxiisSprite is selected

itemUnSelected Event  
Event Object Type: org.axiis.events.LayoutItemEvent

Dispatched when an AxiisSprite is unselected

preRender Event  
Event Object Type: flash.events.Event

Dispatched at the beginning of the render method. This event allowing listening objects the chance to perform any computations that will affect the layout's render process.

renderComplete Event  
Event Object Type: flash.events.Event

Dispatched when layout has completed its render cycle