Packagecom.comtaste.pantaste.components
Classpublic class DashPanel
InheritanceDashPanel Inheritance mx.containers.Canvas
ImplementsIDashPanel

A DashPanel is a draggable, resizable container.

It lies inside a DashPanelContainer and has the same capabilities of a common application window such as those in common OSes graphical interface, with a set of commands in the upper right corner (DashPanelControls) and a title bar (DashPanelTitleBar) that displays a title and allows dragging of the DashPanel.

See also

com.comtaste.pantaste.components.DashPanelContainer
com.comtaste.pantaste.components.DashPanelTitleBar
com.comtaste.pantaste.components.DashPanelControls
mx.container.Canvas


Public Properties
 PropertyDefined by
  alwaysInFront : Boolean = false
If true, then the DashPanel is always displayed over the other DashPanels in the DashPanelContainer.
DashPanel
  closable : Boolean = true
If true, it is possible to close the DashPanel.
DashPanel
  contMenu : ContextMenu
Context menu for this DashPanel.
DashPanel
  draggable : Boolean = true
If true, it is possible to drag the DashPanel around the DashPanelContainer.
DashPanel
  icon : Class
[write-only]
DashPanel
  iconXOffset : int = 2
X offset of this DashPanel icon.
DashPanel
  iconYOffset : int = 2
Y offset of this DashPanel icon.
DashPanel
  maximizable : Boolean = true
If true, it is possible to maximize the DashPanel.
DashPanel
  minimizable : Boolean = true
If true, it is possible to minimize the DashPanel.
DashPanel
  resizable : Boolean = true
If true, it is possible to resize the DashPanel.
DashPanel
  restoredHeight : Number
Keeps track of the height of this DashPanel.
DashPanel
  restoredWidth : Number
Keeps track of the width of this DashPanel.
DashPanel
  restoredX : Number
Keeps track of the x position of this DashPanel.
DashPanel
  restoredY : Number
Keeps track of the y position of this DashPanel.
DashPanel
  showTitleText : Boolean
Indicates whether the title text of this DashPanel has to be shown.
DashPanel
  status : String
This DashPanel's status.
DashPanel
  title : String
This DashPanel's title.
DashPanel
  titleBarHeight : Number
This DashPanel's DashPanelTitleBar's height.
DashPanel
  titleColor : uint
Font color of the title text.
DashPanel
  titleXOffset : Number
Horizontal offset from the left border of the DashPanel of the title label.
DashPanel
Protected Properties
 PropertyDefined by
  loading : Class
Animation shown when loading.
DashPanel
  moveCur : Class
Move cursor.
DashPanel
  resizerCur : Class
Resize cursor.
DashPanel
Public Methods
 MethodDefined by
  
Constructor.
DashPanel
  
startLoad(event:Event = null):void
Handler of the DashPanelEvent.STARTLOAD type event.
DashPanel
  
stopLoad(event:Event = null):void
Handler of the DashPanelEvent.STARTLOAD type event.
DashPanel
Protected Methods
 MethodDefined by
  
Adds the listeners on the mouse events over the title bar, in order to move the DashPanel.
DashPanel
  
Adds the listeners on the resizer canvas, in order to intercept and handle the resize events.
DashPanel
  
DashPanel
  
onAddedOnStage(event:ChildExistenceChangedEvent):void
Handler of the ChildExistenceChangedEvent.CHILD_ADD event.
DashPanel
  
onMenuSelect(event:ContextMenuEvent):void
Handles the event of selecting an item in the contextual menu.
DashPanel
  
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
DashPanel
Events
 EventSummaryDefined by
   Dispatched when the maximize button is clicked or when the window is in a normal state (not minimized or maximized) and the titleBar is double clicked.DashPanel
   Dispatched when the minimize button is clicked.DashPanel
   If the window is minimized, this event is dispatched when the titleBar is clicked.DashPanel
Public Constants
 ConstantDefined by
  MAXIMIZED : String = "maximized"
[static] String constant for maximized state.
DashPanel
  MINIMIZED : String = "minimized"
[static] String constant for minimized state.
DashPanel
  RESTORED : String = "restored"
[static] String constant for restored state.
DashPanel
Property detail
alwaysInFrontproperty
public var alwaysInFront:Boolean = false

If true, then the DashPanel is always displayed over the other DashPanels in the DashPanelContainer.

See also

closableproperty 
public var closable:Boolean = true

If true, it is possible to close the DashPanel. Otherwise, it is not possible.

See also

contMenuproperty 
public var contMenu:ContextMenu

Context menu for this DashPanel.

draggableproperty 
public var draggable:Boolean = true

If true, it is possible to drag the DashPanel around the DashPanelContainer. Otherwise, it is not possible.

See also

iconproperty 
icon:Class  [write-only]

Implementation
    public function set icon(value:Class):void
iconXOffsetproperty 
public var iconXOffset:int = 2

X offset of this DashPanel icon. The icon is placed in the upper left corner of the DashPanel.

iconYOffsetproperty 
public var iconYOffset:int = 2

Y offset of this DashPanel icon. The icon is placed in the upper left corner of the DashPanel.

loadingproperty 
protected var loading:Class

Animation shown when loading.

maximizableproperty 
public var maximizable:Boolean = true

If true, it is possible to maximize the DashPanel. Otherwise, it is not possible.

minimizableproperty 
public var minimizable:Boolean = true

If true, it is possible to minimize the DashPanel. Otherwise, it is not possible.

See also

moveCurproperty 
protected var moveCur:Class

Move cursor.

resizableproperty 
public var resizable:Boolean = true

If true, it is possible to resize the DashPanel. Otherwise, it is not possible.

See also

resizerCurproperty 
protected var resizerCur:Class

Resize cursor.

restoredHeightproperty 
public var restoredHeight:Number

Keeps track of the height of this DashPanel.

Before a minimization or a maximization of this DashPanel, this.restoredHeight is given the value of the current this.height property, in order to restore it.

restoredWidthproperty 
public var restoredWidth:Number

Keeps track of the width of this DashPanel.

Before a minimization or a maximization on this DashPanel, this.restoredWidth is given the value of the current this.width property, in order to restore it.

restoredXproperty 
public var restoredX:Number

Keeps track of the x position of this DashPanel.

Before a minimization or a maximization of this DashPanel, this.restoredX is given the value of the current this.x property, in order to restore it.

restoredYproperty 
public var restoredY:Number

Keeps track of the y position of this DashPanel.

Before a minimization or a maximization of this DashPanel, this.restoredY is given the value of the current this.x property, in order to restore it.

showTitleTextproperty 
showTitleText:Boolean  [read-write]

Indicates whether the title text of this DashPanel has to be shown.

When true, the title text on this DashPanel's title bar is shown. Otherwise, it is not shown.

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

Implementation
    public function get showTitleText():Boolean
    public function set showTitleText(value:Boolean):void

See also

statusproperty 
status:String  [read-write]

This DashPanel's status.

It can take one value in the set RESTORED,MINIMIZED,MAXIMIZED.

Implementation
    public function get status():String
    public function set status(value:String):void
titleproperty 
title:String  [read-write]

This DashPanel's title.

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

Implementation
    public function get title():String
    public function set title(value:String):void
titleBarHeightproperty 
titleBarHeight:Number  [read-write]

This DashPanel's DashPanelTitleBar's height.

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

Implementation
    public function get titleBarHeight():Number
    public function set titleBarHeight(value:Number):void

See also

titleColorproperty 
titleColor:uint  [read-write]

Font color of the title text.

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

Implementation
    public function get titleColor():uint
    public function set titleColor(value:uint):void
titleXOffsetproperty 
titleXOffset:Number  [read-write]

Horizontal offset from the left border of the DashPanel of the title label.

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

Implementation
    public function get titleXOffset():Number
    public function set titleXOffset(value:Number):void
Constructor detail
DashPanel()constructor
public function DashPanel()

Constructor.

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

Adds the listeners on the mouse events over the title bar, in order to move the DashPanel.

See also

configureResizer()method 
protected function configureResizer():void

Adds the listeners on the resizer canvas, in order to intercept and handle the resize events.

See also

createChildren()method 
protected override function createChildren():void

onAddedOnStage()method 
protected function onAddedOnStage(event:ChildExistenceChangedEvent):void

Handler of the ChildExistenceChangedEvent.CHILD_ADD event.

Parameters
event:ChildExistenceChangedEvent
onMenuSelect()method 
protected function onMenuSelect(event:ContextMenuEvent):void

Handles the event of selecting an item in the contextual menu.

For each entry of the menu, a different DashPanelEvent is dispatched. There are five options:

Parameters
event:ContextMenuEvent

See also

startLoad()method 
public function startLoad(event:Event = null):void

Handler of the DashPanelEvent.STARTLOAD type event.

It displays the image message that the application is loading.

Parameters
event:Event (default = null)
stopLoad()method 
public function stopLoad(event:Event = null):void

Handler of the DashPanelEvent.STARTLOAD type event.

Parameters
event:Event (default = null)
updateDisplayList()method 
protected override function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void

Parameters
unscaledWidth:Number
 
unscaledHeight:Number
Event detail
maximizeevent 
Event object type: com.comtaste.pantaste.events.DashPanelEvent

Dispatched when the maximize button is clicked or when the window is in a normal state (not minimized or maximized) and the titleBar is double clicked.

minimizeevent  
Event object type: com.comtaste.pantaste.events.DashPanelEvent

Dispatched when the minimize button is clicked.

restoreevent  
Event object type: com.comtaste.pantaste.events.DashPanelEvent

If the window is minimized, this event is dispatched when the titleBar is clicked. If the window is maxmimized, this event is dispatched upon clicking the restore button or double clicking the titleBar.

Constant detail
MAXIMIZEDconstant
public static const MAXIMIZED:String = "maximized"

String constant for maximized state.

MINIMIZEDconstant 
public static const MINIMIZED:String = "minimized"

String constant for minimized state.

RESTOREDconstant 
public static const RESTORED:String = "restored"

String constant for restored state.