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 0a57e16
Browse filesBrowse the repository at this point in the historyBrowse files
Fix the widget bugs the demos turned up, and fill in the gaps
The empty dialogs were not a widget bug: with no annotation index on the
classpath no widget factory is discovered, and the dialog comes up with
nothing but OK and Cancel. javac writes that index only when
scijava-index is on the annotation processor path, and says nothing at
all when it is not, so the harvester now says it -- naming the file --
and `WidgetPanels` warns about any parameter no factory accepted. Both
through SLF4J, with slf4j-simple as a test dependency so the demos log:
-Dorg.slf4j.simpleLogger.defaultLogLevel=debug
The stale choices were real. A widget held the `ParameterNode` it was
built from, but `ParameterModel` builds a new tree on every `set`; where
the tree's shape was unchanged nothing rebuilt, so a chooser went on
asking a dead node for its values while the model had already moved on.
`SwingWidget.node()` now reads its node back out of the current tree.
Dialog behavior, from watching one: it never moves and never shrinks
after the first build -- it may grow for parameters that have just
appeared, but re-centring or closing up around a collapsed group moves
the controls out from under the pointer. The scroll pane's border is
gone, and the widgets hug the top, a GridBagLayout having otherwise
centered its rows in whatever height the dialog was dragged to.
Gaps filled, all of them things SciJava Common had:
- a scroll bar as well as a slider, and labelled tick marks
(`style = "slider,ticks:4"`);
- `softMin`/`softMax`, so the slider spans the useful range while the
spinner still enforces the permitted one;
- enums, whose constants are their choices -- resolved in
`ParameterTree`, so every toolkit gets it and no annotation repeats
what the enum already says;
- `BigInteger` and `BigDecimal`, which go to the text widget and are
parsed exactly, a spinner being unable to step them;
- `char`, and boxed numbers alongside primitive ones;
- message rows (`style = "message"`), whose value a callback may rewrite.
And a seventh demo, the one worth having: width, height and a lock
aspect ratio checkbox, with a message row showing the live ratio.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013gJpzGd3ksbME4CN6Tu2ni
|`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 |
128
+
|`ui.swing.widget`|`org.scijava.swing`: number (spinner, with an optional slider or scroll bar and labelled ticks), text (field, password, area, and `BigInteger`/`BigDecimal`, which a spinner cannot step), toggle, choice, file, message, and the panel and dialog. `SpinnerBigDecimalModel`, `SpinnerBigIntegerModel`, `SpinnerTypedNumberModel` and `SpinnerNumberModelFactory` have no equivalent: `SpinnerNumberModel` already steps in the type of the value it holds, and arbitrary precision goes to the text widget. MigLayout is gone, in favor of `GridBagLayout`: one fewer dependency, and one fewer automatic module. The button, color, date, file-list and radio-choice widgets are not ported yet - each earns its place when something asks for it | ported |
129
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