com.sun.interview
Class YesNoQuestion
java.lang.Object
com.sun.interview.Question
com.sun.interview.ChoiceQuestion
com.sun.interview.YesNoQuestion
public abstract class YesNoQuestion
- extends ChoiceQuestion
A question
to which the response is yes or no.
Field Summary |
static java.lang.String |
NO
A value for a negative response. |
static java.lang.String |
YES
A value for an affirmative response. |
Constructor Summary |
protected |
YesNoQuestion(Interview interview,
java.lang.String tag)
Create a question with a nominated tag. |
protected |
YesNoQuestion(Interview interview,
java.lang.String tag,
java.lang.String defaultValue)
Create a question with a nominated tag. |
Method Summary |
protected void |
setChoices(java.lang.String[] choices)
Set the set of legal responses for this question. |
Methods inherited from class com.sun.interview.ChoiceQuestion |
clear, getChoices, getDefaultValue, getDisplayChoices, getDisplayValue, getStringValue, getValue, getValueOnPath, isValueAlwaysValid, isValueValid, load, save, setChoices, setChoices, setDefaultValue, setI18NChoices, setValue |
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 |
YES
public static final java.lang.String YES
- A value for an affirmative response.
- See Also:
- Constant Field Values
NO
public static final java.lang.String NO
- A value for a negative response.
- See Also:
- Constant Field Values
YesNoQuestion
protected YesNoQuestion(Interview interview,
java.lang.String tag)
- Create a question with a nominated tag.
If this constructor is used, the choices must be supplied separately.
- Parameters:
interview
- The interview containing this question.tag
- A unique tag to identify this specific question.
YesNoQuestion
protected YesNoQuestion(Interview interview,
java.lang.String tag,
java.lang.String defaultValue)
- Create a question with a nominated tag.
If this constructor is used, the choices must be supplied separately.
- Parameters:
interview
- The interview containing this question.tag
- A unique tag to identify this specific question.defaultValue
- A default value for the question; this must be one of
null, YES, or NO.
setChoices
protected final void setChoices(java.lang.String[] choices)
- Set the set of legal responses for this question. This is
not permitted, since the choices are fixed as YES and NO.
- Overrides:
setChoices
in class ChoiceQuestion
- Parameters:
choices
- The set possible responses for this question.
- Throws:
java.lang.IllegalArgumentException
- always.- See Also:
ChoiceQuestion.getChoices()
,
ChoiceQuestion.setChoices(String[], boolean)
,
ChoiceQuestion.setChoices(String[], String[])
Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.