|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AbstractUIHandler
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 |
---|
static final int ANSWER_CANCEL
static final int ANSWER_YES
static final int ANSWER_NO
static final int CHOICES_YES_NO
static final int CHOICES_YES_NO_CANCEL
Method Detail |
---|
void emitNotification(java.lang.String message)
message
- The notification.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.
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.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
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 |