de.esprit.common.gui

## Class DialogManager

- java.lang.Object
- - de.esprit.common.gui.DialogManager

-     public class DialogManager
      extends java.lang.Object

  This class is used to manage the current window which is either a `ZDialog` or a `ZFrame`. This reference is used for hooking up `MessageDialog` or `ConfirmDialog` instances. Error dialogs such as all `MessageDialog`s are hooke up automatically to the current window. If a Frame or dialog pops to front it is ensured, that all open error dialogs automatically pop on top of them.
  Author:
    Rainer Buesch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DialogManager()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addMessageDialog(MessageDialog dialog)`
    `void` | `closeAllMessageDialogs()` Programmatically closes all open `MessageDialog` instances
    `java.awt.Window` | `getCurrentWindow()` Returns a global reference to the current window which is the JFrame or JDialog that currently has the input focus.
    `javax.swing.JFrame` | `getMainFrame()` Returns a global reference to the MainFrame.
    `void` | `removeMessageDialog(MessageDialog dialog)`
    `void` | `resetCursor(java.awt.Window window)` Resets the cursor on the given window to the default cursor.
    `java.awt.Window` | `setBusyCursor()` Sets the busy cursor on the current window in order to mark the system as busy.
    `void` | `setCurrentWindow(java.awt.Window w)` Sets the current window for global access
    `void` | `setMainFrame(javax.swing.JFrame f)` Sets the MainFrame for global access.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DialogManager

          public DialogManager()

  - ### Method Detail

    - #### addMessageDialog

          public void addMessageDialog(MessageDialog dialog)

    - #### removeMessageDialog

          public void removeMessageDialog(MessageDialog dialog)

    - #### setCurrentWindow

          public void setCurrentWindow(java.awt.Window w)

      Sets the current window for global access

    - #### closeAllMessageDialogs

          public void closeAllMessageDialogs()

      Programmatically closes all open `MessageDialog` instances

    - #### getCurrentWindow

          public java.awt.Window getCurrentWindow()

      Returns a global reference to the current window which is the JFrame or JDialog that currently has the input focus.
      See Also:
        `getMainFrame()`

    - #### setMainFrame

          public void setMainFrame(javax.swing.JFrame f)

      Sets the MainFrame for global access.

    - #### getMainFrame

          public javax.swing.JFrame getMainFrame()

      Returns a global reference to the MainFrame. If no MainFrame is set, then the current frame is returned.
      See Also:
        `getCurrentWindow()`

    - #### setBusyCursor

          public java.awt.Window setBusyCursor()

      Sets the busy cursor on the current window in order to mark the system as busy. Note that you should not forget to reset the cursor on the same window when the system is not busy anymore.
      See Also:
        `resetCursor(Window)`

    - #### resetCursor

          public void resetCursor(java.awt.Window window)

      Resets the cursor on the given window to the default cursor.
      See Also:
        `setBusyCursor()`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.