edu.rice.cs.util.swing
Class ConfirmCheckBoxDialog

java.lang.Object
  extended by edu.rice.cs.util.swing.ConfirmCheckBoxDialog

public class ConfirmCheckBoxDialog
extends Object

Simple class wrapping JOptionPane to have a checkbox underneath the message.

Version:
$Id: ConfirmCheckBoxDialog.java 4422 2008-03-27 15:08:58Z rcartwright $

Constructor Summary
ConfirmCheckBoxDialog(JFrame parent, String title, Object message)
          Instantiates a new confirm dialog with default checkbox text.
ConfirmCheckBoxDialog(JFrame parent, String title, Object message, String checkBoxText)
          Instantiates a new confirm dialog with Yes/No as the options.
ConfirmCheckBoxDialog(JFrame parent, String title, Object message, String checkBoxText, int messageType, int optionType)
          Instantiates a new confirm dialog with Yes/No as the options.
 
Method Summary
 boolean getCheckBoxValue()
          Gets the selected value of the check box.
 int show()
          Shows the dialog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfirmCheckBoxDialog

public ConfirmCheckBoxDialog(JFrame parent,
                             String title,
                             Object message)
Instantiates a new confirm dialog with default checkbox text.

Parameters:
parent - the parent frame
title - the title of the dialog
message - the stuff to display in the body of the dialog. For a simple message, it should be a String; it can also be an Object[] including Strings and Components to display in the body of the dialog.

ConfirmCheckBoxDialog

public ConfirmCheckBoxDialog(JFrame parent,
                             String title,
                             Object message,
                             String checkBoxText)
Instantiates a new confirm dialog with Yes/No as the options.

Parameters:
parent - the parent frame
title - the title of the dialog
message - the stuff to display in the body of the dialog. For a simple message, it should be a String; it can also be an Object[] including Strings and Components to display in the body of the dialog.
checkBoxText - the text to display with the checkbox

ConfirmCheckBoxDialog

public ConfirmCheckBoxDialog(JFrame parent,
                             String title,
                             Object message,
                             String checkBoxText,
                             int messageType,
                             int optionType)
Instantiates a new confirm dialog with Yes/No as the options.

Parameters:
parent - The parent frame
title - The title of the dialog
message - The stuff to display in the body of the dialog. For a simple message, it should be a String; it can also be an Object[] including Strings and Components to display in the body of the dialog.
checkBoxText - The text to display with the checkbox
messageType - The JOptionPane message type
optionType - The JOptionPane option type
Method Detail

show

public int show()
Shows the dialog.

Returns:
the JOptionPane result of showing the dialog.

getCheckBoxValue

public boolean getCheckBoxValue()
Gets the selected value of the check box. Should not be called until the dialog is shown.

Returns:
the value of the checkbox