org.mockcentral.editor.dialogs
Interface IMockCentralDialogFactory


public interface IMockCentralDialogFactory

Interface for classes used to display various dialogs for the application.

Author:
David Hutchinson

Field Summary
static int CANCEL_OPTION
          A constant identifying a cancel response to a dialog
static int ERROR_IMAGE
          Constant identifying an error dialog image to be shown.
static int INFO_IMAGE
          Constant identifying an information dialog image to be shown.
static int NO_OPTION
          A constant identifying a no response to a dialog
static int WARNING_IMAGE
          Constant identifying a warning dialog image to be shown.
static int YES_OPTION
          A constant identifying a yes response to a dialog
 
Method Summary
 IMockCentralDialog getMockCentralDialog(MockCentralDialogType type, java.lang.Object... args)
          Returns an IMockCentralDialog created using the specified MockCentralDialogType value and the supplied varargs.
 int showConfirmDialog(java.lang.String title, java.lang.String message)
          Displays a confirmation dialog constructed with the parameter values, returning the user's response.
 java.lang.String showInputDialog(java.lang.String title, java.lang.String message, java.lang.String defaultValue, IMockCentralDialogInputValidator validator)
          Invoked to display an input dialog constructed with the parameter values, returning the user's response.
 void showMessageDialog(java.lang.String title, java.lang.String message)
          Displays a message dialog.
 void showMessageDialog(java.lang.String title, java.lang.String message, int dialogImageType)
          Displays a confirmation dialog constructed with the parameter values.
 

Field Detail

ERROR_IMAGE

static final int ERROR_IMAGE
Constant identifying an error dialog image to be shown.

See Also:
Constant Field Values

INFO_IMAGE

static final int INFO_IMAGE
Constant identifying an information dialog image to be shown.

See Also:
Constant Field Values

WARNING_IMAGE

static final int WARNING_IMAGE
Constant identifying a warning dialog image to be shown.

See Also:
Constant Field Values

YES_OPTION

static final int YES_OPTION
A constant identifying a yes response to a dialog

See Also:
Constant Field Values

NO_OPTION

static final int NO_OPTION
A constant identifying a no response to a dialog

See Also:
Constant Field Values

CANCEL_OPTION

static final int CANCEL_OPTION
A constant identifying a cancel response to a dialog

See Also:
Constant Field Values
Method Detail

showMessageDialog

void showMessageDialog(java.lang.String title,
                       java.lang.String message,
                       int dialogImageType)
Displays a confirmation dialog constructed with the parameter values.

Parameters:
title - the dialog title to display.
message - the dialog message to display.
dialogImageType - an int specifying the dialog image to display.

showMessageDialog

void showMessageDialog(java.lang.String title,
                       java.lang.String message)
Displays a message dialog.

Parameters:
title - the dialog title to display.
message - the dialog message to display.

showConfirmDialog

int showConfirmDialog(java.lang.String title,
                      java.lang.String message)
Displays a confirmation dialog constructed with the parameter values, returning the user's response. The response will be one of the constants defined in the IMockCentralEditor interface.

Parameters:
title - a title for the dialog.
message - the confirmation message.
Returns:
the user's response to the dialog.

showInputDialog

java.lang.String showInputDialog(java.lang.String title,
                                 java.lang.String message,
                                 java.lang.String defaultValue,
                                 IMockCentralDialogInputValidator validator)
Invoked to display an input dialog constructed with the parameter values, returning the user's response.

Parameters:
title - the dialog title.
message - the input message.
defaultValue - the default value for the input.
validator - the IMockCentralDialogInputValidator for validating the input.
Returns:
the user's input.

getMockCentralDialog

IMockCentralDialog getMockCentralDialog(MockCentralDialogType type,
                                        java.lang.Object... args)
Returns an IMockCentralDialog created using the specified MockCentralDialogType value and the supplied varargs.

Parameters:
type - the MockCentralDialogType value.
args - an arrays or arguments used to build the dialog.
Returns:
an IMockCentralDialog created using the specified MockCentralDialogType value and the supplied varargs.