<TEXT> : Input Field of Text Type

Java class : leon.view.LyText

ROLE

An input field of Text type allows displaying a graphical input or text consultation component.
It does not comprise any element.
It is possible to specify if the text should be hidden, if it should respect a given format, if it can be divided into several lines and the maximum number of characters that it can contain.

ATTRIBUTES

<!ATTLIST TEXT
	  id NMTOKEN #IMPLIED
	  template NMTOKEN #IMPLIED
	  label CDATA #IMPLIED
	  secret ( true | false) "false"
	  nCols NMTOKEN #IMPLIED
	  nRows NMTOKEN #IMPLIED
	  nChars NMTOKEN #IMPLIED
	  format CDATA #IMPLIED
	  editable ( true | false) "true"
	  wrap ( true | false) "true"
	  notifyValueChanged ( true | false) "false"
	  autoCompletionValues CDATA #IMPLIED
	  bean CDATA #IMPLIED
	  font CDATA #IMPLIED
	  enabledColor CDATA #IMPLIED
	  disabledColor CDATA #IMPLIED
	  fontColor CDATA #IMPLIED
	  textAlign ( LEFT | CENTER | RIGHT) "LEFT"
	  arrows ( true | false) "true"
	  arrowUp CDATA #IMPLIED
	  arrowDown CDATA #IMPLIED
	  type ( STANDARD | RICH) "STANDARD"
	  scroll ( TOP | BOTTOM) "TOP">
Attribute Mand. Description Default
id no TEXT.id  
template no TEXT.template  
label no Value displayed for the text.  
secret no Indicates whether the input field should be hidden or not.
If the text should be hidden, each character of the text is replaced by an asterisk (' * ').
false
nCols no Number of columns of the graphical component representing the input field. The expected value is a positive integer value.
A negative or null value lets the viewer free to choose the number of columns.
Any other value is equivalent to the null value. This field does not limit the input of the text.
Moreover, it can be overstepped when using constraints.
-1
nRows no Number of lines of the graphical component representing the input field. The expected value is a positive integer value.
A negative or null value lets the viewer free to choose the number of de lines.
Any other value is equivalent to the null value. This attribute does not limit the input of the text.
Moreover, it can be overstepped when using constraints.
-1
nChars no Maximum number of characters allowed for the text. The expected value is a positive integer value.
A negative or null value implies that there is no limitation.
Any other value is equivalent to the null value.
-1
format no Input format of the text. The expected format is a string containing fixed and numeric parts.
The numeric parts are defined by an interval of integer values.
They allow enabling only the input of numbers which values are comprised in the interval corresponding to their position. Example of format for an IP address, for which it is allowed to input 4 series of numbers comprised between 0 and 255, and delimited by dots: "[0-255].[0-255].[0-255].[0-255]".
 
editable no Indicates whether the text is editable or not. true
wrap no Indicates whether the text can be wrapped on several lines or if it should remain on a single line. The true value indicates that the text can be wrapped on several lines. true
notifyValueChanged no Indicates whether the modification of the text value must be notified or not (even before focus lost). The true value indicates that the modification of the text value must be notified. false
autoCompletionValues no List of values used for auto-completion. Values must be separated by LyTools.VALUE_SEP.  
bean no Allows specifying the name of a Java class that replaces the default graphical component.  
font no TEXT.font  
enabledColor no TEXT.enabledColor  
disabledColor no TEXT.disabledColor  
fontColor no TEXT.fontColor  
textAlign no Text alignment of the label of the component (left, right or centered). LEFT
arrows no Indicates if arrow buttons are displayed when text has a format. true
arrowUp no TEXT.arrowUp  
arrowDown no TEXT.arrowDown  
type no Indicates if a rich text editor must be used to edit this text (web viewer only) STANDARD
scroll no Indicates for a multiple text the initial position of vertical scrollbar (web viewer only). TOP

ELEMENTS

<!ELEMENT TEXT 
	  (CHARTYPE*)>
Element Mand. Mult. Description
CHARTYPE no yes Set of characters allowed in the text field.

SAMPLE

<!-- Text displayed over several lines (a comment for example) -->
<TEXT label="The expected result is to display the color 			
	corresponding to the harshness of the alarm"
	nCols="20" nRows="3" nChars="75"/>

<!-- Secret text (a password for example) -->
<TEXT label="rt4gh72" secret="true"/>