Class GuiUtils.JTables.VisitingZoom

java.lang.Object
sc.fiji.snt.gui.GuiUtils.JTables.VisitingZoom
Enclosing class:
GuiUtils.JTables

public static class GuiUtils.JTables.VisitingZoom extends Object
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 Details

  • 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.0 for 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% when imp == null or has no canvas yet.
    • buildSpinner

      public JSpinner buildSpinner()
      Builds a JSpinner bound to this state. Editing the spinner updates the percentage; external mutations need to call setValue on the spinner directly.
    • defaultPercentageFor

      public int defaultPercentageFor(ij.ImagePlus imp)