How do I add attributes to FXGraph includes like you can do in FXML?
Using the latest e(fx)clipse) I created a plugin that has an FXGraph that creates a button.
component MyButton {
Button id myButton {
maxWidth : const Double#POSITIVE_INFINITY,
mnemonicParsing : false
}
}
In a different plugin I create another FXGraph that includes the button into an HBox but the button will not grow horizontally to fill the entire width.
...
HBox {
padding : Insets {
bottom : 5.0,
left : 5.0,
right : 5.0,
top : 10.0
},
spacing : 2.0,
alignment : "CENTER",
children : [
include MyButton as myBtn
]
}
...
The above FXGraph will generate an FXML that looks like:
...
<HBox spacing="2.0" alignment="CENTER">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="10.0"/>
</padding>
<children>
<fx:include fx:id="myBtn" source="MyButton.fxml" />
</children>
</HBox>
...
Inside the FXML I can add to the <fx:include /> HBox.hgrow="ALWAYS" and get the desired result.
...
<HBox spacing="2.0" alignment="CENTER">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="10.0"/>
</padding>
<children>
<fx:include fx:id="myBtn" source="MyButton.fxml" HBox.hgrow="ALWAYS"/>
</children>
</HBox>
...