WebObjects 5.2

com.webobjects.eoapplication
Class EODialogs

java.lang.Object
  |
  +--com.webobjects.eoapplication.EODialogs

public class EODialogs
extends Object

The EODialogs class offers several static methods which can be used to run alert panels and dialogs.


Field Summary
static int AnyValueAllowed
           
static int CancelOperation
           
static int DefaultOperation
           
static int NoWhitespaceAllowed
           
static int OnlyJavaIdentifiersAllowed
           
static int OptionalOperation
           
 
Constructor Summary
EODialogs()
           
 
Method Summary
static int runChooseOperationDialog(String title, String message, String defaultOperation, String optionalOperation)
          Shows a panel with the title title and the message message.
static boolean runConfirmOperationDialog(String title, String message, String operation)
          Shows a panel with the title title and the message message.
static boolean runConfirmOperationDialog(String title, String message, String operation, String alternateOperation)
          Shows a panel with the title title and the message message.
static void runErrorDialog(String title, String message)
          Shows an error panel with the title title and the message message.
static void runInformationDialog(String title, String message)
          Shows an information panel with the title title and the message message.
static String runStringInputDialog(String title, String message, String operation, String alternateOperation, int minimumInputFieldWidth, String suggestedValue, String defaultsIdentifier, boolean allowEmptyString, int validationStrategy)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AnyValueAllowed

public static final int AnyValueAllowed

CancelOperation

public static final int CancelOperation

DefaultOperation

public static final int DefaultOperation

NoWhitespaceAllowed

public static final int NoWhitespaceAllowed

OnlyJavaIdentifiersAllowed

public static final int OnlyJavaIdentifiersAllowed

OptionalOperation

public static final int OptionalOperation
Constructor Detail

EODialogs

public EODialogs()
Method Detail

runChooseOperationDialog

public static int runChooseOperationDialog(String title,
                                           String message,
                                           String defaultOperation,
                                           String optionalOperation)

Shows a panel with the title title and the message message. The user has three choices: The default choice described by defaultOperation, a second option by optionalOperation, and the third choice is "Cancel" (a localized string). If title is not specified, "Alert" (localized) is used.

Returns EODialogs.DefaultOperation if the user chooses the default operation, EODialogs.OptionalOperation if the user chooses the second option, and EODialogs.CancelOperation if the user chooses the "Cancel" option.

Parameters:
title - the title of the panel
message - the message displayed in the panel
defaultOperation - a description of the default operation
optionalOperation - a description of an alternative operation
Returns:
the choice of the user (EODialogs.DefaultOperation, EODialogs.OptionalOperation, or EODialogs.CancelOperation)

runConfirmOperationDialog

public static boolean runConfirmOperationDialog(String title,
                                                String message,
                                                String operation)
Shows a panel with the title title and the message message. The user has two choices: The default choice described by operation, and the second choice is "Cancel" (a localized string). If title is not specified, "Alert" (localized) is used. Returns true if the user chooses the default operation, and false if the user chooses the "Cancel" option. You typically use this method for dialogs of the type "Do you really want to perform this operation?"
Parameters:
title - the title of the panel
message - the message displayed in the panel
operation - a description of the default operation
Returns:
true if the user chose the default operation; false otherwise

runConfirmOperationDialog

public static boolean runConfirmOperationDialog(String title,
                                                String message,
                                                String operation,
                                                String alternateOperation)
Shows a panel with the title title and the message message. The user has two choices: The default choice described by operation, and the second choice described by alternateOperation (and defaults to a "Cancel" (a localized string) operation if not specified). If title is not specified, "Alert" (localized) is used. Returns true if the user chooses the default operation, and false if the user chooses the alternate ("Cancel") option. You typically use this method for "Do Something/Don't Something" dialogs.
Parameters:
title - the title of the panel
message - the message displayed in the panel
operation - a description of the default operation
alternateOperation - a description of the alternative operation ("Cancel")
Returns:
true if the user chose the default operation; false otherwise

runErrorDialog

public static void runErrorDialog(String title,
                                  String message)
Shows an error panel with the title title and the message message. The user confirms the dialog with an "Ok" button. If title is not specified, "Error" (localized) is used.
Parameters:
title - the title of the panel
message - the message displayed in the panel

runInformationDialog

public static void runInformationDialog(String title,
                                        String message)
Shows an information panel with the title title and the message message. The user confirms the dialog with an "Ok" button. If title is not specified, "Information" (localized) is used.
Parameters:
title - the title of the panel
message - the message displayed in the panel

runStringInputDialog

public static String runStringInputDialog(String title,
                                          String message,
                                          String operation,
                                          String alternateOperation,
                                          int minimumInputFieldWidth,
                                          String suggestedValue,
                                          String defaultsIdentifier,
                                          boolean allowEmptyString,
                                          int validationStrategy)

Last updated Fri Feb 21 13:15:00 PST 2003.

Copyright © 2003 Apple Computer, Inc.