SceneBuilder
Eric Le Ponner
eric.le.ponner at oracle.com
Fri Jan 9 09:11:46 UTC 2015
Hi Adam,
You correctly filled the JIRA. We're simply late.
Indeed Scene Builder 1.x used to allow to setup
(some) properties on fx:include object.
And Scene Builder 2 does not provide this.
We should probably reconsider this choice.
Note that you may wrap your fx:include in a StackPane instance
and tune the layout constraints on the StackPane using SB. This
works pretty well. And it avoids the parent FXML file to make
some assumptions on the child FXML file.
Regards,
Eric
On 09 Jan 2015, at 08:34, Adam Granger <adam at adamish.com> wrote:
> I raised this December 4th, I understand everyone is busy, but this hasn't
> even been triaged. Did I fill out the wrong fields the JIRA?
>
> Cannot set layout constraints for included FXML (fx:include)
> - http://javafx-jira.kenai.com/browse/DTL-6915
>
> When including another FXML node (via File -> Import -> FXML) there is no
> way to set its layout attributes using the Scene Builder tool, the layout
> panel is empty.
>
> For example, if I wished to set the following child.fxml to fill its
> parent VBox vertically this cannot be done using the UI.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <?import java.lang.*?>
> <?import javafx.scene.layout.*?>
> <VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity"
> minWidth="-Infinity" prefHeight="500.0" prefWidth="500.0"
> xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
> <children>
> <fx:include source="child.fxml" />
> </children>
> </VBox>
>
> FXML seems to support this "under the hood", if I manually edit the file,
> scene builder preview (and my actual app using FXMLLoader) work correctly.
>
> <VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity"
> minWidth="-Infinity" prefHeight="500.0" prefWidth="500.0"
> xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
> <children>
> <fx:include source="child.fxml" VBox.vgrow="ALWAYS"/>
> </children>
> </VBox>
>
> According to my colleague this was possible in an older version of Scene
> Builder
>
> Regards,
>
> Adam.
>
>
More information about the openjfx-dev
mailing list