Packagecom.comtaste.pantaste.components
Classpublic class DashPanelHandler
InheritanceDashPanelHandler Inheritance mx.containers.Canvas

A DashPanelHandler is an object in charge of giving feedback to the user when resizing and/or moving a DashPanel, by appearing during these actions as a copy of the DashPanel the user is resizing/moving. It is therefore in charge of notifiying, via DashManagerEvent, the layout manager about the changes occurred (if any) on any DashPanel. A DashPanelHandler is instantiated as a child of a DashPanelContainer.

See also

com.comtaste.pantaste.events.DashManagerEvent
com.comtaste.pantaste.manager.DashLayoutManager


Public Properties
 PropertyDefined by
  minimumHeight : Number
Minimum resize in height allowed.
DashPanelHandler
  minimumWidth : Number
Minimum resize in width allowed.
DashPanelHandler
  resizer : Boolean = false
If true, the action performed is a resize.
DashPanelHandler
Protected Properties
 PropertyDefined by
  isMoving : Boolean = false
Indicates whether the user is in the middle of a moving action.
DashPanelHandler
  isResizing : Boolean = false
Indicates whether the user is in the middle of a resizing action.
DashPanelHandler
  localClickPoint : Point
Point object relative to the position where the user clicked, in local coordinates
DashPanelHandler
  moveEffect : Move
Move effect of this DashPanelHandler.
DashPanelHandler
  originalDepth : int
The depth w.r.t.
DashPanelHandler
  resizeEffect : Resize
Resize effect of this DashPanelHandler
DashPanelHandler
  wasMoved : Boolean = false
Indicates whether the user has performed a move operation, by moving the mouse with the left button pressed.
DashPanelHandler
  wasResized : Boolean = false
Indicates whether the user has performed a resize operation, by moving the mouse with the left button pressed.
DashPanelHandler
Public Methods
 MethodDefined by
  
Constructor.
DashPanelHandler
  
setSnapshot(source:ByteArray):void
Applies an appearance to this DashPanelHandler.
DashPanelHandler
Protected Methods
 MethodDefined by
  
bringUp():void
Brings over all his sibling components (w.r.t.
DashPanelHandler
  
init(event:FlexEvent):void
Initialization code for this DashPanelHandler.
DashPanelHandler
  
onMouseDown(event:MouseEvent):void
Handler of the MouseEvent.MOUSE_DOWN type MouseEvent.
DashPanelHandler
  
onMouseMove(event:MouseEvent):void
MouseEvent.MOUSE_MOVE type MouseEvent listener.
DashPanelHandler
  
onMouseUp(event:MouseEvent):void
Handles the releasing of the mouse button.
DashPanelHandler
  
resetZOrder():void
Resets the original order (i.e.
DashPanelHandler
  
Switches the MouseEvent.MOUSE_MOVE type MouseEvent listener from this DashPanelHandler to the stage, in order to have a better dragging.
DashPanelHandler
  
Switches the MouseEvent.MOUSE_MOVE type MouseEvent listener from the stage to this DashPanelHandler.
DashPanelHandler
Property detail
isMovingproperty
protected var isMoving:Boolean = false

Indicates whether the user is in the middle of a moving action.

isResizingproperty 
protected var isResizing:Boolean = false

Indicates whether the user is in the middle of a resizing action.

localClickPointproperty 
protected var localClickPoint:Point

Point object relative to the position where the user clicked, in local coordinates

minimumHeightproperty 
public var minimumHeight:Number

Minimum resize in height allowed.

minimumWidthproperty 
public var minimumWidth:Number

Minimum resize in width allowed.

moveEffectproperty 
protected var moveEffect:Move

Move effect of this DashPanelHandler.

originalDepthproperty 
protected var originalDepth:int

The depth w.r.t. the DashContainer of the managed DashPanel, before any move/resize operation

resizeEffectproperty 
protected var resizeEffect:Resize

Resize effect of this DashPanelHandler

resizerproperty 
public var resizer:Boolean = false

If true, the action performed is a resize. Otherwise it is a move.

wasMovedproperty 
protected var wasMoved:Boolean = false

Indicates whether the user has performed a move operation, by moving the mouse with the left button pressed.

wasResizedproperty 
protected var wasResized:Boolean = false

Indicates whether the user has performed a resize operation, by moving the mouse with the left button pressed.

Constructor detail
DashPanelHandler()constructor
public function DashPanelHandler()

Constructor.

Method detail
bringUp()method
protected function bringUp():void

Brings over all his sibling components (w.r.t. the parent container) this DashPanelHandler

init()method 
protected function init(event:FlexEvent):void

Initialization code for this DashPanelHandler.

Adds event listeners and creates the effects.

Parameters
event:FlexEvent — the CREATION_COMPLETE event of this DashPanelHandler
onMouseDown()method 
protected function onMouseDown(event:MouseEvent):void

Handler of the MouseEvent.MOUSE_DOWN type MouseEvent.

Parameters
event:MouseEvent
onMouseMove()method 
protected function onMouseMove(event:MouseEvent):void

MouseEvent.MOUSE_MOVE type MouseEvent listener.

Dispatches the events to be received and handled by a LayoutManager in order to actually resize or move a DashPanel in the DashPanelContainer. Furthermore, effects of this DashPanelHandler are played.

Parameters
event:MouseEvent — the related MouseEvent.MOUSE_MOVE type MouseEvent.
onMouseUp()method 
protected function onMouseUp(event:MouseEvent):void

Handles the releasing of the mouse button.

Parameters
event:MouseEvent — the related MouseEvent.MOUSE_UP type MouseEvent.
resetZOrder()method 
protected function resetZOrder():void

Resets the original order (i.e. prior to any move/resize action) of the DashPanels of the parent DashContainer.

See also

setSnapshot()method 
public function setSnapshot(source:ByteArray):void

Applies an appearance to this DashPanelHandler.

When moving, the DashPanelHandler shows himself until the user releases the mouse button, ending the action. This method can be used to load a particular appearance related to the action carried.

Parameters
source:ByteArray — The visual data used to skin the DashPanelHandler
switchToGlobalMouseListener()method 
protected function switchToGlobalMouseListener():void

Switches the MouseEvent.MOUSE_MOVE type MouseEvent listener from this DashPanelHandler to the stage, in order to have a better dragging.

switchToLocalMouseListener()method 
protected function switchToLocalMouseListener():void

Switches the MouseEvent.MOUSE_MOVE type MouseEvent listener from the stage to this DashPanelHandler.