Packagecom.comtaste.pantaste.manager
Classpublic class DashLayoutManager
InheritanceDashLayoutManager Inheritance flash.events.EventDispatcher

A DashLayoutManager manages the possible action of resizing, moving and minimizing in a DashPanelContainer object.

A DashLayoutManager is a multiton that mantains a dictionary of pairs <Number:DashLayoutManager> where the key is the id of the DashPanelContainer whose layout is managed by the corresponding DashLayoutManager object.



Public Properties
 PropertyDefined by
  container : DashPanelContainer
The managed DashPanelContainer.
DashLayoutManager
  icons : Dictionary
Dictionary of the icon-DashPanel association.
DashLayoutManager
  panelList : Array
The managed panels stack.
DashLayoutManager
Protected Properties
 PropertyDefined by
  candidatePanel : DashPanel
DashLayoutManager
  handler : DashPanelHandler
The DashPanelHandler.
DashLayoutManager
  handlerMoved : Boolean = false
Indicates whether the handler has been moved (true) or not (false).
DashLayoutManager
  handlerResized : Boolean = false
Indicates whether the handler has been resized (true) or not (false).
DashLayoutManager
  selectedPanel : DashPanel
The currently selected panel.
DashLayoutManager
  stopChIndex : Boolean = false
DashLayoutManager
Public Methods
 MethodDefined by
  
DashLayoutManager(container:DashPanelContainer, instanceKey:*)
Constructor.
DashLayoutManager
  
applyEffect(panel:DashPanel, xTo:Number, yTo:Number, widthTo:Number, heightTo:Number, effectItems:Array = null):void
Plays the specified effects over the specified items.
DashLayoutManager
  
bringToFront(element:UIComponent):void
Brings to front a component.
DashLayoutManager
  
cascade():void
Cascades all managed panel from top left to bottom right
DashLayoutManager
  
Returns a list of open panels that always stay in front
DashLayoutManager
  
getManager(instanceKey:*):DashLayoutManager
[static] Returns the DashLayoutManager that manages the Container identified by instanceKey.
DashLayoutManager
  
getManagerPanelsAspectDetails(instanceKey:*):Array
[static] Gets the details of the DashPanel of the session of the container identified by instanceKey
DashLayoutManager
  
Returns the list of currently open panels.
DashLayoutManager
  
tile(pad:Number = 10):void
Tiles the window across the screen

By default, windows will be tiled to all the same size and use only the space they can accomodate.

DashLayoutManager
  
updateInstanceKey(layoutManager:DashLayoutManager, newKey:*):void
[static] Updates the key of the key-value pair stored in this.multiton.
DashLayoutManager
Protected Methods
 MethodDefined by
  
activateHandler(event:MouseEvent):void
Executed whenever a user begins to move or resize a panel.
DashLayoutManager
  
Activates the PanSwitcher.
DashLayoutManager
  
addHandler():void
Adds the DashPanelHandler.
DashLayoutManager
  
Configures the event listeners and the icon for the DashPanel passed as argument,
DashLayoutManager
  
createIcon(panel:DashPanel):void
Creates and brings to front the icon for the panel object.
DashLayoutManager
  
Deactivates the PanSwitcher.
DashLayoutManager
  
destroyHandler(event:MouseEvent):void
Hides the current panel's handler.
DashLayoutManager
  
finishWork(event:MouseEvent):void
Ends the resizing/replacing routine, resetting the event listeners over the handler and applying the constraints imposed by the DashPanelContainer properties
DashLayoutManager
  
onAddedOnStage(event:ChildExistenceChangedEvent):void
Handler of the addition of the container to the stage.
DashLayoutManager
  
onChildIndexChange(event:IndexChangedEvent):void
Executed when the children order of the container is changed.
DashLayoutManager
  
onClose(event:DashPanelEvent):void
Executed when a DashPanel closes.
DashLayoutManager
  
onContainerComplete(event:FlexEvent):void
Handler of the completion of creation of the container.
DashLayoutManager
  
onContainerResize(event:Event):void
Performed every time the container is resized, to relay the open panels.
DashLayoutManager
  
onFocusPanel(event:MouseEvent):void
Executed whenever a target DashPanel gains focus.
DashLayoutManager
  
onKeyDown(event:KeyboardEvent):void
DashLayoutManager
  
onKeyUp(event:KeyboardEvent):void
Handles the keyboard event that brings up the PanSwitcher
DashLayoutManager
  
Applies the resize and move effect when the target DashPanel is maximized.
DashLayoutManager
  
Applies the resize and move effect when the target DashPanel is minimized.
DashLayoutManager
  
onPanelShowHide(event:FlexEvent):void
Handler of the event of showing/hiding a target panel.
DashLayoutManager
  
Restores the view of the DashPanel that dispatched the event.
DashLayoutManager
  
Handles the DashPanelEvent.
DashLayoutManager
  
Positions the icon over the DashPanel passed as argument.
DashLayoutManager
Property detail
candidatePanelproperty
protected var candidatePanel:DashPanel

containerproperty 
public var container:DashPanelContainer

The managed DashPanelContainer.

handlerproperty 
protected var handler:DashPanelHandler

The DashPanelHandler.

handlerMovedproperty 
protected var handlerMoved:Boolean = false

Indicates whether the handler has been moved (true) or not (false).

handlerResizedproperty 
protected var handlerResized:Boolean = false

Indicates whether the handler has been resized (true) or not (false).

iconsproperty 
public var icons:Dictionary

Dictionary of the icon-DashPanel association.

panelListproperty 
public var panelList:Array

The managed panels stack.

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

selectedPanelproperty 
protected var selectedPanel:DashPanel

The currently selected panel.

stopChIndexproperty 
protected var stopChIndex:Boolean = false

Constructor detail
DashLayoutManager()constructor
public function DashLayoutManager(container:DashPanelContainer, instanceKey:*)

Constructor.

Parameters
container:DashPanelContainer — The container to manage
 
instanceKey:* — key associated to this container.
Method detail
activateHandler()method
protected function activateHandler(event:MouseEvent):void

Executed whenever a user begins to move or resize a panel.

When a move or resize action has been taken, the handler - already visible although with no color - is displayed to give an hint of the effect of the action, therefore appearing like a copy over the DashPanel the user is modifying.

Parameters
event:MouseEvent — the related MouseEvent.MOUSE_OVER type event
activatePanSwitcher()method 
protected function activatePanSwitcher():void

Activates the PanSwitcher.

See also

addHandler()method 
protected function addHandler():void

Adds the DashPanelHandler.

See also

com.comtaste.pantaste.components.DashLayoutHandler
applyEffect()method 
public function applyEffect(panel:DashPanel, xTo:Number, yTo:Number, widthTo:Number, heightTo:Number, effectItems:Array = null):void

Plays the specified effects over the specified items.

Parameters
panel:DashPanel — The DashPanel to which apply the parallel effect.
 
xTo:Number — The ending x coordinate for the move effect.
 
yTo:Number — The ending y coordinate for the move effect.
 
widthTo:Number — The ending width of the resize effect.
 
heightTo:Number — The ending height of the resize effect.
 
effectItems:Array (default = null) — The set of effects that must be played on the panel
bringToFront()method 
public function bringToFront(element:UIComponent):void

Brings to front a component.

Parameters
element:UIComponent — The component to be brought to front.
cascade()method 
public function cascade():void

Cascades all managed panel from top left to bottom right

configurePanel()method 
protected function configurePanel(panel:DashPanel):void

Configures the event listeners and the icon for the DashPanel passed as argument,

Parameters
panel:DashPanel — the DashPanel to be configured
createIcon()method 
protected function createIcon(panel:DashPanel):void

Creates and brings to front the icon for the panel object.

Parameters
panel:DashPanel — the DashPanel whose icon has to be set
deactivatePanSwitcher()method 
protected function deactivatePanSwitcher():void

Deactivates the PanSwitcher.

See also

destroyHandler()method 
protected function destroyHandler(event:MouseEvent):void

Hides the current panel's handler.

Parameters
event:MouseEvent — The MouseEvent handled
finishWork()method 
protected function finishWork(event:MouseEvent):void

Ends the resizing/replacing routine, resetting the event listeners over the handler and applying the constraints imposed by the DashPanelContainer properties

Parameters
event:MouseEvent — the related MouseEvent.MOUSE_UP type event
getAlwaysInFrontPanelList()method 
public function getAlwaysInFrontPanelList():Array

Returns a list of open panels that always stay in front

Returns
Array — Array list of open panels that always stay in front
getManager()method 
public static function getManager(instanceKey:*):DashLayoutManager

Returns the DashLayoutManager that manages the Container identified by instanceKey.

Parameters
instanceKey:*

Returns
DashLayoutManager — DashLayoutManager - the instance of DashLayoutManager that manages the Container identified by instanceKey.
getManagerPanelsAspectDetails()method 
public static function getManagerPanelsAspectDetails(instanceKey:*):Array

Gets the details of the DashPanel of the session of the container identified by instanceKey

Parameters
instanceKey:* — of the instance.

Returns
Array — Array array of DashPanelAspectVO.
getOpenedPanelList()method 
public function getOpenedPanelList():Array

Returns the list of currently open panels.

Returns
Array — Array list of the open panels
onAddedOnStage()method 
protected function onAddedOnStage(event:ChildExistenceChangedEvent):void

Handler of the addition of the container to the stage.

Parameters
event:ChildExistenceChangedEvent — the event of changed existence of the container
onChildIndexChange()method 
protected function onChildIndexChange(event:IndexChangedEvent):void

Executed when the children order of the container is changed. It rearranges the indexes of the whole childrens' set.

Parameters
event:IndexChangedEvent — The index change event
onClose()method 
protected function onClose(event:DashPanelEvent):void

Executed when a DashPanel closes.

If dashed = true then a retiling of the opened DashPanels is performed.

Parameters
event:DashPanelEvent — the DashPanel close event.
onContainerComplete()method 
protected function onContainerComplete(event:FlexEvent):void

Handler of the completion of creation of the container.

Parameters
event:FlexEvent — the event of completed creation.
onContainerResize()method 
protected function onContainerResize(event:Event):void

Performed every time the container is resized, to relay the open panels.

If dashed = true then a retiling of the opened DashPanels is performed.

Parameters
event:Event — The resize event.
onFocusPanel()method 
protected function onFocusPanel(event:MouseEvent):void

Executed whenever a target DashPanel gains focus.

Parameters
event:MouseEvent — The MouseEvent over the target DashPanel
onKeyDown()method 
protected function onKeyDown(event:KeyboardEvent):void

Parameters
event:KeyboardEvent
onKeyUp()method 
protected function onKeyUp(event:KeyboardEvent):void

Handles the keyboard event that brings up the PanSwitcher

Parameters
event:KeyboardEvent

See also

onMaximize()method 
protected function onMaximize(event:DashPanelEvent):void

Applies the resize and move effect when the target DashPanel is maximized.

Parameters
event:DashPanelEvent — The maximization event.
onMinimize()method 
protected function onMinimize(event:DashPanelEvent):void

Applies the resize and move effect when the target DashPanel is minimized.

It furthermore adds it to the DashDock of the current DashPanelContainer. If dashed = true then a retiling of the opened DashPanels is performed.

Parameters
event:DashPanelEvent — The maximization event.
onPanelShowHide()method 
protected function onPanelShowHide(event:FlexEvent):void

Handler of the event of showing/hiding a target panel.

Parameters
event:FlexEvent — The event of showing/hiding a panel.
onRestore()method 
protected function onRestore(event:DashPanelEvent):void

Restores the view of the DashPanel that dispatched the event.

If dashed = true then a retiling of the opened DashPanels is performed.

Parameters
event:DashPanelEvent — The restore event.
prepareHandler()method 
protected function prepareHandler(event:DashPanelEvent):void

Handles the DashPanelEvent.

It sets the DashPanelHandler visible and on the same coordinates of the DashPanel being moved, or on the bottom-right corner if being resized.

Parameters
event:DashPanelEvent
setIconPostion()method 
protected function setIconPostion(panel:DashPanel):void

Positions the icon over the DashPanel passed as argument.

Parameters
panel:DashPanel — The panel whose icon has to be positioned
tile()method 
public function tile(pad:Number = 10):void

Tiles the window across the screen

By default, windows will be tiled to all the same size and use only the space they can accomodate. If you set fillAvailableSpace = true, tile will use all the space available to tile the windows with the windows being arranged by varying heights and widths.

Parameters
pad:Number (default = 10) — Variable to determine whether to use the fill the entire available screen
updateInstanceKey()method 
public static function updateInstanceKey(layoutManager:DashLayoutManager, newKey:*):void

Updates the key of the key-value pair stored in this.multiton.

Parameters
layoutManager:DashLayoutManager — The DashLayoutManager whose key has to be changed.
 
newKey:* — new value of the key pointing to layoutManager

Throws
— if the DashLayoutManager has not been registered in the multiton dictionary.

See also