| java.lang.Object javax.security.auth.callback.ChoiceCallback
All known Subclasses: javax.security.sasl.RealmChoiceCallback,
Constructor Summary | |
public | ChoiceCallback(String prompt, String[] choices, int defaultChoice, boolean multipleSelectionsAllowed) Construct a ChoiceCallback with a prompt,
a list of choices, a default choice, and a boolean specifying
whether or not multiple selections from the list of choices are allowed.
Parameters: prompt - the prompt used to describe the list of choices. |
ChoiceCallback | public ChoiceCallback(String prompt, String[] choices, int defaultChoice, boolean multipleSelectionsAllowed)(Code) | | Construct a ChoiceCallback with a prompt,
a list of choices, a default choice, and a boolean specifying
whether or not multiple selections from the list of choices are allowed.
Parameters: prompt - the prompt used to describe the list of choices. Parameters: choices - the list of choices.
Parameters: defaultChoice - the choice to be used as the default choicewhen the list of choices are displayed. This valueis represented as an index into thechoices array.
Parameters: multipleSelectionsAllowed - boolean specifying whether ornot multiple selections can be made from thelist of choices. exception: IllegalArgumentException - if prompt is null,if prompt has a length of 0,if choices is null,if choices has a length of 0,if any element from choices is null,if any element from choices has a length of 0 or if defaultChoice does not fall within the array boundaries ofchoices .
|
allowMultipleSelections | public boolean allowMultipleSelections()(Code) | | Get the boolean determining whether multiple selections from
the choices list are allowed.
whether multiple selections are allowed. |
getChoices | public String[] getChoices()(Code) | | Get the list of choices.
the list of choices. |
getDefaultChoice | public int getDefaultChoice()(Code) | | Get the defaultChoice.
the defaultChoice, represented as an index intothe choices list. |
getPrompt | public String getPrompt()(Code) | | Get the prompt.
the prompt. |
setSelectedIndex | public void setSelectedIndex(int selection)(Code) | | Set the selected choice.
Parameters: selection - the selection represented as an index into thechoices list. See Also: ChoiceCallback.getSelectedIndexes |
setSelectedIndexes | public void setSelectedIndexes(int[] selections)(Code) | | Set the selected choices.
Parameters: selections - the selections represented as indexes into thechoices list. exception: UnsupportedOperationException - if multiple selections arenot allowed, as determined byallowMultipleSelections . See Also: ChoiceCallback.getSelectedIndexes |
|
|