<NUMBER> : Number field

Java class : leon.info.LyNumberFieldInfo

ROLE

This element describes a numeric attribute. Several numeric types are supported: short integer, integer, long integer, float, double. Information about that kind of field could be completed by a format, a minimum value, a maximum value, an increment, a number of decimals, a unit and a default value.

ATTRIBUTES

<!ATTLIST NUMBER
	  id ID #REQUIRED
	  template IDREF #IMPLIED
	  javaName NMTOKEN #IMPLIED
	  type ( INT | SHORT | LONG | FLOAT | DOUBLE) "INT"
	  behavior NMTOKEN #IMPLIED
	  modulo ( true | false) "false">
Attribute Mand. Description Default
id yes Number field identifier.  
template no Reference to the number field used as pattern.  
javaName no Name of the Java attribute that corresponds to the current field when automatic code generation is used. The default value is the name of the current field.  
type no Type of the number field. Supported types are:
- INT: integer
- SHORT: short integer,
- LONG: long integer,
- FLOAT: real number,
- DOUBLE: real number with double accuracy.
The default value is INT.
INT
behavior no Name of the Java class representing the behavior of this field. Reserved for a future use.  
modulo no Indicates that the number is a modulo. The value of the modulo is the difference between the maximum value and the minimum value (max ? min). If the value is greater than max. value (resp. min. value) the modulo is removed (resp. added) until the value enters in the limits [min, max]. false

ELEMENTS

<!ELEMENT NUMBER 
	  (%FIELD_BEGIN;,
	   FORMAT?,
	   MIN?,
	   MAX?,
	   (UNITS | UNITS_REF)?,
	   UNIT_REF?,
	   PRECISION?,
	   N_DEFAULT?,
	   %FIELD_END;)>
Element Mand. Mult. Description
FIELD_BEGIN
yes no Begin of a field description.
FORMAT no no This is the date format. The syntax followed is the one specified by the java.text.NumberFormat class (see the standard Java API for JDK 1.1, 1.2, 1.3).
MIN no no This is the minimum value under which the user cannot perform a selection inside the graphical user interface. The value should be of the relevant type. The default minimum value is the minimum value supported by the corresponding Java type.
MAX no no This is the maximum value beyond which the user cannot perform a selection inside the graphical user interface. The value should be of the relevant type. The default maximum value is the maximum value supported by the corresponding Java type.
UNITS yes no Dictionary of units for this field.
UNITS_REF yes no Reference on a dictionary of units for this field.
UNIT_REF no no Reference of the default unit for this field. This unit must belong to the dictionary of units of the field.
PRECISION no no Precision used for comparisons between 2 values of this number. If the difference between the 2 values is lower than the precision, values are considered equivalents.
N_DEFAULT no no This is the default value. It should be of the relevant type
FIELD_END
yes no End of a field description.