Overview
The JavaFX Stage
class is the top level container for the FX script
instantiation.
Example:
import javafx.scene.Scene;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
import javafx.stage.Stage;
Stage {
title: "Welcome to JavaFX!"
scene: Scene {
content: Text {
x: 25
y: 25
content: "Hello World!"
font: Font{ size: 32 }
}
}
}
produces the following on Mac OSX:
produces the following on Windows XP:
produces the following on Windows Vista:
Profile: common
Script Variable Summary
access | name | type | Can Read | Can Init | Can Write | Default Value | description |
---|
Variable Summary
access | name | type | Can Read | Can Init | Can Write | Default Value | description |
---|---|---|---|---|---|---|---|
public-read | containsFocus | Boolean |
Whether or not this |
||||
public | extensions | StageExtension[] | empty |
The extensions that a The extensions that a
See Also:
Profile: common |
|||
public | fullScreen | Boolean | false |
Specifies whether this Specifies whether this The implementation of full-screen mode is platform and profile-dependent. When set totrue , the Stage will attempt to enter
full-screen mode when visible. Set to false to return Stage
to windowed mode.
The full-screen mode will be exited (and the Screen the Stage will enter full-screen mode on by
setting its position to be within the bounds of that Screen
prior to entering full-screen mode.
However once in full-screen mode, For desktop profile the runtime will attempt to enter full-screen exclusive mode (FSEM) if such is supported by the platform and it is allowed for this application. If either is not the case a simulated full-screen window will be used instead; the window will be maximized, made undecorated if possible, and moved to the front. The user can unconditionally exit full-screen mode at any time by pressingESC .
There are differences in behavior between signed and unsigned applications. Signed applications are allowed to enter full-screen exclusive mode unrestricted while unsigned applications will have the following restrictions:
Profile: common |
|||
public | height | Number |
The height of this The height of this Profile: common |
||||
public | iconified | Boolean | false |
Defines whether the |
|||
public | icons | Image[] | empty |
Defines the icon images to be used in the window decorations and when minimized. Defines the icon images to be used in the window decorations and when minimized. The images should be different sizes of the same image and the best size will be chosen, eg. 16x16, 32,32. emptyProfile: common |
|||
public | onClose | function():Void |
When the |
||||
public | opacity | Number | 1.0 |
Defines the opacity of the Defines the opacity of the Profile: common |
|||
public | resizable | Boolean | true |
Defines whether the Defines whether the Profile: common |
|||
public | scene | Scene | null |
The The Profile: common |
|||
public-init | style | StageStyle | StageStyle.DECORATED |
Defines the Defines the Profile: common |
|||
public | title | String | empty string |
Defines the title of the |
|||
public | visible | Boolean | true |
Whether or not this Whether or not this Profile: common |
|||
public | width | Number |
The width of this The width of this Profile: common |
||||
public | x | Number |
The horizontal location of this The horizontal location of this Profile: common |
||||
public | y | Number |
The vertical location of this The vertical location of this Profile: common |
Inherited Variables
Function Summary
- public close() : Void
-
Close the
Stage
and trigger theonClose
close action.Close the
Stage
and trigger theonClose
close action.Closing a Stage will prevent it from being made visible again, it's resources are disposed and no longer available.
The close() function may only be called once on a
.Stage
and any subsequent calls are ignoredProfile: common
- public toBack() : Void
- public toFront() : Void