KoolMoves AS3 API Documentation | All Packages | All Classes | Index | Frames No Frames |
Class DragContainer

Package | km.components
Class | public class DragContainer
Inheritance | DragContainer UIComponent 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
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined 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
|  | duotone : Array The duotone property can be used to convert the colors of the component into duotone. | UIComponent
|  | enabled : 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
|  | height : 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
|  | toolTip : String Text to use as toolTip when ToolTip is enabled. | UIComponent
|  | width : Number | UIComponent
|  | x : Number | UIComponent
|  | y : Number | UIComponent

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined by
--- | --- | ---
|  | DragContainer() | DragContainer
|  | 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
|  | move(x:int, y:int, animationMode:int = 0, animationFrames:int = 12, easeInOut:Boolean = false):void Moves the component to the specified coordinates. | UIComponent
|  | setProperties(o:Object):void Sets a number of properties at once. | UIComponent
|  | setSize(w:int, h:int):void Sets the size width and height. | UIComponent

Events
Hide Inherited Events
Show Inherited Events

| Event | Summary | Defined by
--- | --- | --- | ---
|  | animationComplete | The animationComplete event is broadcasted when an animated move is completed. | UIComponent
|  | close |  | DragContainer
|  | maximize |  | DragContainer
|  | minimize |  | DragContainer
|  | startDrag |  | DragContainer
|  | stopDrag |  | DragContainer

Property detail

background | property

`background:Image` [read-only]

>> Reference to the background image.

Implementation
`public function get background():Image`

btnClose | property |

`btnClose:LabelButton` [read-only]

>> Reference to the close button.

Implementation
`public function get btnClose():LabelButton`

btnMaximize | property |

`btnMaximize:LabelButton` [read-only]

>> Reference to the maximize button.

Implementation
`public function get btnMaximize():LabelButton`

btnMinimize | property |

`btnMinimize:LabelButton` [read-only]

>> Reference to the minimize button.

Implementation
`public function get btnMinimize():LabelButton`

buttonMargin | property |

`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`

dragAlpha | property |

`public var dragAlpha:Number = .6`

Component alpha while dragging.

header | property |

`header:LabelButton` [read-only]

>> Reference to the header.

Implementation
`public function get header():LabelButton`

headerSize | property |

`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`

object | property |

`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`

objectMargin | property |

`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`

showClose | property |

`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`

showMinMax | property |

`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

close | event

Event object type: `flash.events.Event`

maximize | event |

Event object type: `flash.events.Event`

minimize | event |

Event object type: `flash.events.Event`

startDrag | event |

Event object type: `flash.events.Event`

stopDrag | event |

Event object type: `flash.events.Event`

Last update : 04/05/2008