CheckboxChoice

The CheckboxChoice is used to select one of multiple choices as an answer to a question. Answers are user-defined and the corresponding labels shown to the subject can be set.

Here is an example of a checkbox choice with three choices:

[image of a CheckboxChoice]

Here is a list of parameters available for a checkbox choice:

Parameter Value Description R/O
class guinea.ui.CheckboxChoice Java class name of checkbox choice Req.
question text The question shown to subject. Req.
questionfont font name The font used for question text. Opt.
answers list of answers The answers sent by the answer component when the corresponding label is selected. The list is a comma separated list of answers (strings only currently). Req.
labels list of labels The choices (labels) shown to the subject. The subject selects one of the choices and the corresponding answer is sent. The list is a comma separated list of strings that are shown as labels. Opt.

Question

The question parameter is used to set the question that is shown to the subject. Example:
   # Set question text
   q5.question=Which sample sounds best?

Question font

The font used to display the text of question can be set with the questionfont parameter. It takes a valid Java font specification as a value. For example:
   # The font of the question
   q5.questionfont=Serif-italic-24
You can use the FontTester tool help you select the fonts you want. See also the API of the Java's Font class.

Answers and labels

The answers list defines the answers are sent by the answer component, the labels list defines the labels that are shown to the subject. Both are comma-separated lists of strings. Example:
   # Set answers (labels are same as answers)
   q5.answers=A,B,C
This sets the answers and labels as shown in the window example above. If no labels are specified, the answers will be used as labels also. In this case it acts the same as this:
   # Set answers and corresponding labels
   q5.answers=A,B,C
   q5.labels=A,B,C
Labels are used for displaying the selections to the subject. Example:
   # Set answers and corresponding labels
   q5.answers=A,B,C
   q5.labels=First,Second,Third
the labels shown are 'First', 'Second' and 'Third' instead of 'A', 'B' and 'C'. Then the subjects selects 'Second', 'B' will sent to the test system as the answer.
· UI index · Document index ·

Last modified: Thu Dec 9 19:10:29 EET 1999