Packagekm.components
Classpublic class DragContainer
InheritanceDragContainer Inheritance UIComponent Inheritance flash.display.Sprite

The DragContainer component class.


Example
import km.components.*;
import km.skins.*;

var rt:RichTextEditor = new RichTextEditor();
rt.setSize(300,140);
rt.defaultTextFormat = new TextFormat('_sans',14);
rt.text = 'Enter your text';

var dc:DragContainer = new DragContainer();
ScriptedSkin.applyTo(dc);
dc.header.label.text = 'Drag container 1';
dc.move(20,20);
addChild(dc);

dc.object = rt;



Public Properties
 PropertyDefined by
  background : Image
[read-only] >> Reference to the background image.
DragContainer
  btnClose : LabelButton
[read-only] >> Reference to the close button.
DragContainer
  btnMaximize : LabelButton
[read-only] >> Reference to the maximize button.
DragContainer
  btnMinimize : LabelButton
[read-only] >> Reference to the minimize button.
DragContainer
  buttonMargin : int
The margin between the minimize / maximize / close buttons and the outside of the header.
DragContainer
  dragAlpha : Number = .6
Component alpha while dragging.
DragContainer
 Inheritedduotone : Array
The duotone property can be used to convert the colors of the component into duotone.
UIComponent
 Inheritedenabled : Boolean
Specifies if the component is enabled.
If a component is disabled, it will be turned into grayscale and become partly transparent.
UIComponent
  header : LabelButton
[read-only] >> Reference to the header.
DragContainer
  headerSize : int
The size of the header.
This value controls the height of the header.
DragContainer
 Inheritedheight : Number
UIComponent
  object : *
Gets or sets the contained object.
Supported object types are Accordion, ContentPane, DateChooser, Image, List, MediaPlayer, PixelScreen, RichTextEditor, ScrollPane, Tree.
DragContainer
  objectMargin : int
The margin between the container and the contained object.
DragContainer
  showClose : Boolean
Gets or sets if the close button is shown.
DragContainer
  showMinMax : Boolean
Gets or sets if the minimize / maximize buttons are shown.
DragContainer
 InheritedtoolTip : String
Text to use as toolTip when ToolTip is enabled.
UIComponent
 Inheritedwidth : Number
UIComponent
 Inheritedx : Number
UIComponent
 Inheritedy : Number
UIComponent
Public Methods
 MethodDefined by
  
DragContainer
 Inherited
clone():*
Returns a clone of the component.
The skin of the component is cloned but other things like the text of a label or the items of a list aren't.
UIComponent
  
close():void
Close the container.
This frees the object from the container and removes the container from the display list.
DragContainer
  
maximize():void
Maximize the container.
DragContainer
  
minimize():void
Minimize the container.
DragContainer
 Inherited
move(x:int, y:int, animationMode:int = 0, animationFrames:int = 12, easeInOut:Boolean = false):void
Moves the component to the specified coordinates.
UIComponent
 Inherited
setProperties(o:Object):void
Sets a number of properties at once.
UIComponent
 Inherited
setSize(w:int, h:int):void
Sets the size width and height.
UIComponent
Events
 EventSummaryDefined by
 Inherited The animationComplete event is broadcasted when an animated move is completed.UIComponent
    DragContainer
    DragContainer
    DragContainer
    DragContainer
    DragContainer
Property detail
backgroundproperty
background:Image  [read-only]

>> Reference to the background image.

Implementation
    public function get background():Image
btnCloseproperty 
btnClose:LabelButton  [read-only]

>> Reference to the close button.

Implementation
    public function get btnClose():LabelButton
btnMaximizeproperty 
btnMaximize:LabelButton  [read-only]

>> Reference to the maximize button.

Implementation
    public function get btnMaximize():LabelButton
btnMinimizeproperty 
btnMinimize:LabelButton  [read-only]

>> Reference to the minimize button.

Implementation
    public function get btnMinimize():LabelButton
buttonMarginproperty 
buttonMargin:int  [read-write]

The margin between the minimize / maximize / close buttons and the outside of the header.

Implementation
    public function get buttonMargin():int
    public function set buttonMargin(value:int):void
dragAlphaproperty 
public var dragAlpha:Number = .6

Component alpha while dragging.

headerproperty 
header:LabelButton  [read-only]

>> Reference to the header.

Implementation
    public function get header():LabelButton
headerSizeproperty 
headerSize:int  [read-write]

The size of the header.
This value controls the height of the header.

Implementation
    public function get headerSize():int
    public function set headerSize(value:int):void
objectproperty 
object:*  [read-write]

Gets or sets the contained object.
Supported object types are Accordion, ContentPane, DateChooser, Image, List, MediaPlayer, PixelScreen, RichTextEditor, ScrollPane, Tree.

Implementation
    public function get object():*
    public function set object(value:*):void
objectMarginproperty 
objectMargin:int  [read-write]

The margin between the container and the contained object.

Implementation
    public function get objectMargin():int
    public function set objectMargin(value:int):void
showCloseproperty 
showClose:Boolean  [read-write]

Gets or sets if the close button is shown.

Implementation
    public function get showClose():Boolean
    public function set showClose(value:Boolean):void
showMinMaxproperty 
showMinMax:Boolean  [read-write]

Gets or sets if the minimize / maximize buttons are shown.

Implementation
    public function get showMinMax():Boolean
    public function set showMinMax(value:Boolean):void
Constructor detail
DragContainer()constructor
public function DragContainer()
Method detail
close()method
public function close():void

Close the container.
This frees the object from the container and removes the container from the display list.

maximize()method 
public function maximize():void

Maximize the container.

minimize()method 
public function minimize():void

Minimize the container.

Event detail
closeevent 
Event object type: flash.events.Event

maximizeevent  
Event object type: flash.events.Event

minimizeevent  
Event object type: flash.events.Event

startDragevent  
Event object type: flash.events.Event

stopDragevent  
Event object type: flash.events.Event