org. assembles a tab's node tree.
Its contract:
InputElement is a
Control: it can carry a tooltip, validation and attachments; a NodeElement is not a
Control and offers none of that. Asking for the wrong capability does not compile.
help(...), browse(...), attachField(...), attach(...)), which appends it right after
the control and couples its state to it. The attachment's own config lambda makes it fully
addressable. checkWithField remains as sugar over checkbox + attachField because the
"Enable X on port .. " idiom reads better as one call.
section, group, columns, flow), so a region
cannot be left unclosed and can be configured or disabled as a unit. Their handles mirror the
element handles: a SectionRegion has a header and therefore takes help(...), a plain
FormRegion has none and does not — again a compile error rather than an exception.
PasswordFieldEditor and TagsFieldEditor encapsulate control patterns that recur across
tabs. Their conventions:
create(...) factory;
one with optional parts (the password field's buttons) is a small fluent builder. Its terminal
call is named for what it actually does — PasswordFieldEditor.field() just hands back the
field, so it is not called build().
field/custom
methods or dedicated hooks such as tagsField. The password editor deliberately has no
builder method: its variants differ per call site, and field(label, editor) places it just
as well.
The tabs using this DSL live in the sibling packages of org.jabref.gui.preferences.
| Modifier and Type | Class and Description |
|---|---|
| public class | FormMetrics
The layout measurements a preference tab shares with |
| public class | PasswordFieldEditor
Custom editor: a bound |
| public class | PreferencesFormBuilder
Fluent, eager builder that assembles a preference tab's node tree and wires all bindings. |
| public class | TagsFieldEditor
Custom editor: a fully-styled gemsfx |