| Modifier and Type | Field and Description |
|---|---|
protected int[] |
suggestions
Suggested values for this question.
|
protected int |
value
The current response for this question.
|
| Modifier | Constructor and Description |
|---|---|
protected |
IntQuestion(Interview interview,
java.lang.String tag)
Create a question with a nominated tag.
|
protected |
IntQuestion(Interview interview,
java.lang.String tag,
int min,
int max)
Create a question with a nominated tag.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear any response to this question, resetting the value
back to its initial state.
|
int |
getDefaultValue()
Get the default response for this question.
|
int |
getLabelIncrementHint()
Get a hint for the rendering system for the increment between
labels.
|
int |
getLabelStartHint()
Get a hint for the rendering system for the lowest value
that might be labelled.
|
int |
getLowerBound()
Get the inclusive lower bound for responses to this question.
|
java.lang.String |
getStringValue()
Get the response to this question as a string.
|
int[] |
getSuggestions()
Get the suggested responses to this question, or null if none.
|
int |
getUpperBound()
Get the inclusive upper bound for responses to this question.
|
int |
getValue()
Get the current (default or latest) response to this question.
|
int |
getValueOnPath()
Verify this question is on the current path, and if it is,
return the current value.
|
boolean |
isValid()
Deprecated.
see #isValueValid
|
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.
|
protected void |
setBounds(int min,
int max)
Set the bounds for the response to this question.
|
void |
setDefaultValue(int v)
Set the default response for this question,
used by the clear method.
|
protected void |
setLabelHints(int start,
int increment)
Set hints for the rendering system for the values that might
be labelled.
|
void |
setSuggestions(int[] newSuggestions)
Set the set of suggested responses.
|
void |
setValue(int newValue)
Set the current value.
|
void |
setValue(java.lang.String s)
Set the response to this question to the value represented by
a string-valued argument.
|
void |
setValue(java.lang.String s,
java.util.Locale l)
Set the response to this question to the value represented by
a string-valued argument, given in certain locale.
|
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, setTextprotected int value
protected int[] suggestions
protected IntQuestion(Interview interview, java.lang.String tag)
interview - The interview containing this question.tag - A unique tag to identify this specific question.protected IntQuestion(Interview interview, java.lang.String tag, int min, int max)
interview - The interview containing this question.tag - A unique tag to identify this specific question.min - The inclusive lower bound for responses to this questionmax - The inclusive upper bound for responses to this questionjava.lang.IllegalArgumentException - if min is greater than
or equal to max.protected void setBounds(int min,
int max)
min - The inclusive lower bound for responses to this questionmax - The inclusive upper bound for responses to this questionjava.lang.IllegalArgumentException - if min is greater than
or equal to max.public int getLowerBound()
public int getUpperBound()
public int[] getSuggestions()
setSuggestions(int[])public void setSuggestions(int[] newSuggestions)
newSuggestions - The values to be set, or null if nonegetSuggestions()public int getDefaultValue()
setDefaultValue(int)public void setDefaultValue(int v)
v - the default response for this question.getDefaultValue()public boolean isValid()
Integer.MIN_VALUE.clear()public int getValue()
Integer.MIN_VALUE.isValid(),
setValue(java.lang.String)public int getValueOnPath()
throws Interview.NotOnPathFault
Interview.NotOnPathFault - if this question is not on the
current pathgetValue()public java.lang.String getStringValue()
QuestiongetStringValue in class QuestionQuestion.setValue(String)public void setValue(java.lang.String s)
throws Interview.Fault
setValue in class Questions - A string containing the numeric value to be set.
The number should be in the range of valid values defined for
this question; if it is not, the value will be retained,
but isValueValid() will return false.Interview.Fault - This exception is just retained for backwards
compatibility; it should never actually be thrown.getValue(),
setValue(String, Locale)public void setValue(java.lang.String s,
java.util.Locale l)
throws Interview.Fault
s - A string containing the numeric value to be set.
The number should be in the range of valid values defined for
this question; if it is not, the value will be retained,
but isValueValid() will return false.l - A locale that should be used to decode numeric value
from given string parameterInterview.Fault - This exception is just retained for backwards
compatibility; it should never actually be thrown.getValue(),
setValue(String)public void setValue(int newValue)
newValue - The value to be set. It should be in the range
of valid values defined for this question.getValue()public boolean isValueValid()
QuestionisValueValid in class Questionpublic boolean isValueAlwaysValid()
QuestionisValueAlwaysValid in class Questionprotected void setLabelHints(int start,
int increment)
start - The lowest value to be labelledincrement - The increment for successive labelspublic int getLabelStartHint()
public int getLabelIncrementHint()
public void clear()
protected void load(java.util.Map data)
Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.