Packageflexlib.containers
Classpublic class WindowShade
InheritanceWindowShade Inheritance mx.core.LayoutContainer

This control displays a button, which when clicked, will cause a panel to "unroll" beneath it like a windowshade being pulled down; or if the panel is already displayed it will be "rolled up" like a windowshade being rolled up. When multiple WindowShades are stacked in a VBox, the result will be similar to an mx.containers.Accordian container, except that multiple WindowShades can be opened simultaneously whereas an Accordian acts like a tab navigator, with only one panel visible at a time.



Public Properties
 PropertyDefined by
  headerLocation : String
Specifies where the header button is placed relative tot he content of this WindowShade.
WindowShade
  headerRenderer : IFactory
To control the header used on the WindowShade component you can either set the headerClass or the headerRenderer.
WindowShade
  label : String
The text that appears on the headerButton.
WindowShade
  opened : Boolean
Sets or gets the state of this WindowShade, either opened (true) or closed (false).
WindowShade
  viewMetrics : EdgeMetrics
[read-only]
WindowShade
Public Methods
 MethodDefined by
  
WindowShade
Protected Methods
 MethodDefined by
  
applyHeaderButtonStyles(button:Button):void
WindowShade
  
WindowShade
Events
 EventSummaryDefined by
   Dispatched when the WindowShade is about to be closed.WindowShade
   Dispatched when the WindowShade has finished closing.WindowShade
   Dispatched when the WindowShade is about to be opened.WindowShade
   Dispatched when the opened property is changed, either through user action or programatically.WindowShade
   Dispatched when the WindowShade has finished opening.WindowShade
Styles
 StyleDescriptionDefined by
  
closeDuration
Type: Number   Format: Time   CSS Inheritance: no
The duration of the WindowShade closing transition, in milliseconds. The value 0 specifies no transition. The default value is 250.
WindowShade
  
closeIcon
Type: Class   CSS Inheritance: no
This is the icon displayed on the headerButton when the WindowShade is in the closed state.
WindowShade
  
headerClass
Type: Class   CSS Inheritance: no
The class from which the headerButton will be instantiated. Must be mx.controls.Button or a subclass. The default value is mx.controls.Button.
WindowShade
  
headerStyleName
Type: String   CSS Inheritance: no
Name of CSS style declaration that specifies styles for the headerButton.
WindowShade
  
headerTextAlign
Type: String   CSS Inheritance: no
Alignment of text on the headerButton. The value set for this style is used as the textAlign style on the headerButton. Valid values are "left", "center" and "right". The default value is "right".
WindowShade
  
openDuration
Type: Number   Format: Time   CSS Inheritance: no
The duration of the WindowShade opening transition, in milliseconds. The value 0 specifies no transition. The default value is 250.
WindowShade
  
openIcon
Type: Class   CSS Inheritance: no
This is the icon displayed on the headerButton when the WindowShade is in the open state.
WindowShade
  
toggleHeader
Type: Boolean   CSS Inheritance: no
If true, the value of the headerButton's toggle property will be set to true; otherwise the toggle property will be left in its default state. The default value is false.
WindowShade
Property detail
headerLocationproperty
headerLocation:String  [read-write]

Specifies where the header button is placed relative tot he content of this WindowShade. Possible values are top and bottom.

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

Implementation
    public function get headerLocation():String
    public function set headerLocation(value:String):void
headerRendererproperty 
headerRenderer:IFactory  [read-write]

To control the header used on the WindowShade component you can either set the headerClass or the headerRenderer. The headerRenderer works similar to the itemRenderer of a List control. You can set this using MXML using any Button control. This would let you customize things like button skin. You could even combine this with the CanvasButton component to make complex headers.

Implementation
    public function get headerRenderer():IFactory
    public function set headerRenderer(value:IFactory):void
labelproperty 
label:String  [read-write]

The text that appears on the headerButton.

Implementation
    public function get label():String
    public function set label(value:String):void
openedproperty 
public var opened:Boolean

Sets or gets the state of this WindowShade, either opened (true) or closed (false).

viewMetricsproperty 
viewMetrics:EdgeMetrics  [read-only]Implementation
    public function get viewMetrics():EdgeMetrics
Constructor detail
WindowShade()constructor
public function WindowShade()
Method detail
applyHeaderButtonStyles()method
protected function applyHeaderButtonStyles(button:Button):voidParameters
button:Button
createOrReplaceHeaderButton()method 
protected function createOrReplaceHeaderButton():void
Event detail
closeBeginevent 
Event object type: flexlib.events.WindowShadeEvent

Dispatched when the WindowShade is about to be closed. This event cannot be cancelled.

In most cases, an event of this type will be followed by an event of type WindowShadeEvent.CLOSE_END (closeEnd); however, if the user clicks the header button before the closing transition has run to completion, the closeEnd event will not be dispatched, since the WindowShade will not be left in the closed state.

closeEndevent  
Event object type: flexlib.events.WindowShadeEvent

Dispatched when the WindowShade has finished closing. This event cannot be cancelled.

openBeginevent  
Event object type: flexlib.events.WindowShadeEvent

Dispatched when the WindowShade is about to be opened.

In most cases, an event of this type will be followed by an event of type WindowShadeEvent.OPEN_END (openEnd); however, if the user clicks the header button before the closing transition has run to completion, the openEnd event will not be dispatched, since the WindowShade will not be left in the opened state.

openedChangedevent  
Event object type: flexlib.events.WindowShadeEvent

Dispatched when the opened property is changed, either through user action or programatically. This event is cancelable. When cancelled through a call to Event.preventDefault(), the opened property will be restored to its previous state.

openEndevent  
Event object type: flexlib.events.WindowShadeEvent

Dispatched when the WindowShade has finished opening. This event cannot be cancelled.