Arch4J 1.1

org.arch4j.ui.components
Class DialogManager

java.lang.Object
  |
  +--org.arch4j.ui.components.DialogManager

public class DialogManager
extends Object

Centralized place to deal with Dialogs, We 'deal' with Dialogs by making sure if we're already displaying a modal dialog to not display another one. This is not the perfect solution, but stacking multiple modal dialogs can cause issues, maybe a better solution for later on would be to add additional Dialogs to the currently displaying one. The issue was that Modal Dialog's could be popped up from multiple- panels and would never be aware of each other. Also there are cases where the code doesn't have reference to or extend a PropertiesPanel so there would be no way to leverage the smarts. Now you can.

Author:
jroome

Method Summary
 boolean displayConfirm(Component component, String aMessage, String aTitle)
          Display an Confirmation dialog to the user
 boolean displayConfirm(String aMessage, String aTitle)
          Display an Confirmation dialog to the user
 void displayError(Component component, String anError, String aTitle)
          Display an error to the user.
 void displayError(String anError, String aTitle)
          Display an error to the user.
 void displayInformation(Component component, String aMessage, String aTitle)
          Display an informational message to the user.
 void displayInformation(String aMessage, String aTitle)
          Display an informational message to the user.
 void displayMessage(Component component, Object aMessage, String aTitle, int type)
          Display an informational message to the user.
 void displayWarning(Component component, String aWarning, String aTitle)
          Display a warning to the user.
 void displayWarning(String aWarning, String aTitle)
          Display a warning to the user.
static DialogManager getManager()
           
 boolean isDisplayingMessage()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getManager

public static DialogManager getManager()

isDisplayingMessage

public boolean isDisplayingMessage()
Returns:
boolean

displayError

public void displayError(String anError,
                         String aTitle)
Display an error to the user.

Parameters:
anError - The error message.
aTitle - The title for the dialog.

displayError

public void displayError(Component component,
                         String anError,
                         String aTitle)
Display an error to the user.

Parameters:
component - The component to associate the dialog with.
anError - The error message.
aTitle - The title for the dialog.

displayConfirm

public boolean displayConfirm(String aMessage,
                              String aTitle)
Display an Confirmation dialog to the user

Parameters:
aMessage - The confirmation message.
aTitle - The title for the dialog.
Returns:
OK == true

displayConfirm

public boolean displayConfirm(Component component,
                              String aMessage,
                              String aTitle)
Display an Confirmation dialog to the user

Parameters:
component - The component to associate the dialog with.
aMessage - The confirmation message.
aTitle - The title for the dialog.
Returns:
OK == true

displayWarning

public void displayWarning(String aWarning,
                           String aTitle)
Display a warning to the user.

Parameters:
aWarning - The warning message.
aTitle - The title for the dialog.

displayWarning

public void displayWarning(Component component,
                           String aWarning,
                           String aTitle)
Display a warning to the user.

Parameters:
component - The component to associate the dialog with.
aWarning - The warning message.
aTitle - The title for the dialog.

displayInformation

public void displayInformation(String aMessage,
                               String aTitle)
Display an informational message to the user.

Parameters:
aMessage - The informational message.
aTitle - The title for the dialog.

displayInformation

public void displayInformation(Component component,
                               String aMessage,
                               String aTitle)
Display an informational message to the user.

Parameters:
component - The component to associate the dialog with.
aMessage - The informational message.
aTitle - The title for the dialog.

displayMessage

public void displayMessage(Component component,
                           Object aMessage,
                           String aTitle,
                           int type)
Display an informational message to the user.

Parameters:
component - The component to associate the dialog with.
aMessage - The informational message.
aTitle - The title for the dialog.
type - JOptionPane type

Arch4J 1.1

Copyright © 2000-2004 SpiderLogic, a service of Wipfli Ullrich Bertelson LLP.