public class WindowManager extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
checkForDuplicateName |
Modifier and Type | Method and Description |
---|---|
static void |
addWindow(Frame win)
Adds the specified Frame to the Window menu.
|
static void |
addWindow(Window win)
Adds the specified window to the Window menu.
|
static boolean |
closeAllWindows()
Closes all windows.
|
static Window |
getActiveWindow()
Returns the front most window or null.
|
static Window[] |
getAllNonImageWindows()
Returns an array containing a list of the non-image Frames and Dialogs.
|
static ImagePlus |
getCurrentImage()
Returns a reference to the active image or null if there isn't one.
|
static ImageWindow |
getCurrentWindow()
Returns the active ImageWindow.
|
static Frame |
getFrame(String title)
Obsolete; replaced by getWindow().
|
static Frame |
getFrontWindow()
Obsolete; replaced by getActiveWindow.
|
static int[] |
getIDList()
Returns a list of the IDs of open images.
|
static ImagePlus |
getImage(int imageID)
For IDs less than zero, returns the ImagePlus with the specified ID.
|
static ImagePlus |
getImage(String title)
Returns the first image that has the specified title or null if it is not found.
|
static int |
getImageCount()
Returns the number of open images.
|
static String[] |
getImageTitles()
Returns a list of the titles of all open images.
|
static String[] |
getNonImageTitles()
Returns an array containing the titles of non-image Frames and Dialogs.
|
static Frame[] |
getNonImageWindows()
Returns an array containing a list of the non-image Frames.
|
static int |
getNthImageID(int n)
Returns the ID of the Nth open image.
|
static ImagePlus |
getTempCurrentImage()
Returns the temporary current image for this thread, or null.
|
static String |
getUniqueName(String name)
Returns a unique name by adding, before the extension, -1, -2, etc.
|
static Window |
getWindow(String title)
Returns the window (a Frame or a Dialog) with the specified
title, or null if a window with that title is not found.
|
static int |
getWindowCount()
Returns the number of open image windows.
|
static String |
makeUniqueName(String name)
If 'name' is not unique, adds -1, -2, etc.
|
static void |
putBehind()
Activates the next image window on the window list.
|
static void |
removeWindow(Frame win)
Removes the specified Frame from the Window menu.
|
static void |
removeWindow(Window win)
Removes the specified window from the Window menu.
|
static void |
repaintImageWindows()
Repaints all open image windows.
|
static void |
setCurrentWindow(ImageWindow win)
Makes the image contained in the specified window the active image.
|
static void |
setTempCurrentImage(ImagePlus img)
Makes the specified image temporarily the active
image for this thread.
|
static void |
setTempCurrentImage(Thread thread,
ImagePlus img)
Sets a temporary image for the specified thread.
|
static void |
setWindow(Frame win)
The specified frame becomes the front window, the one returnd by getFrontWindow().
|
static void |
setWindow(Window win)
The specified Window becomes the front window.
|
static void |
toFront(Frame frame) |
public static void setCurrentWindow(ImageWindow win)
public static ImageWindow getCurrentWindow()
public static ImagePlus getCurrentImage()
IJ.getImage()
public static void setTempCurrentImage(ImagePlus img)
public static void setTempCurrentImage(Thread thread, ImagePlus img)
public static int getWindowCount()
public static int getImageCount()
public static Window getActiveWindow()
public static Frame getFrontWindow()
public static int[] getIDList()
public static String[] getImageTitles()
public static Frame[] getNonImageWindows()
public static Window[] getAllNonImageWindows()
public static String[] getNonImageTitles()
public static ImagePlus getImage(int imageID)
public static int getNthImageID(int n)
public static ImagePlus getImage(String title)
public static void addWindow(Window win)
public static void addWindow(Frame win)
public static String getUniqueName(String name)
public static String makeUniqueName(String name)
public static void removeWindow(Window win)
public static void removeWindow(Frame win)
public static void setWindow(Window win)
public static void setWindow(Frame win)
public static boolean closeAllWindows()
public static void putBehind()
public static ImagePlus getTempCurrentImage()
public static Window getWindow(String title)
public static void repaintImageWindows()
public static void toFront(Frame frame)