Packagecom.flexicious.components.dashboard
Classpublic class Dashlet
InheritanceDashlet Inheritance spark.components.SkinnableContainer
Subclasses PrintDashlet

Language Version : ActionScript 3.0

A dashlet is a component that sits within a Dashboard DragDropZone. It has the following features:

Default MXML PropertymxmlContentFactory



Public Properties
 PropertyDefined By
  allowInteractivity : Boolean
[read-only] A flat that controls appearance of the buttons.
Dashlet
  dashboardContainer : DashboardContainer
The Dashboard Container that this Dashlet belongs to.
Dashlet
  dragDropZone : DragDropZone
The DragDropZone Container that this Dashlet belongs to.
Dashlet
  draggable : Boolean
Flag to enable drag and drop behavior.
Dashlet
  enableAnimations : Boolean = true
Flag to enable transitional animations when the dashlets are minimized and restored from the taskbar, closed, and restored from the picker.
Dashlet
  enableClose : Boolean
A flag that the skin looks for to enable the close button.
Dashlet
  enableExpandCollapse : Boolean
Flag to enable the expand and collapse functionality for this dashlet.
Dashlet
  enableIcon : Boolean
[read-only] Flag to display an Icon in the title for this dashlet.
Dashlet
  enableMaximizeAndRestore : Boolean
Flag to enable the maximize and restore functionality for this dashlet.
Dashlet
  enableMinimize : Boolean
Flag to enable the minimize to task bar functionality.
Dashlet
  enableTitleBar : Boolean
[read-only] Boolean flag to control the visibility of the title bar
Dashlet
  isCollapsed : Boolean
[read-only] Whether the dashboard is collapsed
Dashlet
  isMaximized : Boolean
[read-only] Returns true if this dashlet is maximized.
Dashlet
  isMinimized : Boolean
[read-only] Whether the dashboard is minimized to taskbar
Dashlet
  isOpen : Boolean
[read-only] Whether the dashboard is open
Dashlet
  itemRenderer : IFactory
The factory for the content of this dashlet.
Dashlet
  itemRendererInstance : IVisualElement
[read-only] The instance of the item renderer.
Dashlet
  moveable : Boolean
Flag to enable move behavior.
Dashlet
  originalDashletInfo : DashletInfo
State of the dashlet when it was initialized (the way the programmer initialized it)
Dashlet
  preCollapseDashletInfo : DashletInfo
State of the dashlet when prior to being maximized
Dashlet
  preMaximizeDashletInfo : DashletInfo
State of the dashlet when prior to being maximized
Dashlet
  resizable : Boolean
Flag to enable resize behavior.
Dashlet
  spinner : ISpinner
The spinner component.
Dashlet
  spinnerFactory : IFactory
Factory responsible for instantiating a new spinner.
Dashlet
  spinnerLabel : String
The label of the spinner control, you can use styles to control the appearance.
Dashlet
  title : String
Title or caption displayed in the title bar.
Dashlet
  titleBarHeight : Number
Height of the title bar
Dashlet
  uniqueIdentifier : String
A key used to uniquely identify a zone.
Dashlet
Public Methods
 MethodDefined By
  
animate(sizeFrom:Rectangle, sizeTo:Rectangle, endFunction:Function):void
A method to animate the dashlet.
Dashlet
  
clone(to:Dashlet = null, dlFactory:IFactory = null, propertiesToTransfer:Array = null, stylesToTransfer:Array = null):Dashlet
Clones the current Dashlet.
Dashlet
  
close(doAnimate:Boolean = true):void
Sets the visible and include in layout flags to false
Dashlet
  
collapse():void
Reduces the height to the height of the title bar
Dashlet
  
dispatchEvent(event:Event):Boolean
[override] Whenever a dashboard event is dispatched at any dashlet, we also dispatch it from the dahsboard container so if someone wants to listen for an event at all dashlets.
Dashlet
  
expand():void
Expands the height to the height that the dashlet had prior to being collapsed
Dashlet
  
gatherDashletInfo(dashletInfo:DashletInfo):void
Initializes the dashlet info object passed in with the current state of the dashlet
Dashlet
  
Generates a preview of this dashlet
Dashlet
  
[override]
Dashlet
  
Removes the spinner and sets the bodyContainer.alpha back to 1
Dashlet
  
loadFromDashletInfo(dashletInfo:DashletInfo, expandHide:Boolean = false):void
Loads the collapse, open, title, height, width, x and y from the specified dashlet info.
Dashlet
  
maximize():void
Maximizes the dashlet.
Dashlet
  
Sets the visible and include in layout flags to false
Dashlet
  
open(doAnimate:Boolean = true):void
Sets the visible and include in layout flags to true
Dashlet
  
restore():void
Restores the component to its position prior to being maximized.
Dashlet
  
Sets the visible and include in layout flags to true
Dashlet
  
showSpinner(msg:String):void
Shows the spinner with default values defined below: Label: "Loading please wait" X Position : center X of the grid Y Position : center Y of the grid Grid Alpa when the spinner is active : 0.3 Spinner appearance can be modified using styles .
Dashlet
Protected Methods
 MethodDefined By
  
onDragGripMouseOver(event:MouseEvent):void
Dashlet
  
onResizeGripMouseOver(event:MouseEvent):void
Dashlet
Events
 Event Summary Defined By
  Dispatched when the dashlet is closedDashlet
  Dispatched when the dashlet is is about to be closed.Dashlet
  Dispatched when the dashlet is is about to be collapsed.Dashlet
  Dispatched when the dashlet is collapsedDashlet
  Dispatched when the dashlet is expandedDashlet
  Dispatched when the dashlet is is about to be expanded.Dashlet
  Dispatched when the dashlet is openedDashlet
  Dispatched when the dashlet is is about to be opened.Dashlet
  Dispatched when the dashlet is maximized or restoredDashlet
  Dispatched when the dashlet is maximizedDashlet
  Dispatched when the dashlet is maximizedDashlet
Styles
 Style Description Defined By
  
backgroundColors
Type: Array Format: Color
In order to apply a gradient to the background
Dashlet
  
borderAlpha
Type: Number CSS Inheritance: no Theme: spark
The alpha of the border for this component. The default value is 0.5.
Dashlet
  
borderColor
Type: uint Format: Color CSS Inheritance: no Theme: spark
The color of the border for this component. The default value is 0.
Dashlet
  
borderVisible
Type: Boolean CSS Inheritance: no Theme: spark
Controls the visibility of the border for this component. The default value is true.
Dashlet
  
borderWeight
Type: Number Format: Length CSS Inheritance: no
The stroke weight for the border. The default value is 1.
Dashlet
  
cornerRadius
Type: Number Format: Length CSS Inheritance: no Theme: spark
The radius of the corners for this component. The default value is 0.
Dashlet
  
dropShadowVisible
Type: Boolean CSS Inheritance: no Theme: spark
Controls the visibility of the drop shadow for this component. The default value is true.
Dashlet
  
icon

When enableIcon=true, this property speciies the icon to display. If the icon is dynamic, use the dataField to specify the url instead.
Dashlet
  
spinnerColors
Type: Array Format: Color
Colors for the spinners as an array. First element for the circle color and second for the spinner color
Dashlet
  
spinnerGridAlpha
Type: Number Format: Length
Background color of the grid when the spinner is active
Dashlet
  
spinnerLabelBackgroundColor
Type: uint Format: Color
Bacground color for the box in which the label is displayed
Dashlet
  
spinnerLabelColor
Type: uint Format: Color CSS Inheritance: yes
Label color for the spinner
Dashlet
  
spinnerLabelfontFamily
Type: String CSS Inheritance: yes
Label font family
Dashlet
  
spinnerLabelfontSize
Type: Number Format: Length CSS Inheritance: yes
Label font size
Dashlet
  
spinnerLabelfontStyle
Type: String CSS Inheritance: yes
Label font style
Dashlet
  
spinnerLabelfontThickness
Type: Number CSS Inheritance: yes
Label font thinkcness
Dashlet
  
spinnerLabelfontWeight
Type: String CSS Inheritance: yes
Label font weight
Dashlet
  
spinnerRadius
Type: Number Format: Length
Spinner radius , default value is 10
Dashlet
  
spinnerThickness
Type: Number Format: Length
Spinner thickness , default value is 5
Dashlet
Skin Parts

This component uses skins made up of skin parts. Do not set the skin parts directly. The component's skin sets the skin parts.


 Skin Part Description Defined By
  
buttonGroup:mx.core.IVisualElement
Required: false Part Type: Static
The skin part that holds the buttons
Dashlet
  
dragGrip:mx.core.IVisualElement
Required: false Part Type: Static
The skin part that initiates the drag/drop behavior of this dashlet
Dashlet
  
resizeGrip:mx.core.IVisualElement
Required: false Part Type: Static
The skin part that initiates the resize behavior of this dashlet
Dashlet
  
titleDisplay:spark.core.IDisplayText
Required: false Part Type: Static
The skin part that defines the appearance of the title text in the container.

See also

spark.skins.spark.PanelSkin
Dashlet
  
topGroup:mx.core.IVisualElement
Required: false Part Type: Static
The skin part that defines the appearance of the titlebar
Dashlet
Property Detail
allowInteractivityproperty
allowInteractivity:Boolean  [read-only]

A flat that controls appearance of the buttons. In print mode, none of the buttons are shown.

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


Implementation
    public function get allowInteractivity():Boolean
dashboardContainerproperty 
dashboardContainer:DashboardContainer

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

The Dashboard Container that this Dashlet belongs to.

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


Implementation
    public function get dashboardContainer():DashboardContainer
    public function set dashboardContainer(value:DashboardContainer):void
dragDropZoneproperty 
dragDropZone:DragDropZone

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

The DragDropZone Container that this Dashlet belongs to.

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


Implementation
    public function get dragDropZone():DragDropZone
    public function set dragDropZone(value:DragDropZone):void
draggableproperty 
draggable:Boolean

Flag to enable drag and drop behavior. User can either drag and drop dashlets on top of other dashlets or on top of a drag drop zone. Please note, you should not set draggable and resizable/moveable to true at the same time. For Vertical and horizontal layouts, set draggable so the user can drag and drop the dashlets on top of each other. For basic layout, where the dashlets themselves define x,y,height and width, you can set moveable and resizable. In other words, with basic layout, set draggable=false and movable/resizable=true With horizontal, vertical and tile layouts, set draggable=true and movable/resizable=false

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


Implementation
    public function get draggable():Boolean
    public function set draggable(value:Boolean):void
enableAnimationsproperty 
public var enableAnimations:Boolean = true

Flag to enable transitional animations when the dashlets are minimized and restored from the taskbar, closed, and restored from the picker. Please note, the maxmize effect does not animate. This is because the image proxy used to animate from a small dashlet to a full size one scales horribly and looks weird.

enableCloseproperty 
enableClose:Boolean

A flag that the skin looks for to enable the close button.

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


Implementation
    public function get enableClose():Boolean
    public function set enableClose(value:Boolean):void
enableExpandCollapseproperty 
enableExpandCollapse:Boolean

Flag to enable the expand and collapse functionality for this dashlet.

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


Implementation
    public function get enableExpandCollapse():Boolean
    public function set enableExpandCollapse(value:Boolean):void
enableIconproperty 
enableIcon:Boolean  [read-only]

Flag to display an Icon in the title for this dashlet.

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


Implementation
    public function get enableIcon():Boolean
enableMaximizeAndRestoreproperty 
enableMaximizeAndRestore:Boolean

Flag to enable the maximize and restore functionality for this dashlet.

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


Implementation
    public function get enableMaximizeAndRestore():Boolean
    public function set enableMaximizeAndRestore(value:Boolean):void
enableMinimizeproperty 
enableMinimize:Boolean

Flag to enable the minimize to task bar functionality. Please ensure you set enableTaskBar=true on the dashboard container when you set this flag to true.

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


Implementation
    public function get enableMinimize():Boolean
    public function set enableMinimize(value:Boolean):void
enableTitleBarproperty 
enableTitleBar:Boolean  [read-only]

Boolean flag to control the visibility of the title bar

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


Implementation
    public function get enableTitleBar():Boolean
isCollapsedproperty 
isCollapsed:Boolean  [read-only]

Whether the dashboard is collapsed

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


Implementation
    public function get isCollapsed():Boolean
isMaximizedproperty 
isMaximized:Boolean  [read-only]

Returns true if this dashlet is maximized.

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


Implementation
    public function get isMaximized():Boolean
isMinimizedproperty 
isMinimized:Boolean  [read-only]

Whether the dashboard is minimized to taskbar

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


Implementation
    public function get isMinimized():Boolean
isOpenproperty 
isOpen:Boolean  [read-only]

Whether the dashboard is open

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


Implementation
    public function get isOpen():Boolean
itemRendererproperty 
public var itemRenderer:IFactory

The factory for the content of this dashlet.

itemRendererInstanceproperty 
itemRendererInstance:IVisualElement  [read-only]

The instance of the item renderer. If it has not been added to the content group, will return null instead.


Implementation
    public function get itemRendererInstance():IVisualElement
moveableproperty 
moveable:Boolean

Flag to enable move behavior. Please note, you cannot set draggable and resizable/moveable to true at the same time. For Vertical and horizontal layouts, set draggable so the user can drag and drop the dashlets on top of each other. For basic layout, where the dashlets themselves define x,y,height and width, you can set moveable and resizable. In other words, with basic layout, set draggable=false and movable/resizable=true With horizontal, vertical and tile layouts, set draggable=true and movable/resizable=false


Implementation
    public function get moveable():Boolean
    public function set moveable(value:Boolean):void
originalDashletInfoproperty 
public var originalDashletInfo:DashletInfo

State of the dashlet when it was initialized (the way the programmer initialized it)

preCollapseDashletInfoproperty 
public var preCollapseDashletInfo:DashletInfo

State of the dashlet when prior to being maximized

preMaximizeDashletInfoproperty 
public var preMaximizeDashletInfo:DashletInfo

State of the dashlet when prior to being maximized

resizableproperty 
resizable:Boolean

Flag to enable resize behavior. Please note, when you resize a dashlet, the corresponding zone will resize by the same amount. Please note, you should not set draggable and resizable/moveable to true at the same time. For Vertical and horizontal layouts, set draggable so the user can drag and drop the dashlets on top of each other. For basic layout, where the dashlets themselves define x,y,height and width, you can set moveable and resizable. In other words, with basic layout, set draggable=false and movable/resizable=true With horizontal, vertical and tile layouts, set draggable=true and movable/resizable=false

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


Implementation
    public function get resizable():Boolean
    public function set resizable(value:Boolean):void
spinnerproperty 
public var spinner:ISpinner

The spinner component. Will be null unless showSpinner is called.

spinnerFactoryproperty 
spinnerFactory:IFactory

Factory responsible for instantiating a new spinner. Defaults to com.flexicious.Spinner. Needs to implement com.flexicious.interfaces.ISpinner, and extend UIComponent


Implementation
    public function get spinnerFactory():IFactory
    public function set spinnerFactory(value:IFactory):void
spinnerLabelproperty 
spinnerLabel:String

The label of the spinner control, you can use styles to control the appearance.


Implementation
    public function get spinnerLabel():String
    public function set spinnerLabel(value:String):void
titleproperty 
title:String

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

Title or caption displayed in the title bar.

The default value is "".

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

Height of the title bar


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

A key used to uniquely identify a zone. Defaults to the title Used in print and preference persistence to identify drag drop zones.


Implementation
    public function get uniqueIdentifier():String
    public function set uniqueIdentifier(value:String):void
Method Detail
animate()method
public function animate(sizeFrom:Rectangle, sizeTo:Rectangle, endFunction:Function):void

A method to animate the dashlet.

Parameters

sizeFrom:Rectangle — Size to animate from (x is width, y is height)
 
sizeTo:Rectangle — Size to animate to (x is width, y is height)
 
endFunction:Function — Position to animate from

clone()method 
public function clone(to:Dashlet = null, dlFactory:IFactory = null, propertiesToTransfer:Array = null, stylesToTransfer:Array = null):Dashlet

Clones the current Dashlet.

Parameters

to:Dashlet (default = null) — The dashlet to clone this to. Can be null. IF null, instantiated from dzFactory.newInstance()
 
dlFactory:IFactory (default = null) — The factory used to initialize the resultant dashlet
 
propertiesToTransfer:Array (default = null)
 
stylesToTransfer:Array (default = null)

Returns
Dashlet — The cloned Dashlet
close()method 
public function close(doAnimate:Boolean = true):void

Sets the visible and include in layout flags to false

Parameters

doAnimate:Boolean (default = true)

collapse()method 
public function collapse():void

Reduces the height to the height of the title bar

dispatchEvent()method 
override public function dispatchEvent(event:Event):Boolean

Whenever a dashboard event is dispatched at any dashlet, we also dispatch it from the dahsboard container so if someone wants to listen for an event at all dashlets.

Parameters

event:Event

Returns
Boolean
expand()method 
public function expand():void

Expands the height to the height that the dashlet had prior to being collapsed

gatherDashletInfo()method 
public function gatherDashletInfo(dashletInfo:DashletInfo):void

Initializes the dashlet info object passed in with the current state of the dashlet

Parameters

dashletInfo:DashletInfo

generatePreivew()method 
public function generatePreivew():Bitmap

Generates a preview of this dashlet

Returns
Bitmap — Bitmap data containing the preview
getExplicitOrMeasuredWidth()method 
override public function getExplicitOrMeasuredWidth():Number

Returns
Number
hideSpinner()method 
public function hideSpinner():void

Removes the spinner and sets the bodyContainer.alpha back to 1

loadFromDashletInfo()method 
public function loadFromDashletInfo(dashletInfo:DashletInfo, expandHide:Boolean = false):void

Loads the collapse, open, title, height, width, x and y from the specified dashlet info.

Parameters

dashletInfo:DashletInfo
 
expandHide:Boolean (default = false)

maximize()method 
public function maximize():void

Maximizes the dashlet.

minimizeToTaskBar()method 
public function minimizeToTaskBar():void

Sets the visible and include in layout flags to false

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

Parameters

event:MouseEvent

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

Parameters

event:MouseEvent

open()method 
public function open(doAnimate:Boolean = true):void

Sets the visible and include in layout flags to true

Parameters

doAnimate:Boolean (default = true)

restore()method 
public function restore():void

Restores the component to its position prior to being maximized.

restoreFromTaskBar()method 
public function restoreFromTaskBar():void

Sets the visible and include in layout flags to true

showSpinner()method 
public function showSpinner(msg:String):void

Shows the spinner with default values defined below: Label: "Loading please wait" X Position : center X of the grid Y Position : center Y of the grid Grid Alpa when the spinner is active : 0.3 Spinner appearance can be modified using styles .

Parameters

msg:String

Event Detail
dashletClosed Event
Event Object Type: com.flexicious.events.DashboardEvent

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.1

Dispatched when the dashlet is closed

dashletClosing Event  
Event Object Type: com.flexicious.events.DashboardEvent

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.1

Dispatched when the dashlet is is about to be closed. Can be cancelled

dashletCollapsed Event  
Event Object Type: com.flexicious.events.DashboardEvent

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.1

Dispatched when the dashlet is is about to be collapsed. Can be cancelled

dashletCollapsing Event  
Event Object Type: com.flexicious.events.DashboardEvent

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.1

Dispatched when the dashlet is collapsed

dashletExpanded Event  
Event Object Type: com.flexicious.events.DashboardEvent

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.1

Dispatched when the dashlet is expanded

dashletExpanding Event  
Event Object Type: com.flexicious.events.DashboardEvent

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.1

Dispatched when the dashlet is is about to be expanded. Can be cancelled

dashletOpen Event  
Event Object Type: com.flexicious.events.DashboardEvent

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.1

Dispatched when the dashlet is opened

dashletOpening Event  
Event Object Type: com.flexicious.events.DashboardEvent

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.1

Dispatched when the dashlet is is about to be opened. Can be cancelled

maximizeChanged Event  
Event Object Type: com.flexicious.events.DashboardEvent

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.1

Dispatched when the dashlet is maximized or restored

maximized Event  
Event Object Type: com.flexicious.events.DashboardEvent

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.1

Dispatched when the dashlet is maximized

restored Event  
Event Object Type: com.flexicious.events.DashboardEvent

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.1

Dispatched when the dashlet is maximized