|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.prompts.groups.ModalGroup
public class ModalGroup
Prompt group which contains ModelChoiceGroups. Each modal choice group represents one set of prompts that may be shown to the user depending on a selection by the user. The labels of all the ModalChoiceGroups in a given ModalGroup are typically presented in a dropdown to the user. Depending on which label is selected, the prompts in the associated ModalChoiceGroup will be shown. The value of the selected ModalChoiceGroup will then be set as the value of the ModalGroupDefinition associated with the ModalGroup. Note that only ModalChoiceGroups can be direct children of a ModalGroup. The only type of group which can be a descendant of a ModalGroup are TransparentGroups.
Field Summary |
---|
Fields inherited from interface com.sas.prompts.groups.PromptGroupInterface |
---|
PROMPT_GROUP_VALIDATION_ERROR_DISALLOWED_PROMPT_DEFINITION, PROMPT_GROUP_VALIDATION_ERROR_DUPLICATE_MODAL_CHOICE_VALUE, PROMPT_GROUP_VALIDATION_ERROR_NOT_VALID_SUBGROUP, PROMPT_GROUP_VALIDATION_NO_ERRORS |
Constructor Summary | |
---|---|
ModalGroup()
Constructor |
|
ModalGroup(java.util.List promptDefinitionsAndSubgroups)
Constructor that takes a group name and list of PromptDefinitions and PromptGroups. |
Method Summary | |
---|---|
void |
addPromptDefinition(PromptDefinitionInterface promptDefinition)
Adds the specified prompt to the group. |
void |
addPromptDefinition(PromptDefinitionInterface promptDefinition,
int index)
Adds a group to the group at the specified index. |
void |
addPromptDefinitions(java.util.List promptDefinitions)
Throws an IllegalArgumentException since ModalGroups can only contain subgroups, not prompts. |
void |
addPromptSubgroup(PromptGroupInterface promptSubgroup)
Adds a subgroup to this prompt group. |
void |
addPromptSubgroup(PromptGroupInterface promptSubgroup,
int index)
Adds a subgroup to this prompt group. |
PromptGroupInterface |
copy(PromptGroupInterface newGroup)
Returns a copy of this PromptGroup. |
PromptDefinitionInterface |
getChoiceDefinition()
Returns the prompt which is associated with the value of the ModalGroup. |
com.sas.prompts.groups.ModalChoiceGroupInterface |
getModalChoiceGroupForValue(java.lang.Object value)
Returns the contained ModalChoiceGroup whose value matches the passed in value. |
void |
setPromptGroupDescription(java.lang.String newDesc,
java.util.Locale locale)
Sets the description for the group in the specified locale. |
void |
setPromptGroupLabel(java.lang.String newLabel,
java.util.Locale locale)
Sets the label for the group in the specified locale. |
Methods inherited from class com.sas.prompts.groups.TransparentGroup |
---|
isTransparent |
Constructor Detail |
---|
public ModalGroup()
public ModalGroup(java.util.List promptDefinitionsAndSubgroups)
Method Detail |
---|
public PromptDefinitionInterface getChoiceDefinition()
getChoiceDefinition
in interface com.sas.prompts.groups.ModalGroupInterface
public void setPromptGroupLabel(java.lang.String newLabel, java.util.Locale locale)
setPromptGroupLabel
in interface com.sas.prompts.groups.ModalGroupInterface
setPromptGroupLabel
in interface PromptGroupInterface
setPromptGroupLabel
in class PromptGroup
newLabel
- The label for the group for the given localelocale
- The locale to use the label withPromptGroupInterface.setPromptGroupLabel(String, Locale)
public void setPromptGroupDescription(java.lang.String newDesc, java.util.Locale locale)
setPromptGroupDescription
in interface com.sas.prompts.groups.ModalGroupInterface
setPromptGroupDescription
in interface PromptGroupInterface
setPromptGroupDescription
in class PromptGroup
newDesc
- The description for the group for the given localelocale
- The locale to use the description withPromptGroupInterface.setPromptGroupDescription(String, Locale)
public void addPromptSubgroup(PromptGroupInterface promptSubgroup)
addPromptSubgroup
in interface PromptGroupInterface
addPromptSubgroup
in class TransparentGroup
promptSubgroup
- The group to add as a child. This may not be null.PromptGroupInterface.addPromptSubgroup(PromptGroupInterface)
public void addPromptSubgroup(PromptGroupInterface promptSubgroup, int index)
addPromptSubgroup
in interface PromptGroupInterface
addPromptSubgroup
in class TransparentGroup
promptSubgroup
- PromptGroupInterface The group to add as a child. This may not be null.index
- intPromptGroupInterface.addPromptSubgroup(PromptGroupInterface, int)
public void addPromptDefinition(PromptDefinitionInterface promptDefinition, int index)
PromptGroup
addPromptDefinition
in interface PromptGroupInterface
addPromptDefinition
in class PromptGroup
promptDefinition
- The prompt to addindex
- The index to insert the prompt atPromptGroupInterface.addPromptDefinition(PromptDefinitionInterface, int)
public void addPromptDefinition(PromptDefinitionInterface promptDefinition)
addPromptDefinition
in interface PromptGroupInterface
addPromptDefinition
in class PromptGroup
promptDefinition
- The ModalGroupDefinition to add to the groupPromptGroupInterface.addPromptDefinition(PromptDefinitionInterface)
public void addPromptDefinitions(java.util.List promptDefinitions)
addPromptDefinitions
in interface PromptGroupInterface
addPromptDefinitions
in class PromptGroup
promptDefinitions
- This parameter is not usedPromptGroupInterface.addPromptDefinitions(List)
public com.sas.prompts.groups.ModalChoiceGroupInterface getModalChoiceGroupForValue(java.lang.Object value)
getModalChoiceGroupForValue
in interface com.sas.prompts.groups.ModalGroupInterface
value
- The value to match
public PromptGroupInterface copy(PromptGroupInterface newGroup)
PromptGroup
newGroup
is null, a new instance of PromptGroup will be created, populated and returned.
Subclasses must instantiate an instance of themselves, do any class-specific copying, then call
return super.copy(newGroup)
;
copy
in interface PromptGroupInterface
copy
in class TransparentGroup
newGroup
- PromptGroupInterface
PromptGroupInterface.copy(PromptGroupInterface)
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |