Class SeedOverlayCanvasHandler
MouseListener to a TracerCanvas that lets the user
click on a rendered seed to select it (mirroring SeedOverlayBigViewerHandler's
plain-click behavior for Bvv/Bdv.Selection flows through SeedOverlay.setSelectedSeeds(java.util.Collection<? extends sc.fiji.snt.seed.SeedPoint>)
so the Seed Manager table stays in sync), or Alt+Click it to open the per-seed edit dialog.
Right-clicks pass through to the existing tracing-canvas handlers unchanged.
Selection (plain click) is intentionally narrower-gated than editing (Alt+Click): the classic
canvas traces on plain click by default whenever the UI is idle, and - unlike Bvv/Bdv, where
tracing-by-click is an opt-in per-viewer toggle - InteractiveTracerCanvas handles that
in mouseReleased, which runs before this class's listener ever sees the click, so
e.consume() here cannot suppress it. onPlainClick(sc.fiji.snt.TracerCanvas, sc.fiji.snt.SNT, java.awt.event.MouseEvent) therefore only acts while
the UI is genuinely paused (SNT_PAUSED/TRACING_PAUSED - see
isPausedForSelection(sc.fiji.snt.SNT)), the same states in which InteractiveTracerCanvas
disables click-to-trace itself, so the two gestures never collide. onAltClick(sc.fiji.snt.TracerCanvas, sc.fiji.snt.SNT, java.awt.event.MouseEvent) keeps
the broader isUiReady(sc.fiji.snt.SNT) test since Alt is not used by tracing today.
The hit-test uses the SeedOverlay's spatial index
(SeedOverlay.nearest(double, double, double, double)). Tolerance is
derived from the canvas magnification so it matches what the user
sees on screen.
- Author:
- Tiago Ferreira
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidinstall(TracerCanvas canvas, SNT snt) Installs the Alt+Click → edit-nearest-seed listener on the given canvas.
-
Method Details
-
install
Installs the Alt+Click → edit-nearest-seed listener on the given canvas.
-