class org.aswing.JFrame extends JWindow
JFrame
is a window with title and maximized/iconified/normal state, and resizer.
![]() | Show Events | Hide Events
|
Class Fields
Instance Fields
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
.
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 inWindowConstants
): Don't do anything; require the program to handle the operation in thewindowClosing
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 |
See Also
- org.aswing.Component.addEventListener()
- this.getDefaultCloseOperation()
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.
Whether this frame can be dragged by the user. By default, it's true.
"dragable" means drag to move the frame.
Whether this frame is resizable by the user.
"resizable" means include capability of restore normal resize, maximize, iconified and resize by drag.
function new(?owner:Dynamic = null, ?title:String = '', ?modal:Bool = false): Void
Create a JWindow
owner | the owner of this popup, it can be a |
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
- org.aswing.AsWingManager.getRoot()
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
- this.tryToClose()
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 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
- this.setResizable()
function isResizeDirectly(): Bool
Return whether need resize frame directly when drag the resizer arrow.
See Also
- this.setResizeDirectly()
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
- this.getMaximizedBounds()
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
- this.isResizable()
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
- org.aswing.Resizer.setResizeDirectly()
function tryToClose(): Void
Try to close the Frame depend on the defaultCloseOperation
See Also
- this.closeReleased()