11 KiB
Edit Views and bindings
Both hosts use the same Kit hierarchy, canvas, inspector and Bindings panels. Source, Design and Split share one authoritative host document. Supported actions produce lexical replacements rather than serializing the whole FXML tree. Comments, processing instructions, quote style and unrelated declarations remain intact. Each accepted operation is one host Undo/Redo command; invalid FXML may still be saved for later repair.
Canvas and Component properties
Select an object in the hierarchy or canvas, edit supported scalar/layout properties, or drag/resize it. Standard controls remain ordinary Kit objects; application Components use target-rendered placeholders. Explicit width/height and supported attached layout constraints are editable, including nested/anonymous Components and fx:root bodies. A corner resize changes both dimensions in one transaction.
Unsupported structural proposals are rejected instead of rewriting unknown XML. Use the shared Structure panel for the supported operations below and Source for everything else. Application-specific property editors, arbitrary custom object values and generic FXML language coverage are not implied by successful pixel rendering. In particular, importing an application enum solely for <Role fx:constant="..."/> can be misclassified by the host projection. The reference Desk populates its ChoiceBox in Controller initialization instead; ordinary NeitzelLib/FXMLLoader applications can still use enum constants.
Discovery and authoring
Build first, declare the Model with <?neitzel-model ...?>, then open Bindings. Discovery shows Model Attributes and nested paths, selected ViewModel, target types, collection elements and compatible Component/Row types. Direction-aware checks compare what will be read and written; a plausible name is not sufficient compatibility evidence.
| Panel | Typical workflow | Reference example |
|---|---|---|
| Direct bindings | Choose target control/property, Model path, view/model/both, optional Converter; create, update or remove |
nameField.text ↔ name; age through AgeConverter |
| Computed bindings | Select target control/property and a public zero-argument Controller method; create, update or remove | greetingLabel.text from DeskController.greeting() |
| Repeat | Select a Pane, collection Attribute and compatible Component; edit/remove the declaration | visits rendered as VisitForm instances |
| Table / Columns | Select Table, collection Attribute and Row; author ordered Columns and inspect Row alignment | visitTable with VisitRow cells |
| Structure | Rename identifiers, copy/paste or delete a subtree with associated references | Duplicate a nested layout section without identifier collisions |
| Problems | Inspect diagnostics, navigate to source and apply an explicitly selected supported fix | Correct an invalid DirectBinding direction |
| Generate View | Review metadata-based form choices before creating new FXML | New form for Person; see generation |
All three DirectBinding directions initialize the control from the Model. After initialization, view updates the View from the Model; model updates the Model from the View; both requests both directions. ObservableList-valued Attributes use shared list identity: list mutation does not follow these scalar direction/Converter semantics. Runtime and target compatibility remain authoritative, including conversions and generic types. Creating a declaration does not create the named Java class or method.
Converters are discovered from compiled classes without constructing them. Explicit capabilities permit direction-aware suggestions; an unannotated Converter can remain valid runtime code but produce an unverified warning. Configure and test its behavior in the application. The Converter contract documents the optional capability annotation and validation details.
Computed suggestions come from the actual Controller (the Component itself for its fx:root View). Methods must be public, take no arguments and return a compatible value. Use #method; there are no Model path, direction, observed-path or Converter fields. Discovery does not execute methods or prove their runtime refresh behavior. The editor does not implement arbitrary expression languages. Repeat discovery requires a supported collection and compatible element Model. Repeat and Table select a direct collection Attribute/property on the current ViewModel, not DirectBinding-style dotted traversal. Table discovery additionally compares ordered Columns with the declared Row's cells. Missing or ambiguous generic/Row information is reported rather than guessed. Open Row Component is the explicit action for editing its FXML separately.
Reference-safe structure changes
Renaming fx:id also updates supported binding targets and ordinary $id, simple ${id.property}, fx:reference and fx:copy references. Copy assigns fresh descendant identifiers and carries associated bindings; paste validates them in the destination Model/Controller context. Delete removes the selected subtree and bindings targeting its descendants. These actions never refactor Java Controller fields, Model paths or separately stored Component definitions.
Paste targets supported standard Pane children (VBox, HBox, Pane, AnchorPane, StackPane, FlowPane, TilePane, GridPane). The clipboard is shared between editors in the same host process, not the OS or separate host processes. Complex expressions, scripts, includes, ambiguous imports, cross-View relative resources, document-root copy/delete and unsupported child properties require Source review. Native Kit reparent/delete/clipboard proposals are not a substitute for these shared actions. See exact structural limits.
Diagnostics and quick fixes
Problems are scoped to open designer documents and current build/draft evidence. Selecting a problem navigates to the affected FXML location. Source underlines follow the same ranges. IntelliJ also exposes Problems entries, native XML annotations and Alt+Enter actions. This is not a whole-project background inspection or precise Java-source navigation service.
Errors block new previews; warnings remain visible and permit preview. Stale diagnostic actions are withdrawn after edits or build changes. Available fixes are deliberately narrow: explicit DirectBinding direction choices, removing a later duplicate Direct/Computed target, and removal of eligible simple invalid Direct/Computed/Repeat declarations. Tables, unknown/nested payloads, warnings and declarations with fx:id do not get speculative deletion fixes. No action is auto-selected. Fixes preserve unrelated source and use normal Undo/Redo; see supported fixes.
Form properties and controller events
In Form controls, select a control and property. Set property writes the FXML attribute. Reset property removes it and restores its JavaFX default. The accessible name is inherited from Node. Text fields including AutoCompleteTextField accept a non-negative integer for prefColumnCount. Layout results such as width are read-only.
After Build and Refresh, select onAction on a supported action control, onDismiss on ToolBarPane, or onRemove on TagChip. Choose a compiled controller method in the list, or enter its #method reference and select Set property. The target checks accessible no-argument methods and methods accepting ActionEvent or Event, including inherited and FXML-annotated handlers. Without current controller metadata the inspector indicates that a build is needed for method checking. Undo, Redo and Save use the same FXML document as the bindings editor.
Tabs, split panes and border panes
In Form controls, choose Tab from the palette and TabPane / tabs as the destination. Set its text under Selected control. Select Tab / content to add a layout or a ScrollPane. Each Tab, ScrollPane and named BorderPane region has one content slot. The inspector shows its occupant. To reuse an occupied slot, move its existing control to a free destination first. Move to destination keeps the subtree, its identifiers, event handlers and bindings together. For SplitPane / items, Position is the zero-based insertion index.
Grid setups and group headings
Under Bindings → DataGrid / Docking, select the grid to edit setupId or setupVersion. Clear the field and use Apply setting to restore the default. Persisted settings identify the grid by its setup ID. Restoring an older definition version requires a migration for that version.
Set the column widths so that minimumWidth ≤ width ≤ maximumWidth. Clearing a field restores its default (80, 150 and 1200 pixels respectively). The inspector checks the remaining literal bounds when a sibling value is supplied by an FXML reference.
Select a column and set fixedPosition to its current zero-based index. Clear the field or enter -1 to make it movable. Under groupLabels, select or enter a literal FXML map key and its display text, then use Set group label or Remove group label. For the Archiver folder example, group by folder and label Post as Posteingang. Collapsing that heading still stores the key Post. Keys represented by resource references or nested declarations can be reviewed in Source.
Dock group size, splitting and persistence
Open ArchiveWindow.fxml and select Bindings → DataGrid / Docking → DockGroupDefinition · messages. Select a property and use Apply setting. Clearing the value restores its FXML default.
| Group property | Values and effect |
|---|---|
minimumWidth, minimumHeight |
Finite pixel values from 0 upwards, default 80 each. Both groups and their divider must fit before a split is available. |
splitDirections |
HORIZONTAL allows left and right, VERTICAL allows above and below, NONE disables splitting and ALL is the default. |
persistent |
The default true keeps an empty root group available as a destination. With false, closing its last tab removes the group. Inside a split, the surviving sibling fills the vacated branch. |
After saving, choose Form preview → Build and Refresh → Archiver · HTML-Dokumenttabs → Interactive preview. Open the context menu of Lieferschein.html and use Split. Unavailable directions show the reason in the menu. Resize the window to test the minimum dimensions. To inspect persistence, move the delivery tab to details and close the invoice. Open Move to on the remaining delivery tab to see whether messages is still available.