public class WindowManager extends LogicManager implements WindowListener
Modifier and Type | Field and Description |
---|---|
protected boolean |
distributed
Whether to distribute the menu bar across all registered frames.
|
protected Docker |
docker
Object enabling docking between windows.
|
protected boolean |
docking
Whether window docking features are enabled.
|
static String |
DOCKING
String for window docking option.
|
static String |
HIDE_ALL
String for global minimization option.
|
protected boolean |
hideAll
Whether minimizing main VisBio window hides all other windows.
|
protected Vector<Window> |
visible
List of windows that were visible before VisBio was minimized.
|
protected int |
waiting
Number of queued wait cursors.
|
protected Hashtable<Window,WindowInfo> |
windows
Table for keeping track of registered windows.
|
protected Hashtable<String,WindowState> |
windowStates
Table of window states read during state restore.
|
bio
Constructor and Description |
---|
WindowManager(VisBioFrame bio)
Constructs a window manager.
|
Modifier and Type | Method and Description |
---|---|
void |
addWindow(Window w)
Registers a window with the window manager.
|
void |
addWindow(Window w,
boolean pack)
Registers a window with the window manager.
|
void |
disposeWindow(Window w)
Removes the window from the window manager and disposes of it.
|
void |
disposeWindows()
Disposes all windows, prior to program exit.
|
void |
doEvent(VisBioEvent evt)
Called to notify the logic manager of a VisBio event.
|
protected void |
doGUI()
Adds window-related GUI components to VisBio.
|
protected void |
doMenuBars(JMenuBar master)
Propagates the given menu bar across all registered frames.
|
int |
getTasks()
Gets the number of tasks required to initialize this logic manager.
|
protected WindowInfo |
getWindowByTitle(String name)
Gets window information about the first window matching the specified
window title.
|
Window[] |
getWindows()
Gets a list of windows being handled by the window manager.
|
void |
hideWindows()
Hides all windows.
|
void |
restoreState(Element el)
Restores the current state from the given DOM element ("VisBio").
|
void |
restoreWindows()
Restores all previously hidden windows.
|
void |
saveState(Element el)
Writes the current state to the given DOM element ("VisBio").
|
void |
setDistributedMenus(boolean dist)
Sets whether all registered frames should have a duplicate of the main
VisBio menu bar.
|
protected void |
setDocking(boolean docking)
Sets whether window docking features are enabled.
|
protected void |
setHideAll(boolean hideAll)
Sets whether minimizing the main VisBio window hides the other VisBio
windows.
|
void |
setWaitCursor(boolean wait)
Toggles the cursor between hourglass and normal pointer mode.
|
void |
showWindow(Window w)
Shows the given window.
|
void |
windowActivated(WindowEvent e) |
void |
windowClosed(WindowEvent e) |
void |
windowClosing(WindowEvent e) |
void |
windowDeactivated(WindowEvent e) |
void |
windowDeiconified(WindowEvent e) |
void |
windowIconified(WindowEvent e) |
void |
windowOpened(WindowEvent e) |
getVisBio
public static final String DOCKING
public static final String HIDE_ALL
protected Hashtable<Window,WindowInfo> windows
protected Vector<Window> visible
protected int waiting
protected Docker docker
protected boolean docking
protected boolean hideAll
protected boolean distributed
protected Hashtable<String,WindowState> windowStates
public WindowManager(VisBioFrame bio)
public void addWindow(Window w)
public void addWindow(Window w, boolean pack)
public void disposeWindow(Window w)
public Window[] getWindows()
public void setWaitCursor(boolean wait)
public void showWindow(Window w)
public void hideWindows()
public void restoreWindows()
public void disposeWindows()
public void setDistributedMenus(boolean dist)
public void doEvent(VisBioEvent evt)
doEvent
in class LogicManager
public int getTasks()
getTasks
in class LogicManager
public void windowDeiconified(WindowEvent e)
windowDeiconified
in interface WindowListener
public void windowIconified(WindowEvent e)
windowIconified
in interface WindowListener
public void windowActivated(WindowEvent e)
windowActivated
in interface WindowListener
public void windowClosed(WindowEvent e)
windowClosed
in interface WindowListener
public void windowClosing(WindowEvent e)
windowClosing
in interface WindowListener
public void windowDeactivated(WindowEvent e)
windowDeactivated
in interface WindowListener
public void windowOpened(WindowEvent e)
windowOpened
in interface WindowListener
public void saveState(Element el) throws SaveException
saveState
in interface Saveable
saveState
in class LogicManager
SaveException
public void restoreState(Element el) throws SaveException
restoreState
in interface Saveable
restoreState
in class LogicManager
SaveException
protected void doGUI()
protected void setDocking(boolean docking)
protected void setHideAll(boolean hideAll)
protected void doMenuBars(JMenuBar master)
protected WindowInfo getWindowByTitle(String name)
Copyright © 2015–2022 SciJava. All rights reserved.