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:Stringstatic public ON_ABILITY_CHANGED:Stringstatic public NORMAL:Numberstatic public ICONIFIED:Numberstatic public MAXIMIZED_HORIZ:Numberstatic public MAXIMIZED_VERT:Numberstatic public MAXIMIZED:Numberstatic public DO_NOTHING_ON_CLOSE:Numberstatic public HIDE_ON_CLOSE:Numberstatic public DISPOSE_ON_CLOSE:Numberpublic function updateUI():VoidDescription 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():StringDescription 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):VoidSets 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():StringReturns 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):VoidSets 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():IconReturns 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):VoidSets 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():BooleanReturns 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):VoidSets 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():BooleanReturns 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):VoidSets 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():NumberReturns 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.