puzzled.dialogs
Class DialogMaster

java.lang.Object
  |
  +--puzzled.dialogs.DialogMaster

public class DialogMaster
extends java.lang.Object

This class contains the facility to prompt the user for various error, warning of confirmation messages. These dialogs are prompted when an abormal condition occurs. This class is proposed with three constructor, allowing for a maximum of flexibility in the information presented to the user.


Field Summary
static int BAD_HELP_FILE_URL
           
static int CREATE
           
static int EMPTY_FIELD
           
static int INVALID_FILE
           
static int NOTHING_TO_PRINT
           
static int NUMBER_FORMAT
           
static int OVERWRITE
           
static int PRINTER_ERROR
           
static int SAVE
           
static int SAVING_ERROR
           
static int UNSUPPORTED_LAF
           
static int WARN_IO_CREATE
           
static int WARN_IO_SAVE
           
 
Constructor Summary
DialogMaster()
           
 
Method Summary
static void setParent(ProblemSolver parent_arg)
           
static int showDialog(int type)
          Method used when no other typical information is required beside the type of the dialog box.
static int showDialog(int type, java.io.File theFile)
          Method used to prompt the user when an abnormal condition happens during file operations.
static int showDialog(int type, java.lang.String text)
          Method used typically when a string can be passed as an additional mean of information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CREATE

public static final int CREATE

OVERWRITE

public static final int OVERWRITE

WARN_IO_SAVE

public static final int WARN_IO_SAVE

WARN_IO_CREATE

public static final int WARN_IO_CREATE

INVALID_FILE

public static final int INVALID_FILE

SAVE

public static final int SAVE

SAVING_ERROR

public static final int SAVING_ERROR

NUMBER_FORMAT

public static final int NUMBER_FORMAT

EMPTY_FIELD

public static final int EMPTY_FIELD

NOTHING_TO_PRINT

public static final int NOTHING_TO_PRINT

PRINTER_ERROR

public static final int PRINTER_ERROR

UNSUPPORTED_LAF

public static final int UNSUPPORTED_LAF

BAD_HELP_FILE_URL

public static final int BAD_HELP_FILE_URL
Constructor Detail

DialogMaster

public DialogMaster()
Method Detail

setParent

public static void setParent(ProblemSolver parent_arg)

showDialog

public static int showDialog(int type)
Method used when no other typical information is required beside the type of the dialog box.
Parameters:
type - The type of message to be displayed

showDialog

public static int showDialog(int type,
                             java.io.File theFile)
Method used to prompt the user when an abnormal condition happens during file operations.
Parameters:
type - The type of message to be displayed
theFile - A file reference used to identify the file originating the warning or error message.

showDialog

public static int showDialog(int type,
                             java.lang.String text)
Method used typically when a string can be passed as an additional mean of information.
Parameters:
type - The type of message to be displayed
text - A string of additional information to be displayed within the message.