Java Reference
In-Depth Information
@FXML
private CheckBox checkBoxResizable;
@FXML
private CheckBox checkBoxFullScreen;
@FXML
private HBox titleBox;
@FXML
private Label titleLabel;
@FXML
private TextField titleTextField;
@FXML
private Button toBackButton;
@FXML
private Button toFrontButton;
@FXML
private Button closeButton;
private Stage stage;
private StringProperty title = new SimpleStringProperty();
private double dragAnchorX;
private double dragAnchorY;
public void setStage(Stage stage) {
this.stage = stage;
}
public void setupBinding(StageStyle stageStyle) {
checkBoxResizable.setDisable(stageStyle == StageStyle.TRANSPARENT
|| stageStyle == StageStyle.UNDECORATED);
textStageX.textProperty().bind(new SimpleStringProperty("x: ")
.concat(stage.xProperty().asString()));
textStageY.textProperty().bind(new SimpleStringProperty("y: ")
.concat(stage.yProperty().asString()));
textStageW.textProperty().bind(new SimpleStringProperty("width: ")
.concat(stage.widthProperty().asString()));
textStageH.textProperty().bind(new SimpleStringProperty("height: ")
.concat(stage.heightProperty().asString()));
textStageF.textProperty().bind(new SimpleStringProperty("focused: ")
.concat(stage.focusedProperty().asString()));
stage.setResizable(true);
checkBoxResizable.selectedProperty()
.bindBidirectional(stage.resizableProperty());
checkBoxFullScreen.selectedProperty().addListener((ov, oldValue, newValue) ->
stage.setFullScreen(checkBoxFullScreen.selectedProperty().getValue()));
Search WWH ::




Custom Search