Last active
May 28, 2022 21:07
-
-
Save ennerf/133fde133f9a8d5f32e9aff18df4b25e to your computer and use it in GitHub Desktop.
View 2 FXML bindigns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<?import javafx.scene.control.Button?> | |
<?import javafx.scene.layout.HBox?> | |
<?import javafx.scene.layout.StackPane?> | |
<?import javafx.scene.layout.VBox?> | |
<?import javafx.scene.text.Text?> | |
<StackPane xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1" | |
fx:controller="us.hebi.gui.ViewController"> | |
<children> | |
<VBox> | |
<children> | |
<!-- binds text to the ViewController::getCfg::unitLabelProperty --> | |
<Text text="${controller.cfg.unitLabel}"/> | |
<!-- binds visibility to ViewController:getCfg::debugEnabledProperty --> | |
<HBox prefHeight="100.0" visible="${controller.cfg.debugEnabled}" | |
managed="${controller.cfg.debugEnabled}"> | |
<children> | |
<Button mnemonicParsing="false" text="I'm only here during debugging!"/> | |
</children> | |
</HBox> | |
<Button fx:id="button" text="View 2 Button"/> | |
</children> | |
</VBox> | |
</children> | |
</StackPane> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment