class org.aswing.JFrame extends JWindow

JFrame is a window with title and maximized/iconified/normal state, and resizer.

Authors

  • paling

Class Fields

static var DISPOSE_ON_CLOSE:Int

See Also

static var HIDE_ON_CLOSE:Int

See Also

static var ICONIFIED:Int

See Also

static var MAXIMIZED:Int

See Also

static var MAXIMIZED_HORIZ:Int

See Also

static var MAXIMIZED_VERT:Int

See Also

static var NORMAL:Int

See Also

static var PROPERTY_TITLE_BAR:String

For title bar changed event property name.

Instance Fields

Show inherited public instance fieldsHide inherited public instance fields

Inherited from JWindow

var activable:Bool
var actived:Bool
var content:Container
function focusAtThisWindow():Void
function getOwnedWindows():Array<Dynamic>
function getWindowOwner():JWindow

Inherited from JPopup

var modal:Bool
var owner:Dynamic
function dispose():Void
function getGroundContainer():DisplayObjectContainer
function getModalMC():Sprite
function getOwnedEquipedPopups():Array<JPopup>
function getOwnedPopups():Array<Dynamic>
function getPopupAncestorMC():DisplayObjectContainer
function hide():Void
function resetModalMC():Void
function shouldGroundVisible():Bool
function shouldOwnedPopupGroundVisible(popup:JPopup):Bool
function show():Void
function toBack():Void
function toFront():Void

Inherited from JRootPane

var defaultButton:JButton
function getKeyMap():KeyMap
function getKeyboardManager():KeyboardManager
function registerMnemonic(button:AbstractButton):Void
function setKeyMapActived(b:Bool):Void
function setMnemonicTriggerProxy(trigger:InteractiveObject):Void
function unregisterMnemonic(button:AbstractButton):Void

Inherited from Container

var layout:LayoutManager
function append(com:Component, ?constraints:Dynamic):Void
function appendAll(coms:Array<Dynamic>):Void
function doLayout():Void
function getComponent(index:Int):Component
function getComponentCount():Int
function getComponents():Array<Dynamic>
function getFocusTraversalPolicy():FocusTraversalPolicy
function getIndex(com:Component):Int
function getLayout():LayoutManager
function insert(i:Int, com:Component, ?constraints:Dynamic):Void
function insertAll(index:Int, coms:Array<Dynamic>):Void
function invalidate():Void
function isAncestorOf(c:Component):Bool
function reAppendChildren():Void
function remove(com:Component):Component
function removeAll():Void
function removeAt(i:Int):Component
function removeChild(child:DisplayObject):DisplayObject
function removeChildAt(index:Int):DisplayObject
function setFocusTraversalPolicy(ftp:FocusTraversalPolicy):Void
function setLayout(layout:LayoutManager):Void
function validate():Void

Inherited from Component

var alignmentX:Float
var alignmentY:Float
var background:ASColor
var backgroundDecorator:GroundDecorator
var border:Border
var bounds:IntRectangle
var clipBounds:IntRectangle
var constraints:Dynamic
var currentSize:IntDimension
var dragEnabled:Bool
var dropTrigger:Bool
var enabled:Bool
var focusable:Bool
var focusableSet:Bool
var font:ASFont
var foreground:ASColor
var foregroundDecorator:GroundDecorator
var location:IntPoint
var maximumSize:IntDimension
var mideground:ASColor
var minimumSize:IntDimension
var opaque:Bool
var opaqueSet:Bool
var preferredSize:IntDimension
var resizerMargin:Insets
var styleProxy:Component
var styleTune:StyleTune
var toolTipText:String
var transitFocusFactor:Float
var ui:ComponentUI
var uiElement:Bool
var visibility:Bool
function addDragAcceptableInitiator(com:Component):Void
function componentToGlobal(p:IntPoint):IntPoint
function getClientProperty(key:String, ?defaultValue:Dynamic):Dynamic
function getDefaultBasicUIClass():Class<Dynamic>
function getFocusManager():FocusManager
function getGlobalLocation(?rv:IntPoint):IntPoint
function getInsets():Insets
function getInternalFocusObject():InteractiveObject
function getKeyboardManager():KeyboardManager
function getMousePosition():IntPoint
function getPaintBounds():IntRectangle
function getParent():Container
function getRootPaneAncestor():JRootPane
function getUIClassID():String
function globalToComponent(p:IntPoint):IntPoint
function hitTestMouse():Bool
function invalidate():Void
function invalidatePreferSizeCaches():Void
function isCachePreferSizes():Bool
function isDragAcceptableInitiator(com:Component):Bool
function isFocusOwner():Bool
function isFontValidated():Bool
function isOnStage():Bool
function isShowing():Bool
function isValid():Bool
function isValidateRoot():Bool
function makeFocus():Void
function pack():Void
function paintFocusRect(?force:Bool):Void
function paintImmediately():Void
function parentReAppendChildren():Void
function putClientProperty(key:String, value:Dynamic):Void
function reAppendToParent(?constraints:Dynamic):Void
function removeDragAcceptableInitiator(com:Component):Void
function removeFromContainer():Void
function repaint():Void
function repaintAndRevalidate():Void
function requestFocus():Bool
function revalidate():Void
function setCachePreferSizes(b:Bool):Void
function setClipSize(size:IntDimension):Void
function setDragAcceptableInitiatorAppraiser(func:Dynamic ->Bool):Void
function setFontValidated(b:Bool):Void
function setGlobalLocation(gp:IntPoint):Void
function transferFocus():Bool
function transferFocusBackward():Bool
function updateUI():Void
function validate():Void

Inherited from AWSprite

function bringToBottom(child:DisplayObject):Void
function bringToTop(child:DisplayObject):Void
function containsChild(child:DisplayObject):Bool
function getHighestIndexUnderForeground():Int
function getLowestIndexAboveBackground():Int
function isClipMasked():Bool
function setChildIndex(child:DisplayObject, index:Int):Void
function setClipMaskRect(b:IntRectangle):Void
function setClipMasked(m:Bool):Void
function toString():String

Inherited from Sprite

var buttonMode:Bool
var dropTarget:DisplayObject
var graphics:Graphics
var hitArea:Sprite
var soundTransform:SoundTransform
var useHandCursor:Bool
function startDrag(?lockCenter:Bool, ?bounds:Rectangle):Void
function startTouchDrag(touchPointID:Int, ?lockCenter:Bool, ?bounds:Rectangle):Void
function stopDrag():Void
function stopTouchDrag(touchPointID:Int):Void

Inherited from DisplayObjectContainer

var mouseChildren:Bool
var numChildren:Int
var tabChildren:Bool
var textSnapshot:TextSnapshot
function addChild(child:DisplayObject):DisplayObject
function addChildAt(child:DisplayObject, index:Int):DisplayObject
function areInaccessibleObjectsUnderPoint(point:Point):Bool
function contains(child:DisplayObject):Bool
function getChildAt(index:Int):DisplayObject
function getChildByName(name:String):DisplayObject
function getChildIndex(child:DisplayObject):Int
function getObjectsUnderPoint(point:Point):Array<DisplayObject>
function removeChild(child:DisplayObject):DisplayObject
function removeChildAt(index:Int):DisplayObject
function setChildIndex(child:DisplayObject, index:Int):Void
function swapChildren(child1:DisplayObject, child2:DisplayObject):Void
function swapChildrenAt(index1:Int, index2:Int):Void

Inherited from InteractiveObject

var accessibilityImplementation:AccessibilityImplementation
var contextMenu:ContextMenu
var doubleClickEnabled:Bool
var focusRect:Dynamic
var mouseEnabled:Bool
var tabEnabled:Bool
var tabIndex:Int

Inherited from DisplayObject

var accessibilityProperties:AccessibilityProperties
var alpha:Float
var blendMode:BlendMode
var blendShader:Shader
var cacheAsBitmap:Bool
var filters:Array<BitmapFilter>
var height:Float
var loaderInfo:LoaderInfo
var mask:DisplayObject
var mouseX:Float
var mouseY:Float
var name:String
var opaqueBackground:Null<UInt>
var parent:DisplayObjectContainer
var root:DisplayObject
var rotation:Float
var rotationX:Float
var rotationY:Float
var rotationZ:Float
var scale9Grid:Rectangle
var scaleX:Float
var scaleY:Float
var scaleZ:Float
var scrollRect:Rectangle
var stage:Stage
var transform:Transform
var visible:Bool
var width:Float
var x:Float
var y:Float
var z:Float
function getBounds(targetCoordinateSpace:DisplayObject):Rectangle
function getRect(targetCoordinateSpace:DisplayObject):Rectangle
function globalToLocal(point:Point):Point
function globalToLocal3D(point:Point):Vector3D
function hitTestObject(obj:DisplayObject):Bool
function hitTestPoint(x:Float, y:Float, ?shapeFlag:Bool):Bool
function local3DToGlobal(point3d:Vector3D):Point
function localToGlobal(point:Point):Point

Inherited from EventDispatcher

function addEventListener(type:String, listener:Dynamic ->Void?useCapture:Bool, ?priority:Int, ?useWeakReference:Bool):Void
function dispatchEvent(event:Event):Bool
function hasEventListener(type:String):Bool
function removeEventListener(type:String, listener:Dynamic ->Void?useCapture:Bool):Void
function toString():String
function willTrigger(type:String):Bool

var closable:Bool

Whether this frame can be closed by the user. By default, it's true.

Whether the frame will be hide or dispose, depend on the value returned by this.getDefaultCloseOperation.

var defaultCloseOperation:Int

Sets the operation that will happen by default when the user initiates a "close" on this frame. You must specify one of the following choices:

  • DO_NOTHING_ON_CLOSE (defined in WindowConstants): Don't do anything; require the program to handle the operation in the windowClosing method of a registered EventListener object.

  • `HIDE_ON_CLOSE` (defined in `WindowConstants`): Automatically hide the frame after invoking any registered EventListener objects.
  • `DISPOSE_ON_CLOSE` (defined in `WindowConstants`): Automatically hide and dispose the frame after invoking any registered EventListener objects.

The value is set to `DISPOSE_ON_CLOSE` by default. if you set a value is not three of them, think of it is will be changed to default value.

operation

the operation which should be performed when the user closes the frame

var dragDirectly:Bool

Indicate whether need move frame directly when drag the frame.

if set to false, there will be a rectange to represent then bounds what will be move to. if set to true, the frame will be move directly when drag, but this is need more cpu counting.
Default is false.

var dragDirectlySet:Bool

Whether dragDirectly property is set by user.

var dragable:Bool

Whether this frame can be dragged by the user. By default, it's true.

"dragable" means drag to move the frame.

var icon:Icon

The icon to be displayed in the title bar for this frame.

null to display no icon in the title bar.

var resizable:Bool

Whether this frame is resizable by the user.

"resizable" means include capability of restore normal resize, maximize, iconified and resize by drag.

var title:String

The text to be displayed in the title bar for this frame.

null to display no text in the title bar.

function new(?owner:Dynamic = null, ?title:String = '', ?modal:Bool = false): Void

Create a JWindow

owner

the owner of this popup, it can be a DisplayObjectContainer or a JPopup, default it is default is AsWingManager.getRoot()

title

the title, default is "".

modal

true for a modal dialog, false for one that allows other windows to be active at the same time, default is false.

See Also

function closeReleased(): Void

User pressed close button to close the Frame depend on the defaultCloseOperation

This method will fire a FrameEvent.FRAME_CLOSING event.

See Also

function getMaximizedBounds(): IntRectangle

Gets maximized bounds for this frame.
If the maximizedBounds was setted by setMaximizedBounds it will return the setted value. else if the owner is a JWindow it will return the owner's content pane's bounds, if the owner is a movieclip it will return the movie's stage bounds.

function getResizer(): Resizer

function getState(): Int

function isResizable(): Bool

Returns whether this frame is resizable by the user. By default, all frames are initially resizable.

"resizable" means include capability of restore normal resize, maximize, iconified and resize by drag.

See Also

function isResizeDirectly(): Bool

Return whether need resize frame directly when drag the resizer arrow.

See Also

function setMaximizedBounds(b:IntRectangle): Void

Sets the maximized bounds for this frame.

b

bounds for the maximized state, null to back to use default bounds descripted in getMaximizedBounds's comments.

See Also

function setResizable(b:Bool): Void

Sets whether this frame is resizable by the user.

"resizable" means include capability of restore normal resize, maximize, iconified and resize by drag.

b

true user can resize the frame by click resize buttons or drag to scale the frame, false user can't.

See Also

function setResizeDirectly(b:Bool): Void

Indicate whether need resize frame directly when drag the resizer arrow. if set to false, there will be a rectange to represent then size what will be resized to. if set to true, the frame will be resize directly when drag, but this is need more cpu counting.
Default is false.

See Also

function setResizer(r:Resizer): Void

function setState(s:Int, ?programmatic:Bool = true): Void

function tryToClose(): Void

Try to close the Frame depend on the defaultCloseOperation

See Also