Overview
The JavaFX Stage
class is the top level container for the FX script instantiation.
Example:
import javafx.scene.Scene;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
import javafx.stage.Stage;
Stage {
title: "Welcome to JavaFX!"
scene: Scene {
content: [
Text { content: "Hello World!" x:25 y:25 fill: Color.BLACK font: Font{ size: 32 } }
]
}
}
produces the following on Mac OSX:
produces the following on Windows XP:
produces the following on Windows Vista:
Profile: common
Variable Summary
access | name | type | Can Read | Can Init | Can Write | Default Value | description |
---|---|---|---|---|---|---|---|
public | extensions | StageExtension[] | empty |
The extensions that a |
|||
public-read | focused | Boolean |
Whether or not this |
||||
public | fullScreen | Boolean | false |
Specifies whether this Specifies whether this
When set to
When set to Profile: common |
|||
public | height | Number |
The height of this The height of this Profile: common |
||||
public | iconified | Boolean | false |
Value that 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 thing and the best size will be chosen, eg. 16x16, 32,32. emptyProfile: common |
|||
public | onClose | function():Void |
This is the close action for the |
||||
public | opacity | Number | 1.0 |
Defines the opacity of the Defines the opacity of the Profile: common |
|||
public | resizable | Boolean | true |
Value that defines whether the Value that defines whether the Profile: common |
|||
public | scene | Scene | null |
The |
|||
public-init | style | StageStyle | StageStyle.DECORATED |
Defines the Defines the Profile: common |
|||
public | title | String | empty string |
Defines the title of the Defines the title of the Profile: common |
|||
public | visible | Boolean | true |
Whether or not this |
|||
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 impl_setFocused(focused: Boolean) : Void
- public toBack() : Void
- public toFront() : Void