|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UserRequestHandler
Provides UI-independant access to the user. Some standard request types are provided and a generic postRequest() method is provided that can take any UserRequest object. This allows UI-specific implementations to be developed.
Note: this concept is sort of experimental and I'm not sure if it will actually be useful in practice. It's all part of trying to factor the UI-specific code out of as many places as possible. This request brokering concept handles many cases where Swing-specific, etc. UIs might need to be called for very simple generic things. It may grow into something more generally useful though. That's part of the experiment.
Method Summary | |
---|---|
java.lang.Object |
postRequest(UserRequest request)
Presents the specified request to the user and returns the result. |
java.lang.Boolean |
requestConfirmation(java.lang.String title,
java.lang.String message,
boolean includeCancel)
Requests confirmation from the user in the form of a yes/no question. |
java.io.File |
requestDirectory(java.lang.String title)
Requests a directory selection from the user. |
java.io.File |
requestFile(java.lang.String title,
java.lang.String typeDescription,
java.lang.String extension,
boolean forOpen)
Requests a file selection from the user. |
java.io.File |
requestFile(java.lang.String title,
java.lang.String typeDescription,
java.lang.String extension,
java.io.File initialValue,
boolean forOpen)
Requests a file selection from the user providing a default initial value. |
ProgressReporter |
requestProgressReporter(java.lang.String title,
java.lang.String message,
int min,
int max)
Returns an object that can be used to report the progress of some operation to the user. |
void |
requestShowError(java.lang.String title,
java.lang.String message)
Presents an error message tot he user. |
void |
requestShowMessage(java.lang.String message)
Presents an informational message to the user. |
void |
requestShowMessage(java.lang.String title,
java.lang.String message,
int icon)
Presents a titled message to the user with an optional icon. |
java.lang.String |
requestString(java.lang.String title,
java.lang.String message,
java.lang.String initialValue)
Requests a String entry from the user. |
Method Detail |
---|
java.lang.Boolean requestConfirmation(java.lang.String title, java.lang.String message, boolean includeCancel)
java.lang.Object postRequest(UserRequest request)
java.io.File requestFile(java.lang.String title, java.lang.String typeDescription, java.lang.String extension, boolean forOpen)
java.io.File requestFile(java.lang.String title, java.lang.String typeDescription, java.lang.String extension, java.io.File initialValue, boolean forOpen)
java.io.File requestDirectory(java.lang.String title)
java.lang.String requestString(java.lang.String title, java.lang.String message, java.lang.String initialValue)
void requestShowMessage(java.lang.String message)
void requestShowMessage(java.lang.String title, java.lang.String message, int icon)
void requestShowError(java.lang.String title, java.lang.String message)
ProgressReporter requestProgressReporter(java.lang.String title, java.lang.String message, int min, int max)
title
- The name of the over-all operation. Implementations
of UserRequestHandler should consider aggregating
the progress for the different reporters with the
same title.message
- A modifiable message associated with the current part
of the task.min
- The minimum value for the progress range.max
- The maximum value for the progress range.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |