Package ij.gui

Class ImageWindow

All Implemented Interfaces:
FocusListener, MouseWheelListener, WindowListener, WindowStateListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible
Direct Known Subclasses:
HistogramWindow, PlotWindow, StackWindow

public class ImageWindow extends Frame implements FocusListener, WindowListener, WindowStateListener, MouseWheelListener
A frame for displaying images.
See Also:
  • Field Details

    • MIN_WIDTH

      public static final int MIN_WIDTH
      See Also:
    • MIN_HEIGHT

      public static final int MIN_HEIGHT
      See Also:
    • HGAP

      public static final int HGAP
      See Also:
    • VGAP

      public static final int VGAP
      See Also:
    • imp

      protected ImagePlus imp
    • ij

      protected ImageJ ij
    • ic

      protected ImageCanvas ic
    • closed

      protected boolean closed
    • running

      public boolean running
      This variable is set false if the user presses the escape key or closes the window.
    • running2

      public boolean running2
      This variable is set false if the user clicks in this window, presses the escape key, or closes the window.
  • Constructor Details

  • Method Details

    • getInitialMagnification

      public double getInitialMagnification()
    • getInsets

      public Insets getInsets()
      Override Container getInsets() to make room for some text above the image.
      Overrides:
      getInsets in class Container
    • drawInfo

      public void drawInfo(Graphics g)
      Draws the subtitle.
    • createSubtitle

      public String createSubtitle()
      Creates the subtitle.
    • getImageSize

      public static String getImageSize(ImagePlus imp)
    • paint

      public void paint(Graphics g)
      Overrides:
      paint in class Window
    • close

      public boolean close()
      Removes this window from the window list and disposes of it. Returns false if the user cancels the "save changes" dialog.
    • getImagePlus

      public ImagePlus getImagePlus()
    • setImage

      public void setImage(ImagePlus imp2)
    • updateImage

      public void updateImage(ImagePlus imp)
    • getCanvas

      public ImageCanvas getCanvas()
    • getMaximumBounds

      public Rectangle getMaximumBounds()
    • add

      public Component add(Component comp)
      Overrides:
      add in class Container
    • maximize

      public void maximize()
    • minimize

      public void minimize()
    • isClosed

      public boolean isClosed()
      Has this window been closed?
    • focusGained

      public void focusGained(FocusEvent e)
      Specified by:
      focusGained in interface FocusListener
    • windowActivated

      public void windowActivated(WindowEvent e)
      Specified by:
      windowActivated in interface WindowListener
    • windowClosing

      public void windowClosing(WindowEvent e)
      Specified by:
      windowClosing in interface WindowListener
    • windowStateChanged

      public void windowStateChanged(WindowEvent e)
      Specified by:
      windowStateChanged in interface WindowStateListener
    • windowClosed

      public void windowClosed(WindowEvent e)
      Specified by:
      windowClosed in interface WindowListener
    • windowDeactivated

      public void windowDeactivated(WindowEvent e)
      Specified by:
      windowDeactivated in interface WindowListener
    • focusLost

      public void focusLost(FocusEvent e)
      Specified by:
      focusLost in interface FocusListener
    • windowDeiconified

      public void windowDeiconified(WindowEvent e)
      Specified by:
      windowDeiconified in interface WindowListener
    • windowIconified

      public void windowIconified(WindowEvent e)
      Specified by:
      windowIconified in interface WindowListener
    • windowOpened

      public void windowOpened(WindowEvent e)
      Specified by:
      windowOpened in interface WindowListener
    • mouseWheelMoved

      public void mouseWheelMoved(MouseWheelEvent e)
      Specified by:
      mouseWheelMoved in interface MouseWheelListener
    • copy

      public void copy(boolean cut)
      Copies the current ROI to the clipboard. The entire image is copied if there is no ROI.
    • paste

      public void paste()
    • mouseMoved

      public void mouseMoved(int x, int y)
      This method is called by ImageCanvas.mouseMoved(MouseEvent).
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Component
    • centerNextImage

      public static void centerNextImage()
      Causes the next image to be opened to be centered on the screen and displayed without informational text above the image.
    • setNextLocation

      public static void setNextLocation(Point loc)
      Causes the next image to be displayed at the specified location.
    • setNextLocation

      public static void setNextLocation(int x, int y)
      Causes the next image to be displayed at the specified location.
    • setLocationAndSize

      public void setLocationAndSize(int x, int y, int width, int height)
      Moves and resizes this window. Changes the magnification so the image fills the window.
    • setSliderHeight

      public void setSliderHeight(int height)
    • getSliderHeight

      public int getSliderHeight()
    • setImageJMenuBar

      public static void setImageJMenuBar(ImageWindow win)