java.lang.Object
ij.WindowManager
This class consists of static methods used to manage ImageJ's windows.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidAdds the specified Frame to the Window menu.static voidAdds the specified window to the Window menu.static booleanCloses all windows.static WindowReturns the Window containing the active table, or null.static WindowReturns the front most window or null.static Window[]Returns an array containing a list of the non-image Frames and Dialogs.static ImagePlusReturns a reference to the active image or null if there isn't one.static ImageWindowReturns the active ImageWindow.static FrameObsolete; replaced by getWindow().static FrameObsolete; replaced by getActiveWindow.static int[]Returns a list of the IDs of open images.static ImagePlusgetImage(int imageID) For IDs less than zero, returns the ImagePlus with the specified ID.static ImagePlusReturns the first image that has the specified title or null if it is not found.static intReturns the number of open images.static String[]Returns a list of the titles of all open images.static String[]Returns an array containing the titles of non-image Frames and Dialogs.static Frame[]Returns an array containing a list of the non-image Frames.static intgetNthImageID(int n) Returns the ID of the Nth open image.static ImagePlusReturns the temporary current image for this thread, or null.static StringgetUniqueName(ImagePlus imp, String name) static StringgetUniqueName(String name) Returns a unique name by adding, before the extension, -1, -2, etc.static WindowReturns the window (a Frame or a Dialog) with the specified title, or null if a window with that title is not found.static intReturns the number of open image windows.static StringmakeUniqueName(String name) If 'name' is not unique, adds -1, -2, etc.static voidActivates the next image window on the window list.static voidremoveWindow(Frame win) Removes the specified Frame from the Window menu.static voidremoveWindow(Window win) Removes the specified window from the Window menu.static voidRepaints all open image windows.static voidMakes the image contained in the specified window the active image.static voidMakes the specified image temporarily the active image for this thread.static voidsetTempCurrentImage(Thread thread, ImagePlus img) Sets a temporary image for the specified thread.static voidThe specified frame becomes the front window, the one returnd by getFrontWindow().static voidThe specified Window becomes the front window.static voidshowList()static voidstatic void
-
Field Details
-
checkForDuplicateName
public static boolean checkForDuplicateName
-
-
Method Details
-
setCurrentWindow
Makes the image contained in the specified window the active image. -
getCurrentWindow
Returns the active ImageWindow. -
getCurrentImage
Returns a reference to the active image or null if there isn't one.- See Also:
-
setTempCurrentImage
Makes the specified image temporarily the active image for this thread. Call again with a null argument to revert to the previous active image. -
setTempCurrentImage
Sets a temporary image for the specified thread. -
getWindowCount
public static int getWindowCount()Returns the number of open image windows. -
getImageCount
public static int getImageCount()Returns the number of open images. -
getActiveWindow
Returns the front most window or null. -
getActiveTable
Returns the Window containing the active table, or null.- See Also:
-
getFrontWindow
Obsolete; replaced by getActiveWindow. -
getIDList
public static int[] getIDList()Returns a list of the IDs of open images. Returns null if no image windows are open. -
getImageTitles
Returns a list of the titles of all open images. -
getNonImageWindows
Returns an array containing a list of the non-image Frames. -
getAllNonImageWindows
Returns an array containing a list of the non-image Frames and Dialogs. -
getNonImageTitles
Returns an array containing the titles of non-image Frames and Dialogs. -
getImage
For IDs less than zero, returns the ImagePlus with the specified ID. Returns null if no open window has a matching ID or no images are open. For IDs greater than zero, returns the Nth ImagePlus. Returns null if the ID is zero. -
getNthImageID
public static int getNthImageID(int n) Returns the ID of the Nth open image. Returns zero if ninvalid input: '<'=0 or n greater than the number of open image windows. -
getImage
Returns the first image that has the specified title or null if it is not found. -
addWindow
Adds the specified window to the Window menu. -
addWindow
Adds the specified Frame to the Window menu. -
getUniqueName
Returns a unique name by adding, before the extension, -1, -2, etc. as needed. -
getUniqueName
-
makeUniqueName
If 'name' is not unique, adds -1, -2, etc. as needed to make it unique. -
removeWindow
Removes the specified window from the Window menu. -
removeWindow
Removes the specified Frame from the Window menu. -
setWindow
The specified Window becomes the front window. -
setWindow
The specified frame becomes the front window, the one returnd by getFrontWindow(). -
closeAllWindows
public static boolean closeAllWindows()Closes all windows. Stops and returns false if an image or Editor "save changes" dialog is canceled. -
putBehind
public static void putBehind()Activates the next image window on the window list. -
getTempCurrentImage
Returns the temporary current image for this thread, or null. -
getWindow
Returns the window (a Frame or a Dialog) with the specified title, or null if a window with that title is not found. -
getFrame
Obsolete; replaced by getWindow(). -
repaintImageWindows
public static void repaintImageWindows()Repaints all open image windows. -
showList
public static void showList() -
toFront
-
toFront
-