Class ImageZoomPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, ScrollPaneConstants
Direct Known Subclasses:
DisplayCalibrationPanel, ImageLinePanelZoom

public class ImageZoomPanel
extends JScrollPane
Simple JPanel for displaying buffered images allows images to be zoomed in and out of
See Also:
Serialized Form
  • Field Details

  • Constructor Details

    • ImageZoomPanel

      public ImageZoomPanel​(@Nullable @Nullable BufferedImage img)
    • ImageZoomPanel

      public ImageZoomPanel()
  • Method Details

    • disableSaveOnClick

      public void disableSaveOnClick()
      Makes it so that the image is no longer saved when clicked.
    • autoScaleAndAlign

      public void autoScaleAndAlign()
    • setScale

      public void setScale​(double scale)
    • setScaleAndCenter

      public void setScaleAndCenter​(double scale, double cx, double cy)
    • centerView

      public void centerView​(double cx, double cy)
    • setImage

      public void setImage​(BufferedImage image)
      Change the image being displayed.
      Parameters:
      image - The new image which will be displayed.
    • updateSize

      public void updateSize​(int width, int height)
    • setBufferedImageNoChange

      public void setBufferedImageNoChange​(@Nullable @Nullable BufferedImage image)
    • getImage

      @Nullable public @Nullable BufferedImage getImage()
    • pixelToPoint

      public Point2D_F64 pixelToPoint​(int x, int y)
    • paintInPanel

      protected void paintInPanel​(AffineTransform tran, Graphics2D g2)
      Paint inside the image panel. Useful for overlays
    • paintOverPanel

      protected void paintOverPanel​(Graphics2D g2)
      Called very last when you don't want to draw in image coordinates
    • setScrollbarsVisible

      public void setScrollbarsVisible​(boolean visible)
    • getScale

      public double getScale()
    • getImagePanel

      public ImageZoomPanel.ImagePanel getImagePanel()
    • getListener

      public ImageZoomPanel.ImageZoomListener getListener()
    • setListener

      public void setListener​(ImageZoomPanel.ImageZoomListener listener)