|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
public interface RequestOperation
Operation providing means to select from a set of answers.
| Nested Class Summary | |
|---|---|
static interface |
RequestOperation.Answer
Definition of an answer object. |
static class |
RequestOperation.Kind
The kind of the operation. |
| Field Summary | |
|---|---|
static OperationType<RequestOperation> |
TYPE
The operation's type. |
| Method Summary | |
|---|---|
RequestOperation.Answer |
addAnswer(String label)
Add an answer with the given label. |
RequestOperation.Answer |
addCancel()
Adds an answer with a language dependent label for "cancel". |
RequestOperation.Answer |
addNo()
Adds an answer with a language dependent label for "no". |
RequestOperation.Answer |
addOk()
Adds an answer with a language dependent label for "ok". |
RequestOperation.Answer |
addYes()
Adds an answer with a language dependent label for "yes". |
RequestOperation.Answer |
perform(String question)
Asks the given question, returning the selected answer. |
void |
setInitialAnswer(RequestOperation.Answer answer)
Defines the answer to be initially selected. |
void |
setKind(RequestOperation.Kind kind)
Set the kind of request to be answered. |
void |
setTitle(String title)
Set the title of the selection. |
| Field Detail |
|---|
static final OperationType<RequestOperation> TYPE
| Method Detail |
|---|
void setTitle(String title)
title - The selection operation's title.
void setKind(@NotNull
RequestOperation.Kind kind)
RequestOperation.Kind.INFO.
kind - The request kind.RequestOperation.Answer addAnswer(String label)
label - The label.RequestOperation.Answer addYes()
RequestOperation.Answer addNo()
RequestOperation.Answer addOk()
RequestOperation.Answer addCancel()
void setInitialAnswer(RequestOperation.Answer answer)
answer - The initial answer.
@Nullable
RequestOperation.Answer perform(@NotNull
String question)
question - The question to be asked.
null, if the request was closed with no answer.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||