edu.northwestern.at.utils.swing
Class Confirm

java.lang.Object
  extended by edu.northwestern.at.utils.swing.Confirm

public class Confirm
extends java.lang.Object

A confirmation dialog.


Constructor Summary
Confirm()
           
 
Method Summary
static boolean confirm(java.lang.String msg, java.lang.String doitLabel)
          Constructs and displays a confirmation dialog with no parent window.
static boolean confirm(java.lang.String msg, java.lang.String doitLabel, java.awt.Window parent)
          Constructs and displays a confirmation alert.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Confirm

public Confirm()
Method Detail

confirm

public static boolean confirm(java.lang.String msg,
                              java.lang.String doitLabel,
                              java.awt.Window parent)
Constructs and displays a confirmation alert.

Parameters:
msg - The confirmation prompt.
doitLabel - Label for the "Doit" button.
parent - The parent window, or null if none. The dialog is positioned centered over its parent window horizontally and positioned with its top 25 pixels below the top of its parent.
Returns:
True if "Doit" button clicked, false if "Cancel".

confirm

public static boolean confirm(java.lang.String msg,
                              java.lang.String doitLabel)
Constructs and displays a confirmation dialog with no parent window.

Parameters:
doitLabel - Label for the "Doit" button.
msg - The confirmation prompt.
Returns:
True if "Doit" button clicked, false if "Cancel".