|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface describes basic functionality neccessary for user interaction. All methods or functions which perform work and need to notify or ask the user use a listener for such purposes. This way, we can separate UI from function.
Field Summary | |
static int |
ANSWER_CANCEL
|
static int |
ANSWER_NO
|
static int |
ANSWER_YES
|
static int |
CHOICES_YES_NO
|
static int |
CHOICES_YES_NO_CANCEL
|
Method Summary | |
int |
askQuestion(java.lang.String title,
java.lang.String question,
int choices)
Ask the user a question. |
int |
askQuestion(java.lang.String title,
java.lang.String question,
int choices,
int default_choice)
Ask the user a question. |
void |
emitError(java.lang.String title,
java.lang.String message)
Notify the user of some error. |
void |
emitNotification(java.lang.String message)
Notify the user about something. |
boolean |
emitWarning(java.lang.String title,
java.lang.String message)
Warn the user about something. |
Field Detail |
public static final int ANSWER_CANCEL
public static final int ANSWER_YES
public static final int ANSWER_NO
public static final int CHOICES_YES_NO
public static final int CHOICES_YES_NO_CANCEL
Method Detail |
public void emitNotification(java.lang.String message)
message
- The notification.public boolean emitWarning(java.lang.String title, java.lang.String message)
title
- The message title (used for dialog name, might not be displayed)message
- The warning message.
public void emitError(java.lang.String title, java.lang.String message)
title
- The message title (used for dialog name, might not be displayed)message
- The error message.public int askQuestion(java.lang.String title, java.lang.String question, int choices)
title
- The title of the question (useful for dialogs). Might be null.question
- The question.choices
- The set of choices to present. Either CHOICES_YES_NO or CHOICES_YES_NO_CANCEL
public int askQuestion(java.lang.String title, java.lang.String question, int choices, int default_choice)
title
- The title of the question (useful for dialogs). Might be null.question
- The question.choices
- The set of choices to present. Either CHOICES_YES_NO or CHOICES_YES_NO_CANCELdefault_choice
- The default choice. One of ANSWER_CANCEL, ANSWER_YES or ANSWER_NO.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |