You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 58fd161
Browse filesBrowse the repository at this point in the historyBrowse files
scijava-ui3 and scijava-swing: widgets, and dialogs to click on
The contracts first, toolkit-free:
- `Widget` is a view of a `ParameterNode`, and that is all. There is no
`WidgetModel`: SciJava Common needed one because a widget could not see
the module, whereas a widget here reads the node for label, bounds,
style and resolved choices, and writes through `ParameterModel`.
Writing through the model is what runs callbacks and reshapes the
dialog, so a widget earns the dynamic behavior by doing nothing clever.
- `WidgetPanel` *is* a `Widget`, so a group nests in its parent's list
with no special case, however deep. `WidgetPanels` walks the tree once
for every toolkit; a binding supplies factories and nothing else.
- `InputHarvester` is a `Preprocessor`. A dismissed dialog calls
`Execution.decline`, an ordinary outcome the `ExecutionResult`
reports, rather than a `canceled` flag on a stateful preprocessor.
Then Swing: number (spinner, optional slider), text (field, password,
area), toggle, choice, file, the panel and the dialog. MigLayout is gone
in favor of `GridBagLayout` -- two columns of labels and fields are not
worth a third-party dependency, still less an automatic module in a JPMS
build. The button, color, date, file-list, message and radio-choice
widgets are not ported; each earns its place when something asks.
Three changes fell out of meeting a toolkit:
- `@Parameter` gains `min`, `max`, `stepSize` and `style`. All strings,
because metadata has to survive a script header; `Widgets` reads the
bounds back in the parameter's own type, and style hints are advisory,
so a parameter styled for Swing still renders elsewhere.
- `Execution.executable()` returns `ExecutableInstance` rather than
`Object`. Its one caller already cast it.
- `Executables.executableOf` takes a lookup, so an object run through a
container needs no `opens` beyond the one its module already declares.
`Demos` in the test sources puts each tricky behavior on screen, with a
launcher window and a `main` that takes a demo's name:
mvn -o -pl scijava-swing test-compile exec:java \
-Dexec.classpathScope=test -Dexec.mainClass=org.scijava.swing.Demos
The kitchen sink, an advanced toggle, a generated group, computed
choices, live validation, and two values that keep each other in step.
`SwingWidgetsTest` covers the same six headlessly.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013gJpzGd3ksbME4CN6Tu2ni
Copy file name to clipboardExpand all lines: docs/migration.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -124,8 +124,9 @@ A **dropped** row is a successful outcome, not a gap.
124
124
|`module`, `module.process`|`org.scijava.execute`: `@Parameter` on fields, `Executables` for the plain case, and `Runner` for the processor chain. `ModuleService.run` becomes `Runner.run`, still returning a future, but of an `ExecutionResult` that reports a declined run with its reason and its author rather than through `ModulePreprocessor.isCanceled()`| ported |
125
125
|`command`| still to come: a command is a struct plus menu metadata plus `run`| planned |
|`widget`| input harvesting on `scijava-struct`, with dynamic subgroups (Phase 4) | planned |
128
-
|`ui`, `menu`|`scijava-ui-api` (toolkit-agnostic contracts) and `scijava-menu` (the menu tree), with `ApplicationFrame`/`Desktop`/`StatusBar`/`ToolBar` as contracts there and implementations in the toolkit bindings. Dropped from the *core*, not from the stack — see the layering section of [migration-plan.md](migration-plan.md)| planned |
127
+
|`widget` (`InputWidget`, `InputPanel`, `InputHarvester`, `WidgetModel`, `WidgetStyle`) |`org.scijava.ui3`: `Widget` is a view of a `ParameterNode`, `WidgetFactory` a discoverable `@Plugin`, `WidgetPanel` a widget holding widgets (so a group nests with no special case), and `WidgetPanels` walks the tree for every toolkit. `WidgetModel` has no equivalent - a widget reads the `ParameterModel` and the node directly, and `WidgetStyle`'s parsing is `Widgets.isStyle`/`styleValue`. `InputHarvester` is a `Preprocessor` that declines the run when the user dismisses the dialog, rather than setting a `canceled` flag on itself | ported |
128
+
|`ui.swing.widget`|`org.scijava.swing`: number (spinner, optional slider), text (field, password, area), toggle, choice, file, and the panel and dialog. MigLayout is gone, in favor of `GridBagLayout`: one fewer dependency, and one fewer automatic module. The button, color, date, file-list, message and radio-choice widgets are not ported yet - each earns its place when something asks for it | ported |
129
+
|`ui`, `menu`|`scijava-ui3` (toolkit-agnostic contracts) and `scijava-menu` (the menu tree), with `ApplicationFrame`/`Desktop`/`StatusBar`/`ToolBar` as contracts there and implementations in the toolkit bindings. Dropped from the *core*, not from the stack — see the layering section of [migration-plan.md](migration-plan.md)| planned |
0 commit comments