|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.interview.PropertiesQuestion.ValueConstraints
com.sun.interview.PropertiesQuestion.StringConstraints
public static class PropertiesQuestion.StringConstraints
Value restrictions for string type responses.
| Field Summary | |
|---|---|
protected boolean |
custom
|
protected int |
nominalMaxLength
The nominal maximum length for the string. |
protected java.lang.String[] |
suggestions
Current value set for the suggested response values. |
| Constructor Summary | |
|---|---|
PropertiesQuestion.StringConstraints()
|
|
PropertiesQuestion.StringConstraints(int maxLen)
Construct with max string length restriction. |
|
PropertiesQuestion.StringConstraints(java.lang.String[] suggestions)
|
|
PropertiesQuestion.StringConstraints(java.lang.String[] suggestions,
int maxLen)
Construct with max string length restriction and suggested responses. |
|
| Method Summary | |
|---|---|
int |
getNominalMaxLength()
Get the nominal maximum length for the string. |
java.lang.String[] |
getSuggestions()
Determine what the current value suggestions are. |
boolean |
isCustomValuesAllowed()
Can the user provide whatever string answer they wish, or must they choose only from the suggested values. |
void |
setCustomValuesAllowed(boolean state)
Are user specified values allowed? If not, there must be suggestions present. |
void |
setNominalMaxLength(int nominalMaxLength)
Set the expected maximum length for the string. |
void |
setSuggestions(java.lang.String[] sugs)
Supply some possible values that the user may want to select from. |
| Methods inherited from class com.sun.interview.PropertiesQuestion.ValueConstraints |
|---|
isReadOnly, isUnsetAllowed, isValid, isVisible, setReadOnly, setUnsetAllowed, setVisible |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String[] suggestions
setSuggestions(String[]),
getSuggestions()protected boolean custom
protected int nominalMaxLength
| Constructor Detail |
|---|
public PropertiesQuestion.StringConstraints()
public PropertiesQuestion.StringConstraints(java.lang.String[] suggestions)
public PropertiesQuestion.StringConstraints(int maxLen)
maxLen - Maximum length string for the response.
public PropertiesQuestion.StringConstraints(java.lang.String[] suggestions,
int maxLen)
maxLen - Maximum length string for the response.suggestions - The suggested responses to present the user with.
Should be an array of greater than zero length.| Method Detail |
|---|
public void setSuggestions(java.lang.String[] sugs)
sugs - The suggested responses to present the user with.
Should be an array of greater than zero length. Can be null if
you wish to remove the setting completely.isCustomValuesAllowed(),
getSuggestions()public java.lang.String[] getSuggestions()
public void setCustomValuesAllowed(boolean state)
java.lang.IllegalStateException - If no suggestions have been
provided.setSuggestions(java.lang.String[])public boolean isCustomValuesAllowed()
setCustomValuesAllowed(boolean),
setSuggestions(java.lang.String[])public int getNominalMaxLength()
setNominalMaxLength(int)public void setNominalMaxLength(int nominalMaxLength)
nominalMaxLength - the nominal maximum length for the string.getNominalMaxLength()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||