A draggable window. Can be used as a container for other components.

Constructor

new (?parent:DisplayObjectContainer, ?xpos:Float, ?ypos:Float, ?title:String)

Constructor

Parameters:

parent

The parent DisplayObjectContainer on which to add this Panel.

xpos

The x position to place this component.

ypos

The y position to place this component.

title

The string to display in the title bar.

Variables

color:Int

Gets / sets the background color of this panel.

read onlycontent:DisplayObjectContainer

Container for content added to this panel. This is just a reference to the content of the internal Panel, which is masked, so best to add children to content, rather than directly to the window.

draggable:Bool

Sets / gets whether or not the window will be draggable by the title bar.

read onlygrips:Shape

Returns a reference to the shape showing the grips on the title bar. Can be used to do custom drawing or turn them invisible.

hasCloseButton:Bool

Sets / gets whether or not the window will display a close button. Close button merely dispatches a CLOSE event when clicked. It is up to the developer to handle this event.

hasMinimizeButton:Bool

Gets / sets whether or not the window will show a minimize button that will toggle the window open and closed. A closed window will only show the title bar.

minimized:Bool

Gets / sets whether the window is closed. A closed window will only show its title bar.

shadow:Bool

Gets / sets whether or not this Window will have a drop shadow.

title:String

Gets / sets the title shown in the title bar.

titleBar:Panel

Returns a reference to the title bar for customization.

Methods

addChild (child:DisplayObject):DisplayObject

Overridden to add new child to content.

addRawChild (child:DisplayObject):DisplayObject

Access to super.addChild

draw ():Void

Draws the visual ui of the component.

get_color ():Int

get_content ():DisplayObjectContainer

get_grips ():Shape

get_height ():Float

Gets the height of the component. A minimized window's height will only be that of its title bar.

get_shadow ():Bool

get_title ():String

set_color (value:Int):Int

set_draggable (value:Bool):Bool

set_hasCloseButton (value:Bool):Bool

set_hasMinimizeButton (value:Bool):Bool

set_minimized (value:Bool):Bool

set_shadow (value:Bool):Bool

set_title (value:String):String

Inherited Variables

Defined by Component

enabled:Bool

Sets/gets whether this component is enabled or not.

tag:Int

Sets/gets in integer that can identify the component.

Inherited Methods

Defined by Component

get_enabled ():Bool

get_tag ():Int

get_width ():Float

move (xpos:Float, ypos:Float):Void

Moves the component to the specified position.

Parameters:

xpos

the x position to move the component

ypos

the y position to move the component

setSize (w:Float, h:Float):Void

Sets the size of the component.

Parameters:

w

The width of the component.

h

The height of the component.

set_enabled (value:Bool):Bool

set_height (value:Float):Void

Sets/gets the height of the component.

set_tag (value:Int):Int

set_width (value:Float):Void

Sets/gets the width of the component.

set_x (value:Float):Void

Overrides the setter for x to always place the component on a whole pixel.

set_y (value:Float):Void

Overrides the setter for y to always place the component on a whole pixel.