com.denova.ui
Class UserNotices

java.lang.Object
  |
  +--com.denova.ui.UserNotices

public class UserNotices
extends java.lang.Object

Report errors, give warnings, ask yes/no questions of users.

Author:
DeNova Copyright © 1997-2008 DeNova All rights reserved worldwide. Last modified: 25 Mar 2008

Constructor Summary
UserNotices()
           
 
Method Summary
static boolean ask(java.lang.String title, java.lang.String question, java.util.List explanation, java.lang.String yesOption, java.lang.String noOption)
          Ask the user a YES/NO question.
static boolean ask(java.lang.String title, java.lang.String question, java.util.List explanation, java.lang.String yesOption, java.lang.String noOption, java.lang.String defaultOption)
          Ask the user a YES/NO question and give an explanation.
static boolean ask(java.lang.String title, java.lang.String question, java.lang.String yesOption, java.lang.String noOption)
          Ask the user a YES/NO question.
static void awtNoteError(java.lang.String message)
          Display an error message via AWT.
static void note(java.util.List note, java.lang.String doneOption)
          Display a message using a JDialog box.
static void note(java.lang.String message)
          Display a message using a JDialog box.
static void note(java.lang.String header, java.util.List note, java.lang.String doneOption)
          Display a message using a JDialog box.
static void note(java.lang.String message, java.lang.String doneOption)
          Display a message using a JDialog box.
static void note(java.lang.String title, java.lang.String header, java.util.List note, java.lang.String doneOption)
          Display a message using a JDialog box.
static void noteError(java.lang.String message)
          Display an error message using a JDialog box.
static void noteError(java.lang.String message, java.lang.String doneOption)
          Display an error message using a JDialog box.
static void noteError(java.lang.String title, java.lang.String header, java.util.List note, java.lang.String doneOption)
          Display an error message using a JDialog box.
static void noteError(java.lang.String title, java.lang.String message, java.lang.String doneOption)
          Display an error message using a JDialog box.
static void unexpectedStartupError()
          Display error message that Swing is required.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserNotices

public UserNotices()
Method Detail

ask

public static boolean ask(java.lang.String title,
                          java.lang.String question,
                          java.lang.String yesOption,
                          java.lang.String noOption)
Ask the user a YES/NO question. Set default answer is set to YES.

Parameters:
title - title of dialog box.
question - question in bold text.
yesOption - text for a positive answer.
noOption - text for a negative answer.
Returns:
true if user answered yesOption; otherwise returns false.

ask

public static boolean ask(java.lang.String title,
                          java.lang.String question,
                          java.util.List explanation,
                          java.lang.String yesOption,
                          java.lang.String noOption)
Ask the user a YES/NO question. Set default answer is set to YES.

Parameters:
title - title of dialog box.
question - question in bold text.
explanation - each item is an paragraph giving details about q/a.
yesOption - text for a positive answer.
noOption - text for a negative answer.
Returns:
true if user answered yesOption; otherwise returns false.

ask

public static boolean ask(java.lang.String title,
                          java.lang.String question,
                          java.util.List explanation,
                          java.lang.String yesOption,
                          java.lang.String noOption,
                          java.lang.String defaultOption)
Ask the user a YES/NO question and give an explanation.

Parameters:
title - title of dialog box.
question - question in bold text.
explanation - each item is an paragraph giving details about q/a.
yesOption - text for a positive answer.
noOption - text for a negative answer.
defaultOption - option to highlight as default.
Returns:
true if user answered yesOption; otherwise returns false.

note

public static void note(java.lang.String message)
Display a message using a JDialog box. The message is automatically word wrapped.

Parameters:
message - Note to user.

note

public static void note(java.lang.String message,
                        java.lang.String doneOption)
Display a message using a JDialog box. The message is automatically word wrapped.

Parameters:
message - Note to user.
doneOption - Text for the button.

note

public static void note(java.util.List note,
                        java.lang.String doneOption)
Display a message using a JDialog box. Each item in the note is a separate paragraph that is automatically word wrapped.

Parameters:
note - Message to user.
doneOption - Text for the button.

note

public static void note(java.lang.String header,
                        java.util.List note,
                        java.lang.String doneOption)
Display a message using a JDialog box. The header appears in bold text. Each item in the note is a separate paragraph that is automatically word wrapped.

Parameters:
header - Main point of note.
note - Additioinal details.
doneOption - Text for the button.

note

public static void note(java.lang.String title,
                        java.lang.String header,
                        java.util.List note,
                        java.lang.String doneOption)
Display a message using a JDialog box. The header appears in bold text. Each item in the note is a separate paragraph that is automatically word wrapped.

Parameters:
title - Title for the dialog box.
header - Main point of note.
note - Additioinal details.
doneOption - Text for the button.

noteError

public static void noteError(java.lang.String message)
Display an error message using a JDialog box. The message is automatically word wrapped.

Parameters:
message - an error message.

noteError

public static void noteError(java.lang.String message,
                             java.lang.String doneOption)
Display an error message using a JDialog box.

Parameters:
message - 1 or more strings that display.
doneOption - the text for the OK button

noteError

public static void noteError(java.lang.String title,
                             java.lang.String message,
                             java.lang.String doneOption)
Display an error message using a JDialog box.

Parameters:
title - title of the popup dialog box.
message - 1 or more strings that display.
doneOption - the text for the OK button

noteError

public static void noteError(java.lang.String title,
                             java.lang.String header,
                             java.util.List note,
                             java.lang.String doneOption)
Display an error message using a JDialog box.

Parameters:
title - title of the popup dialog box.
header - 1st paragraph in large, bold face.
note - list of strings that display.
doneOption - the text for the OK button

awtNoteError

public static void awtNoteError(java.lang.String message)
Display an error message via AWT.

Parameters:
message - a one line message.

unexpectedStartupError

public static void unexpectedStartupError()
Display error message that Swing is required.