|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface UserPrompterFactory
| Method Summary | |
|---|---|
UserPrompter |
createUserPrompter(java.lang.String question,
java.lang.String okText,
java.lang.String notOkText,
java.lang.String cancelText)
Creates a new user prompter instance with the given settings. |
| Method Detail |
|---|
UserPrompter createUserPrompter(java.lang.String question,
java.lang.String okText,
java.lang.String notOkText,
java.lang.String cancelText)
question - The question the new prompter will pose when solociting a response
from the user. This question string is not exactly plain text: it is
formatted according to to rules laid out in the MessageFormat
class. The most important implications are that the single quote (')
character and the open curly brace ({) characters are special and have
to be escaped in order to appear in the message. The other important
thing (the benefit, that is) is that constructions of the form {0} are
placeholders that will be substituted every time the question is asked
via the UserPrompter.promptUser(Object[]) method is called.
See MessageFormat for details.
Also, UserPrompter implementations will ensure that newline characters (\n) show up as new lines when the question is presented to the user.
okText - The text to associate with the OK response. Try to use a word
or phrase from the question instead of a generic word like
"OK" or "Yes".notOkText - The text to associate with the "not OK" response. Try to use a
word or phrase from the question instead of a generic word
like "No".cancelText - The text to associate with response that cancels the whole operation.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||