-
Notifications
You must be signed in to change notification settings - Fork 2
Working With Layouts
Michael Gentry edited this page Oct 11, 2016
·
2 revisions
- Create new FXML file.
- Make sure the
Use fx:root Construct
is selected. - Create an
AnchorPane
as the top-level element. This is important due to the expectations of the Java supporting classes. - Create your UI inside the
AnchorPane
. Typically you'll put aVBox
or some other container inside theAnchorPane
. Look at existing*Layout.fxml
files for ideas. - Save your UI as
*Layout.fxml
undersrc/main/resources/layouts
.
- Create your new Java UI controller file in
src/main/java/org/apache/cayenne/modeler/layout
and make sure the Java class name matches the name of the*Layout.fxml
file (with.fxml
being.java
, of course). - For top-level windows, your Java UI controller should subclass
AbstractWindowLayout
and for views/components loaded into an existing window, it should subclassAbstractViewLayout
and possibly implementDetailEditorSupport
. See existing controllers for ideas.