Packageat.display
Classpublic class SlideTiler
InheritanceSlideTiler Inheritance mx.core.UIComponent
ImplementsINavigationUIDataChange

A navigational UI component that allows navigation via tiling the loaded imagery specified by XML into windows. These are then splayed out in even rows across the dimensions of this component. This works the best with nn images, (4, 9, 16 etc.).

The images for the windows are pulled from the slideTilerThumbnailFilename attribute in the dataProvider.

Default MXML PropertydataProvider



Public Properties
 PropertyDefined by
  clickToNavigate : Boolean = true
Value is set to true to if navigation occurs when the maximized window is clicked on.
SlideTiler
  dataProvider : Object
The data that is used to created the visual panes of navigation.
SlideTiler
  debugMode : Boolean = false
Outputs useful information for debugging this component for developers when true.
SlideTiler
  navigationManager : INavigationManager
The navigationManager is typicall a PresentationModule's navigationManager.
SlideTiler
  selectedChild : DisplayObject
Returns the currently maximized window or maximizes the window it is set to.
SlideTiler
  selectedIndex : int
Get or set the maximized window based on the order in the list.
SlideTiler
  selectedItem : Object
The data from the currently selected object in the component.
SlideTiler
  tiled : Boolean
[read-only] The windows are tiled (true) or if one of them is maximized (false).
SlideTiler
  tweenDuration : uint = 400
Amount of time in milliseconds it takes for the windows to tile or maximize.
SlideTiler
  useDefaultNavigationBehavior : Boolean
SlideTiler
Protected Properties
 PropertyDefined by
  createdRenderers : Array
All of the visible items in the component in the order they were created.
SlideTiler
  cursor : IViewCursor
SlideTiler
  _dataProvider : Object
Original passed in data.
SlideTiler
  freeItemRenderers : Array
A list of ImageStackHolders that have been removed due to a shortened length in the dataProvider.
SlideTiler
  irArray : Array
SlideTiler
  isResizing : Boolean = false
SlideTiler
  needsRevalidation : Boolean = false
SlideTiler
Public Methods
 MethodDefined by
  
Constructor.
SlideTiler
  
Resets the dataProvider with the parent of the currently selected node that comes from the slideManager.
SlideTiler
  
tileWindows(e:Event = null):void
Tiles all of the windows available out into a grid.
SlideTiler
Protected Methods
 MethodDefined by
  
SlideTiler
  
When the current window has focus, it runs the activate() method on the current window.
SlideTiler
  
clickHandler(e:MouseEvent):void
Handles the click of the windows.
SlideTiler
  
Creates the windows of the component based on a new dataProvider.
SlideTiler
  
For all of the other windows that aren't selected, it runs the deactivate() function on the
SlideTiler
  
eventPassthrough(e:Event):void
Passes events through from internal components.
SlideTiler
  
Used in creation of items based on the dataProvider.
SlideTiler
  
loadMissingImage(e:IOErrorEvent):void
Loads a default image if a file cannot be found.
SlideTiler
  
maximizeEndHandler(e:EffectEvent):void
SlideTiler
  
setSelected(index:int):void
Sets the selected window.
SlideTiler
  
swfLoaderSuccess(e:Event):void
Removes event listeners from items in the image stack when images have successfully been loaded.
SlideTiler
  
tiledEndHandler(e:EffectEvent):void
SlideTiler
Events
 EventSummaryDefined by
   Dispatched when the selected item has changed either by click or by setting the selectedIndex or selectedChild properties.SlideTiler
   Dispatched when all of the windows have been created based on new data from the dataProvider.SlideTiler
   Dispatched after a window is maximized after the transition is complete.SlideTiler
   Dispatched when the user clicks on an item in the control.SlideTiler
   Dispatched when all of the slides are tiled.SlideTiler
Styles
 StyleDescriptionDefined by
  
horizontalGap
Type: Number
The about of horizontal padding in pixels between items when the component is tiled. The default value is 0.
SlideTiler
  
verticalGap
Type: Number
The about of vertical padding in pixels between items when the component is tiled. The default value is 0.
SlideTiler
Property detail
clickToNavigateproperty
public var clickToNavigate:Boolean = true

Value is set to true to if navigation occurs when the maximized window is clicked on. When false the navigation occurs when the tiled window is clicked to maximize.

The default value is true.

createdRenderersproperty 
protected var createdRenderers:Array

All of the visible items in the component in the order they were created. Due to the fact that the child index will change to display the items on top of one another visually, this is the list of all items as they were added.

The default value is [].

cursorproperty 
protected var cursor:IViewCursor

_dataProviderproperty 
protected var _dataProvider:Object

Original passed in data.

dataProviderproperty 
dataProvider:Object  [read-write]

The data that is used to created the visual panes of navigation.

The only required parameter is for the image to be loaded. The parameter on the dataProvider is slideTilerThumbnailFilename.

Implementation
    public function get dataProvider():Object
    public function set dataProvider(value:Object):void

Example
   <slide slideTilerThumbnailFilename="/path/to/thumbnail/patient1.jpg" />
   <slide slideTilerThumbnailFilename="/path/to/thumbnail/patient2.png" />
   <slide slideTilerThumbnailFilename="/path/to/thumbnail/patient3.png" />
   

debugModeproperty 
public var debugMode:Boolean = false

Outputs useful information for debugging this component for developers when true.

The output is typically in the form of trace statements and Alerts.

The default value is false.

freeItemRenderersproperty 
protected var freeItemRenderers:Array

A list of ImageStackHolders that have been removed due to a shortened length in the dataProvider. These will be reused if the dataProvider becomes longer in length.

The default value is [].

irArrayproperty 
protected var irArray:Array
isResizingproperty 
protected var isResizing:Boolean = false

navigationManagerproperty 
navigationManager:INavigationManager  [read-write]

The navigationManager is typicall a PresentationModule's navigationManager.

The default value is null.

Implementation
    public function get navigationManager():INavigationManager
    public function set navigationManager(value:INavigationManager):void
needsRevalidationproperty 
protected var needsRevalidation:Boolean = false
selectedChildproperty 
selectedChild:DisplayObject  [read-write]

Returns the currently maximized window or maximizes the window it is set to.

The default value is null.

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

Implementation
    public function get selectedChild():DisplayObject
    public function set selectedChild(value:DisplayObject):void
selectedIndexproperty 
selectedIndex:int  [read-write]

Get or set the maximized window based on the order in the list.

The default value is -1.

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

Implementation
    public function get selectedIndex():int
    public function set selectedIndex(value:int):void
selectedItemproperty 
selectedItem:Object  [read-write]

The data from the currently selected object in the component.

The default value is null.

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

Implementation
    public function get selectedItem():Object
    public function set selectedItem(value:Object):void
tiledproperty 
tiled:Boolean  [read-only]

The windows are tiled (true) or if one of them is maximized (false).

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

Implementation
    public function get tiled():Boolean
tweenDurationproperty 
public var tweenDuration:uint = 400

Amount of time in milliseconds it takes for the windows to tile or maximize.

The default value is 400.

useDefaultNavigationBehaviorproperty 
useDefaultNavigationBehavior:Boolean  [read-write]

The default value is true.

Implementation
    public function get useDefaultNavigationBehavior():Boolean
    public function set useDefaultNavigationBehavior(value:Boolean):void
Constructor detail
SlideTiler()constructor
public function SlideTiler()

Constructor.

Method detail
calculatePositions()method
protected function calculatePositions():Array

Returns
Array
changeSelectedHandler()method 
protected function changeSelectedHandler(e:NavigationUIEvent):void

When the current window has focus, it runs the activate() method on the current window.

All of the other windows it runs deactivate().

Parameters
e:NavigationUIEvent — The navigation UI event
clickHandler()method 
protected function clickHandler(e:MouseEvent):void

Handles the click of the windows.

If clickToNavigate is false, useDefaultNavigationBehavior is true and navigationManager is not null then the window will call navigateTo(id) on the current window when it is selected.

If the same as above, except clickToNavigate is true then the window will run navigateTo(id) on the navigationManager when the maximized window is clicked.

Parameters
e:MouseEvent — The mouse event click
createNavigation()method 
protected function createNavigation():void

Creates the windows of the component based on a new dataProvider.

deactivateLoadedContent()method 
protected function deactivateLoadedContent():void

For all of the other windows that aren't selected, it runs the deactivate() function on the

eventPassthrough()method 
protected function eventPassthrough(e:Event):void

Passes events through from internal components.

Parameters
e:Event — The event
externalNavigationHandler()method 
public function externalNavigationHandler(e:NavigationChangeEvent):void

Resets the dataProvider with the parent of the currently selected node that comes from the slideManager.

Parameters
e:NavigationChangeEvent — The navigation change event
getItemRenderer()method 
protected function getItemRenderer():SlideTilerWindow

Used in creation of items based on the dataProvider.

It creates a new SlideTilerWindow unless one had been removed previously and stored in freeItemRenderers.

Returns
SlideTilerWindow — A used or new SlideTilerWindow

See also

loadMissingImage()method 
protected function loadMissingImage(e:IOErrorEvent):void

Loads a default image if a file cannot be found.

Parameters
e:IOErrorEvent — The event
maximizeEndHandler()method 
protected function maximizeEndHandler(e:EffectEvent):voidParameters
e:EffectEvent
setSelected()method 
protected function setSelected(index:int):void

Sets the selected window.

This is an internal method that should never need to be run other than internal to this class.

Parameters
index:int — The index of the item to select
swfLoaderSuccess()method 
protected function swfLoaderSuccess(e:Event):void

Removes event listeners from items in the image stack when images have successfully been loaded.

Parameters
e:Event — The INIT event on the swf
tiledEndHandler()method 
protected function tiledEndHandler(e:EffectEvent):voidParameters
e:EffectEvent
tileWindows()method 
public function tileWindows(e:Event = null):void

Tiles all of the windows available out into a grid. Number of rows and columns is determined by number of total windows. Works off of squared numbers (2x2, 3x3, 4x4...).

Parameters
e:Event (default = null) — The event
Event detail
changeSelectedevent 
Event object type: at.events.NavigationUIEvent
NavigationUIEvent.type property = at.events.NavigationUIEvent.CHANGE_SELECTED

Dispatched when the selected item has changed either by click or by setting the selectedIndex or selectedChild properties.

The NavigationalUIEvent.CHANGE_SELECTED constant defines the value of the type property of the event object for a changeSelected event.

childrenCreatedevent  
Event object type: at.events.NavigationUIEvent
NavigationUIEvent.type property = at.events.NavigationUIEvent.CHILDREN_CREATED

Dispatched when all of the windows have been created based on new data from the dataProvider.

The NavigationalUIEvent.CHILDREN_CREATED_FROM_DATA constant defines the value of the type property of the event object for a childrenCreated event.

focusSetevent  
Event object type: at.events.NavigationUIEvent
NavigationUIEvent.type property = at.events.NavigationUIEvent.FOCUS_SET

Dispatched after a window is maximized after the transition is complete.

The NavigationalUIEvent.FOCUS_SET constant defines the value of the type property of the event object for a focusSet event.

itemClickevent  
Event object type: mx.events.ItemClickEvent

Dispatched when the user clicks on an item in the control.

tiledevent  
Event object type: at.events.NavigationUIEvent

Dispatched when all of the slides are tiled.