All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.prompts.groups
Class ModalGroup

    com.sas.prompts.groups.ModalGroup

All Implemented Interfaces:
  com.sas.models.VersionInterface, com.sas.prompts.groups.ModalGroupInterface, PromptGroupInterface, com.sas.prompts.groups.PromptGroupV2Interface, com.sas.prompts.groups.TransparentGroupInterface, com.sas.prompts.IdentifiablePromptInterface, com.sas.prompts.MutableIdentifiablePromptInterface, com.sas.storage.editableproperties.LocalizableProperties, com.sas.storage.editableproperties.MultiLocaleProperties, com.sas.storage.editableproperties.SubstitutionProperties, com.sas.uiconfig.ContextEnabledObject, com.sas.util.AttributeConfigurationInterface, com.sas.util.log.ComponentLogFactoryInterface, com.sas.util.ResourceReferencesInterface, com.sas.util.xmlpersist.PersistenceInterface, java.io.Externalizable, java.io.Serializable

    public class ModalGroup

implements com.sas.prompts.groups.ModalGroupInterface

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.

See Also:
  Serialized Form

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`

Methods inherited from class com.sas.prompts.groups.PromptGroup
`addPromptDefinitionCombination, configureAttributes, containsSubgroup, findPromptSubgroup, getApplicationContext, getAttributeDescriptors, getDependentPromptsForAttributes, getLocalizableProperties, getMaxVersion, getPromptDefinition, getPromptDefinitionCombinations, getPromptDefinitions, getPromptDefinitionsAndSubgroups, getPromptDefinitionsAndSubgroups, getPromptGroupDescription, getPromptGroupDescriptions, getPromptGroupLabel, getPromptGroupLabels, getPromptGroupLayout, getPromptID, getPromptSubgroups, getScript, getScripts, getSubstitutionProperties, getUIConfiguration, getVersion, getWritableLayoutInfo, hasPromptDefinition, indexOfPromptDefinitionOrSubgroup, isClearPromptValuesWhenHidden, isIgnorePromptValuesWhenHidden, isPromptGroupDisabled, isPromptGroupHidden, removeAllPromptDefinitions, removePromptDefinition, removePromptDefinitionCombination, removeScript, replacePromptDefintion, setApplicationContext, setClearPromptValuesWhenHidden, setDependentPromptsForAttributes, setIgnorePromptValuesWhenHidden, setLocalizableProperties, setPromptGroupDescriptions, setPromptGroupDisabled, setPromptGroupHidden, setPromptGroupLabels, setPromptGroupLayout, setPromptID, setScript, setSubstitutionProperties, setTransparent, setUIConfiguration, toString, writeLayout`

Methods inherited from interface com.sas.prompts.groups.PromptGroupInterface
`containsSubgroup, findPromptSubgroup, getPromptDefinition, getPromptDefinitions, getPromptDefinitionsAndSubgroups, getPromptDefinitionsAndSubgroups, getPromptGroupDescription, getPromptGroupDescriptions, getPromptGroupLabel, getPromptGroupLabels, getPromptSubgroups, hasPromptDefinition, indexOfPromptDefinitionOrSubgroup, isPromptGroupHidden, removeAllPromptDefinitions, removePromptDefinition, replacePromptDefintion, setPromptGroupDescriptions, setPromptGroupLabels`

Constructor Detail

### ModalGroup

    public ModalGroup()

  Constructor

### ModalGroup

    public ModalGroup(java.util.List promptDefinitionsAndSubgroups)

  Constructor that takes a group name and list of PromptDefinitions and PromptGroups.

Method Detail

### getChoiceDefinition

    public PromptDefinitionInterface getChoiceDefinition()

  Returns the prompt which is associated with the value of the ModalGroup. Since the ModalGroup essentially has a value but is not a prompt, a ModalGroupDefinition is created to be associated with the value.

  Specified by:
    `getChoiceDefinition` in interface `com.sas.prompts.groups.ModalGroupInterface`
  Returns:
    the prompt which is associated with the value of the ModalGroup

### setPromptGroupLabel

    public void setPromptGroupLabel(java.lang.String newLabel,
                                    java.util.Locale locale)

  Sets the label for the group in the specified locale.

  Specified by:
    `setPromptGroupLabel` in interface `com.sas.prompts.groups.ModalGroupInterface`
  Specified by:
    `setPromptGroupLabel` in interface `PromptGroupInterface`
  Overrides:
    `setPromptGroupLabel` in class `PromptGroup`
  Parameters:
    `newLabel` - The label for the group for the given locale
    `locale` - The locale to use the label with
  See Also:
    `PromptGroupInterface.setPromptGroupLabel(String, Locale)`

### setPromptGroupDescription

    public void setPromptGroupDescription(java.lang.String newDesc,
                                          java.util.Locale locale)

  Sets the description for the group in the specified locale.

  Specified by:
    `setPromptGroupDescription` in interface `com.sas.prompts.groups.ModalGroupInterface`
  Specified by:
    `setPromptGroupDescription` in interface `PromptGroupInterface`
  Overrides:
    `setPromptGroupDescription` in class `PromptGroup`
  Parameters:
    `newDesc` - The description for the group for the given locale
    `locale` - The locale to use the description with
  See Also:
    `PromptGroupInterface.setPromptGroupDescription(String, Locale)`

### addPromptSubgroup

    public void addPromptSubgroup(PromptGroupInterface promptSubgroup)

  Adds a subgroup to this prompt group. The subgroup must be a ModalChoiceGroup.

  Specified by:
    `addPromptSubgroup` in interface `PromptGroupInterface`
  Overrides:
    `addPromptSubgroup` in class `TransparentGroup`
  Parameters:
    `promptSubgroup` - The group to add as a child. This may not be null.
  See Also:
    `PromptGroupInterface.addPromptSubgroup(PromptGroupInterface)`

### addPromptSubgroup

    public void addPromptSubgroup(PromptGroupInterface promptSubgroup,
                                  int index)

  Adds a subgroup to this prompt group. The subgroup must be a ModalChoiceGroup.

  Specified by:
    `addPromptSubgroup` in interface `PromptGroupInterface`
  Overrides:
    `addPromptSubgroup` in class `TransparentGroup`
  Parameters:
    `promptSubgroup` - PromptGroupInterface The group to add as a child. This may not be null.
    `index` - int
  See Also:
    `PromptGroupInterface.addPromptSubgroup(PromptGroupInterface, int)`

### addPromptDefinition

    public void addPromptDefinition(PromptDefinitionInterface promptDefinition,
                                    int index)

  Description copied from class: `PromptGroup`
  Adds a group to the group at the specified index.

  Specified by:
    `addPromptDefinition` in interface `PromptGroupInterface`
  Overrides:
    `addPromptDefinition` in class `PromptGroup`
  Parameters:
    `promptDefinition` - The prompt to add
    `index` - The index to insert the prompt at
  See Also:
    `PromptGroupInterface.addPromptDefinition(PromptDefinitionInterface, int)`

### addPromptDefinition

    public void addPromptDefinition(PromptDefinitionInterface promptDefinition)

  Adds the specified prompt to the group. The prompt must be a ModalGroupDefinition.

  Specified by:
    `addPromptDefinition` in interface `PromptGroupInterface`
  Overrides:
    `addPromptDefinition` in class `PromptGroup`
  Parameters:
    `promptDefinition` - The ModalGroupDefinition to add to the group
  See Also:
    `PromptGroupInterface.addPromptDefinition(PromptDefinitionInterface)`

### addPromptDefinitions

    public void addPromptDefinitions(java.util.List promptDefinitions)

  Throws an IllegalArgumentException since ModalGroups can only contain subgroups, not prompts.

  Specified by:
    `addPromptDefinitions` in interface `PromptGroupInterface`
  Overrides:
    `addPromptDefinitions` in class `PromptGroup`
  Parameters:
    `promptDefinitions` - This parameter is not used
  See Also:
    `PromptGroupInterface.addPromptDefinitions(List)`

### getModalChoiceGroupForValue

    public com.sas.prompts.groups.ModalChoiceGroupInterface getModalChoiceGroupForValue(java.lang.Object value)

  Returns the contained ModalChoiceGroup whose value matches the passed in value.

  Specified by:
    `getModalChoiceGroupForValue` in interface `com.sas.prompts.groups.ModalGroupInterface`
  Parameters:
    `value` - The value to match
  Returns:
    The contained ModalChoiceGroup or null

### copy

    public PromptGroupInterface copy(PromptGroupInterface newGroup)

  Description copied from class: `PromptGroup`
  Returns a copy of this PromptGroup. Subclasses should override this and provide appropriate logic which calls super with their new instance of the PromptGroupInterface. This method does not copy subgroups or prompt definitions to the new group. If `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)`;

  Specified by:
    `copy` in interface `PromptGroupInterface`
  Overrides:
    `copy` in class `TransparentGroup`
  Parameters:
    `newGroup` - PromptGroupInterface
  Returns:
    PromptGroupInterface
  See Also:
    `PromptGroupInterface.copy(PromptGroupInterface)`

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.