All Packages Class Hierarchy This Package Previous Next Index
Class guinea.ui.CheckboxChoice
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----guinea.ui.CheckboxChoice
- public class CheckboxChoice
- extends Panel
- implements QuestionInterface, ItemListener, PropertyLoader
Constructor Index
- ·
CheckboxChoice()
- Construct a new CheckboxChoice with no choices.
- ·
CheckboxChoice(Object[])
- Construct a new CheckboxChoice with given answers.
- ·
CheckboxChoice(Object[], String[])
- Construct a new CheckboxChoice with given answers and corresponding
labels.
Method Index
- ·
addAnswerListener(AnswerListener)
- Add a listener that is interested to receive answer events.
- ·
getAnswer()
- Get answer for question.
- ·
getQuestion()
- Get the text of the question.
- ·
getQuestionID()
- Get the ID of the question.
- ·
isAnswered()
- See if an aswer has been given.
- ·
isQuestionEnabled()
- Test whether question is enabled or disabled.
- ·
itemStateChanged(ItemEvent)
-
- ·
propertyLoad(Properties, String)
-
- ·
removeAnswerListener(AnswerListener)
- Removes the specified listener so it no longer receives value change
events from this component.
- ·
reset()
- Reset question to default answer and/or to unanswered state.
- ·
setAnswer(Object)
- Set answer of question.
- ·
setChoices(Object[])
- Set the choices for this answering component.
- ·
setChoices(Object[], String[])
- Set the answers and corresponding labels for this answering component.
- ·
setQuestion(String)
- Set the text of the question.
- ·
setQuestionEnabled(boolean)
- Enable or disable question component.
- ·
setQuestionID(String)
- Set the ID of this question.
Constructors
·
CheckboxChoice
public CheckboxChoice()
- Construct a new CheckboxChoice with no choices.
·
CheckboxChoice
public CheckboxChoice(Object answers[])
- Construct a new CheckboxChoice with given answers. Corresponding
labels are generated by calling the toString() method
of the corresponding answer.
- Parameters:
- answers - an array of answers.
·
CheckboxChoice
public CheckboxChoice(Object answers[],
String labels[])
- Construct a new CheckboxChoice with given answers and corresponding
labels.
- Parameters:
- answers - an array of answers.
- labels - an array of labels that are shown to the subject.
Methods
·
setChoices
public void setChoices(Object answers[])
- Set the choices for this answering component. Corresponding
labels are generated by calling the toString() method
of the corresponding answer.
- Parameters:
- answers - an array of answers.
·
setChoices
public synchronized void setChoices(Object answers[],
String labels[])
- Set the answers and corresponding labels for this answering component.
- Parameters:
- answers - an array of answers.
- labels - an array of labels that are shown to the subject.
·
itemStateChanged
public void itemStateChanged(ItemEvent e)
·
setQuestionEnabled
public void setQuestionEnabled(boolean enabled)
- Enable or disable question component.
- Parameters:
- enabled - Use
true
to enable,
false
to disable the question.
·
isQuestionEnabled
public boolean isQuestionEnabled()
- Test whether question is enabled or disabled.
- Returns:
-
true
if question is enabled,
false
if not.
·
getAnswer
public Object getAnswer()
- Get answer for question.
·
setAnswer
public synchronized void setAnswer(Object answer)
- Set answer of question.
·
reset
public void reset()
- Reset question to default answer and/or to unanswered state.
·
isAnswered
public boolean isAnswered()
- See if an aswer has been given.
- Returns:
- true if user has given an answer.
·
setQuestion
public void setQuestion(String question)
- Set the text of the question.
- Parameters:
- question - text of the question.
·
getQuestion
public String getQuestion()
- Get the text of the question.
- Returns:
- text of the question.
·
setQuestionID
public void setQuestionID(String id)
- Set the ID of this question.
- Parameters:
- id - ID label of question.
·
getQuestionID
public String getQuestionID()
- Get the ID of the question.
- Returns:
- ID label of the question.
·
addAnswerListener
public synchronized void addAnswerListener(AnswerListener listener)
- Add a listener that is interested to receive answer events.
- Parameters:
- listener - A listener.
·
removeAnswerListener
public synchronized void removeAnswerListener(AnswerListener listener)
- Removes the specified listener so it no longer receives value change
events from this component.
- Parameters:
- listener - the listener
·
propertyLoad
public void propertyLoad(Properties p,
String name) throws IllegalArgumentException
All Packages Class Hierarchy This Package Previous Next Index