|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.interview.Question
com.sun.interview.StringQuestion
public abstract class StringQuestion
A question to which the response is a string.
| Field Summary | |
|---|---|
protected int |
nominalMaxLength
The nominal maximum length for the string. |
protected java.lang.String[] |
suggestions
Suggested values for this question. |
protected java.lang.String |
value
The current response for this question. |
| Fields inherited from class com.sun.interview.Question |
|---|
interview, key, tag |
| Constructor Summary | |
|---|---|
protected |
StringQuestion(Interview interview,
java.lang.String tag)
Create a question with a nominated tag. |
| Method Summary | |
|---|---|
void |
clear()
Clear any response to this question, resetting the value back to its initial state. |
protected static boolean |
equal(java.lang.String s1,
java.lang.String s2)
Compare two strings for equality. |
java.lang.String |
getDefaultValue()
Get the default response for this question. |
int |
getNominalMaxLength()
Get the nominal maximum length for the string. |
java.lang.String |
getStringValue()
Get the response to this question as a string. |
java.lang.String[] |
getSuggestions()
Get the suggested responses to this question, or null if none. |
java.lang.String |
getValue()
Get the current (default or latest) response to this question. |
java.lang.String |
getValueOnPath()
Verify this question is on the current path, and if it is, return the current value. |
boolean |
isValueAlwaysValid()
Check if the question always has a valid response. |
boolean |
isValueValid()
Check if the question currently has a valid response. |
protected void |
load(java.util.Map data)
Load the value for this question from a dictionary, using the tag as the key. |
protected void |
save(java.util.Map data)
Save the value for this question in a dictionary, using the tag as the key. |
void |
setDefaultValue(java.lang.String v)
Set the default response for this question, used by the clear method. |
void |
setNominalMaxLength(int nominalMaxLength)
Set the expected maximum length for the string. |
void |
setSuggestions(java.lang.String[] newSuggestions)
Set the set of suggested responses. |
void |
setValue(java.lang.String newValue)
Set the current value. |
| Methods inherited from class com.sun.interview.Question |
|---|
addMarker, equals, export, getChecklistItems, getHelpID, getImage, getInterview, getKey, getNext, getResourceString, getResourceString, getSummary, getTag, getText, getTextArgs, hashCode, hasMarker, isEnabled, isHidden, reload, removeMarker, setImage, setImage, setSummary, setText |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String value
protected java.lang.String[] suggestions
protected int nominalMaxLength
| Constructor Detail |
|---|
protected StringQuestion(Interview interview,
java.lang.String tag)
interview - The interview containing this question.tag - A unique tag to identify this specific question.| Method Detail |
|---|
public java.lang.String getDefaultValue()
setDefaultValue(java.lang.String)public void setDefaultValue(java.lang.String v)
v - the default response for this question.getDefaultValue()public java.lang.String getValue()
setValue(java.lang.String)
public java.lang.String getValueOnPath()
throws Interview.NotOnPathFault
Interview.NotOnPathFault - if this question is not on the
current pathgetValue()public java.lang.String getStringValue()
Question
getStringValue in class QuestionQuestion.setValue(String)public boolean isValueValid()
Question
isValueValid in class Questionpublic boolean isValueAlwaysValid()
Question
isValueAlwaysValid in class Questionpublic int getNominalMaxLength()
setNominalMaxLength(int)public void setNominalMaxLength(int nominalMaxLength)
nominalMaxLength - the nominal maximum length for the string.getNominalMaxLength()public java.lang.String[] getSuggestions()
setSuggestions(java.lang.String[])public void setSuggestions(java.lang.String[] newSuggestions)
newSuggestions - The values to be set, or null if none
java.lang.IllegalArgumentException - if any of the values in the array
are nullgetSuggestions()public void setValue(java.lang.String newValue)
setValue in class QuestionnewValue - The value to be set.getValue()public void clear()
clear in class Questionprotected void load(java.util.Map data)
load in class Questiondata - The map from which to load the value for this question.protected void save(java.util.Map data)
save in class Questiondata - The map in which to save the value for this question.
protected static boolean equal(java.lang.String s1,
java.lang.String s2)
s1 - the first string to be compared, or nulls2 - the other string to be compared, or null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||