new JFrame()
public function JFrame(owner, title, modal:Boolean)
JFrame(title:String, modal:Boolean)
JFrame(title:String)
JFrame(owner, title:String, modal:Boolean)
JFrame(owner, title:String)
JFrame(owner)
JFrame()
owner | the owner of this window, a JWindow
or a MovieClip , default is ASWingUtils.getRootMovieClip()
|
title | the String to display in the dialog's title bar. default is undefined. |
modal | true for a modal dialog, false for one that allows other windows to be active at the same time, default is false. |
static public ON_STATE_CHANGED:String
static public ON_ABILITY_CHANGED:String
static public NORMAL:Number
static public ICONIFIED:Number
static public MAXIMIZED_HORIZ:Number
static public MAXIMIZED_VERT:Number
static public MAXIMIZED:Number
static public DO_NOTHING_ON_CLOSE:Number
static public HIDE_ON_CLOSE:Number
static public DISPOSE_ON_CLOSE:Number
public function updateUI():Void
Description copied from Component
Resets the UI property to a value from the current look and feel.
Component
subclasses must override this method
like this:
public void updateUI() { setUI((SliderUI)UIManager.getUI(this); }
public function getUIClassID():String
Description copied from Component
Returns the UIDefaults
key used to
look up the name of the org.aswing.plaf.ComponentUI
class that defines the look and feel
for this component. Most applications will never need to
call this method. Subclasses of Component
that support
pluggable look and feel should override this method to
return a UIDefaults
key that maps to the
ComponentUI
subclass that defines their look and feel.
public function setTitle(t:String):Void
Sets the text to be displayed in the title bar for this frame.
t | the text to be displayed in the title bar, null to display no text in the title bar. |
public function getTitle():String
Returns the text displayed in the title bar for this frame.
the text displayed in the title bar for this frame.
public function setIcon(ico:Icon):Void
Sets the icon to be displayed in the title bar for this frame.
ico | the icon to be displayed in the title bar, null to display no icon in the title bar. |
public function getIcon():Icon
Returns the icon displayed in the title bar for this frame.
the icon displayed in the title bar for this frame.
public function setResizable(b:Boolean):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. |
public function isResizable():Boolean
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.
public function setDragable(b:Boolean):Void
Sets whether this frame can be dragged by the user. By default, it's true.
"dragable" means drag to move the frame.
b |
public function isDragable():Boolean
Returns whether this frame can be dragged by the user. By default, it's true.
public function setClosable(b:Boolean):Void
Sets 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 getDefaultCloseOperation
.
b | true user can click close button to generate the close event, false user can't. |
public function getMaximizedBounds():Rectangle
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.
public function setMaximizedBounds(b:Rectangle):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. |
public function setDefaultCloseOperation(operation:Number):Void
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 HIDE_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 |
public function getDefaultCloseOperation():Number
Returns the operation that will happen by default when the user initiates a "close" on this frame.
public function setResizeDirectly(b:Boolean):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.
public function setDragDirectly(b:Boolean):Void
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.