| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mindtree.techworks.insight.preferences.model.PreferenceAttribute
com.mindtree.techworks.insight.preferences.model.ListPreferenceAttribute
public class ListPreferenceAttribute
This is a specialization of PreferenceAttribute, where all the possible values are added as a list.
PreferenceAttribute, 
Serialized Form| Constructor Summary | |
|---|---|
ListPreferenceAttribute(java.lang.String id,
                        java.lang.String value,
                        boolean isEncrypted,
                        boolean isPersistant,
                        boolean isUserModifiable,
                        Preference parent)
 | 
|
ListPreferenceAttribute(java.lang.String id,
                        java.lang.String value,
                        boolean isEncrypted,
                        boolean isPersistant,
                        boolean isUserModifiable,
                        Preference parent,
                        java.util.List inOptions)
 | 
|
| Method Summary | |
|---|---|
 void | 
addOption(java.lang.String option)
Adds an option to the list.  | 
 java.lang.String | 
getOption(int location)
Returns the option from the list at the required position.  | 
 int | 
getOptionsCount()
Returns the number of options.  | 
 java.util.Iterator | 
iterateOptions()
Returns an iterator for the options.  | 
 void | 
setValue(java.lang.String value)
Checks to see if the value is permitted before setting it.  | 
| Methods inherited from class com.mindtree.techworks.insight.preferences.model.PreferenceAttribute | 
|---|
getDefaultValue, getId, getName, getParent, getType, getValue, isEncrypted, isPersistant, isUserModifiable, setDefaultValue, setEncrypted, setName | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public ListPreferenceAttribute(java.lang.String id,
                               java.lang.String value,
                               boolean isEncrypted,
                               boolean isPersistant,
                               boolean isUserModifiable,
                               Preference parent)
id - The id of the preference attributevalue - The value associated with the preference attributeisPersistant - Whether the value will be saved to the storeisUserModifiable - Is the preference modifiableparent - The parent Preference of this attributePreferenceAttribtue
public ListPreferenceAttribute(java.lang.String id,
                               java.lang.String value,
                               boolean isEncrypted,
                               boolean isPersistant,
                               boolean isUserModifiable,
                               Preference parent,
                               java.util.List inOptions)
id - The id of the preference attributevalue - The value associated with the preference attributeisPersistant - Whether the value will be saved to the storeisUserModifiable - Is the preference modifiableparent - The parent Preference of this attributeinOptions - The list of options| Method Detail | 
|---|
public void addOption(java.lang.String option)
option - Option to add to the list.public int getOptionsCount()
public java.lang.String getOption(int location)
location - Location
java.lang.ArrayIndexOutOfBoundsException - if the location is not present in
             the listpublic java.util.Iterator iterateOptions()
public void setValue(java.lang.String value)
setValue in class PreferenceAttributevalue - The value to set.
java.lang.ArrayIndexOutOfBoundsException - if the value is not in the optionsPreferenceAttribute.setValue(java.lang.String)
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||