<CHOICE> : Input Field of Choice Type

Java class : leon.view.LyChoice

ROLE

An input field of Choice type allows displaying a graphical component containing a set of check boxes.
It allows choosing one or more values among a discrete list of values.
It is possible to specify whether the choice is multiple or not and whether the boxes should be arranged horizontally or vertically.

ATTRIBUTES

<!ATTLIST CHOICE
	  id NMTOKEN #IMPLIED
	  template NMTOKEN #IMPLIED
	  multiple ( true | false) "false"
	  fill ( HORIZONTAL | VERTICAL) "HORIZONTAL"
	  maxSpan NMTOKEN #IMPLIED
	  bean CDATA #IMPLIED
	  font CDATA #IMPLIED
	  color CDATA #IMPLIED
	  fontColor CDATA #IMPLIED
	  nCols NMTOKEN #IMPLIED
	  nRows NMTOKEN #IMPLIED>
Attribute Mand. Description Default
id no CHOICE.id  
template no CHOICE.template  
multiple no Indicates whether the choice is multiple or not. false
fill no Indicates whether the boxes should be arranged horizontally or vertically. HORIZONTAL
maxSpan no Indicates the maximum number of boxes on the same line (case of an horizontal alignment) or on the same column (case of a vertical alignment). -1
bean no Allows specifying the name of a Java class that replaces the default graphical component.  
font no CHOICE.font  
color no CHOICE.color  
fontColor no CHOICE.fontColor  
nCols no Gives the number of columns of the choice (given in number of characters). -1
nRows no Gives the number of lines on which the options are shown. -1

ELEMENTS

<!ELEMENT CHOICE 
	  (OPTION*)>
Element Mand. Mult. Description
OPTION no yes List of the options offered for this choice

SAMPLE

<!-- Non-multiple choice containing 4 radio buttons
(the first one being disabled and the third being selected -->
<CHOICE maxSpan="5" multiple="false">
	<OPTION id="sev.0" label="blocking" enabled="false"/>
	<OPTION id="sev.1" label="major"/>
	<OPTION id="sev.2" label="medium" checked="true"/>
	<OPTION id="sev.3" label="minor"/>
</CHOICE>

<!-- Multiple choice containing 4 radio buttons
(the first one being disabled, and the second and fourth one being selected -->
<CHOICE maxSpan="5" multiple="true">
	<OPTION id="sev.0" label="blocking" enabled="false"/>
	<OPTION id="sev.1" label="major" checked="true"/>
	<OPTION id="sev.2" label="medium"/>
	<OPTION id="sev.3" label="minor" checked="true"/>
</CHOICE>