Package | km.components |
Class | public class DragContainer |
Inheritance | DragContainer ![]() ![]() |
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;
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 |
Method | Defined by | ||
---|---|---|---|
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 |
Event | Summary | Defined by | ||
---|---|---|---|---|
![]() | The animationComplete event is broadcasted when an animated move is completed. | UIComponent | ||
DragContainer | ||||
DragContainer | ||||
DragContainer | ||||
DragContainer | ||||
DragContainer |
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.
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.
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
DragContainer | () | constructor |
public function DragContainer()
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.
close | event |
maximize | event |
minimize | event |
startDrag | event |
stopDrag | event |