Modifier and Type | Class and Description |
---|---|
static interface |
TreeQuestion.Model
An interface that provides the model for the tree whose nodes
are selected by a TreeQuestion.
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
value
The current response for this question.
|
Modifier | Constructor and Description |
---|---|
protected |
TreeQuestion(Interview interview,
java.lang.String tag,
TreeQuestion.Model model)
Create a tree question with a nominated tag and tree model.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear any response to this question, resetting the value
back to its initial state.
|
java.lang.String[] |
getDefaultValue()
Get the default response for this question.
|
TreeQuestion.Model |
getModel()
Get the tree model to which the question's path values relate.
|
java.lang.String |
getStringValue()
Get the response to this question as a string.
|
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.
|
static java.lang.String |
join(java.lang.String[] paths) |
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 |
setValue(java.lang.Object[] nodes)
Set the current response to this question.
|
void |
setValue(java.lang.String newValue)
Set the response to this question to the value represented by
a string-valued argument.
|
void |
setValue(java.lang.String[] newValue)
Set the current response to this question.
|
static java.lang.String[] |
split(java.lang.String s) |
static boolean |
white(char c) |
addMarker, equals, export, getChecklistItems, getHelpID, getImage, getInterview, getKey, getNext, getResourceString, getResourceString, getSummary, getTag, getText, getTextArgs, hashCode, hasMarker, isEnabled, isHidden, reload, removeMarker, setHelpID, setImage, setImage, setSummary, setText
protected TreeQuestion(Interview interview, java.lang.String tag, TreeQuestion.Model model)
interview
- The interview containing this question.tag
- A unique tag to identify this specific question.model
- The tree model to which the question's path values relate.public TreeQuestion.Model getModel()
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 void setValue(java.lang.String newValue)
Question
setValue
in class Question
newValue
- A string containing a value value appropriate for the
particular type of question whose value is being set.Question.getStringValue()
public void setValue(java.lang.String[] newValue)
newValue
- a set of strings (or null if none), representing
paths to nodes within the tree represented by the tree modelgetValue()
public void setValue(java.lang.Object[] nodes)
nodes
- a set of nodes (or null if none) within
the tree represented by the tree model, whose paths will
be set as the current response to the questiongetValue()
public java.lang.String getStringValue()
Question
getStringValue
in class Question
Question.setValue(String)
public boolean isValueValid()
Question
isValueValid
in class Question
public boolean isValueAlwaysValid()
Question
isValueAlwaysValid
in class Question
public void clear()
protected void load(java.util.Map data)
protected void save(java.util.Map data)
public static java.lang.String[] split(java.lang.String s)
public static java.lang.String join(java.lang.String[] paths)
public static boolean white(char c)
Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.