Package sc.fiji.snt.gui
Class GuiUtils.JTables.VisitingZoom
java.lang.Object
sc.fiji.snt.gui.GuiUtils.JTables.VisitingZoom
- Enclosing class:
GuiUtils.JTables
Stateful "visiting zoom" helper used by table panels that navigate
the canvas on double-click (BookmarkManager, CurationManager,
SeedOverlayPanel). Holds the percentage, exposes it as a fraction
(for
ImpUtils.zoomTo(...)), and produces a bound
JSpinner. The default is roughly two zoom steps above the
current canvas magnification, falling back to
600% when no image is loaded.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBuilds aJSpinnerbound to this state.intdefaultPercentageFor(ij.ImagePlus imp) doublefraction()intvoidresetFor(ij.ImagePlus imp) Resets the percentage to roughly two zoom steps above the image canvas's current magnification, or 600% whenimp == nullor has no canvas yet.voidsetPercentage(int p) Sets the percentage, clamped to the allowed range.
-
Field Details
-
MIN_PERCENT
public static final int MIN_PERCENT- See Also:
-
MAX_PERCENT
public static final int MAX_PERCENT- See Also:
-
DEFAULT_PERCENT
public static final int DEFAULT_PERCENT- See Also:
-
-
Constructor Details
-
VisitingZoom
public VisitingZoom() -
VisitingZoom
public VisitingZoom(int initialPercentage)
-
-
Method Details
-
percentage
public int percentage()- Returns:
- current zoom level in percent (in
[25, 3200]).
-
fraction
public double fraction()- Returns:
- current zoom level as a fraction (e.g.
6.0for 600%).
-
setPercentage
public void setPercentage(int p) Sets the percentage, clamped to the allowed range. -
resetFor
public void resetFor(ij.ImagePlus imp) Resets the percentage to roughly two zoom steps above the image canvas's current magnification, or 600% whenimp == nullor has no canvas yet. -
buildSpinner
-
defaultPercentageFor
public int defaultPercentageFor(ij.ImagePlus imp)
-