<TABLE> : Table

Java class : leon.view.LyTable

ROLE

A table allows displaying a set of rows and columns containing a set of cells.
It can contain a header providing information about the content of the cells of the table.
It is possible to define its selection modes (simple, extended, multiple or none) and finally to indicate if horizontal and/or vertical separation lines should be drawn.

ATTRIBUTES

<!ATTLIST TABLE
	  id NMTOKEN #REQUIRED
	  template NMTOKEN #IMPLIED
	  label CDATA #IMPLIED
	  controller CDATA #IMPLIED
	  selectionMode ( NONE | SINGLE | MULTIPLE | SINGLE_CHECKBOX | MULTIPLE_CHECKBOX) "MULTIPLE"
	  hLines ( true | false) "false"
	  vLines ( true | false) "false"
	  isContext ( true | false) "false"
	  enabled ( true | false) "true"
	  nRows NMTOKEN #IMPLIED
	  font CDATA #IMPLIED
	  color CDATA #IMPLIED
	  fontColor CDATA #IMPLIED
	  gridColor CDATA #IMPLIED
	  selectedColor CDATA #IMPLIED
	  selectedFontColor CDATA #IMPLIED
	  tooltip CDATA #IMPLIED>
Attribute Mand. Description Default
id yes Identifier of the table.  
template no TABLE.template  
label no Label of the table  
controller no Reference of the controller that manages the table (i.e. handles user demands and refresh content).  
selectionMode no Selection mode of the elements of the table.
The elements that can be selected are defined by the type of selection (ROW, COLUMN, CELL). The following modes are managed:
NONE: No selection is possible
SINGLE: Selection of only one element at a time
MULTIPLE: Selection of several elements at a time
SINGLE_CHECKBOX: Selection of only one element at a time with a checkbox
MULTIPLE_CHECKBOX: Selection of several elements at a time with a checkbox
MULTIPLE
hLines no Indicates if horizontal separation lines should be drawn. false
vLines no Indicates if vertical separation lines should be drawn false
isContext no Indicates if the table is the context of another element. false
enabled no Indicates whether the table is enabled or not. true
nRows no Gives the number of lines on which the table is presented. -1
font no TABLE.font  
color no TABLE.color  
fontColor no TABLE.fontColor  
gridColor no Color used to draw the table grid.  
selectedColor no Color used to display selected rows.  
selectedFontColor no Font color of the selected rows.  
tooltip no Text of the tooltip for the table.  

ELEMENTS

<!ELEMENT TABLE 
	  (HEADERS?,
	   ROWS?,
	   FOOTERS?,
	   CONSTRAINT?,
	   DATA*)>
Element Mand. Mult. Description
HEADERS no no Header of the table.
ROWS no no Lines of the table.
FOOTERS no no Footer of the table.
CONSTRAINT no no Positioning constraint of the table.
DATA no yes TABLE.DATA

SAMPLE

<!-- Users list -->
<TABLE id='_table'>
	<!-- Header providing the headings of the columns
	(identifier, name, age, type, phone number, mail, date of the last use) -->
	<HEADERS>
		<!-- A sorting in ascending order is made on the first column -->
		<HEADER id='usr_ide' label='ATTR_USR_IDE' sort='0'
				increasing='true'/>
		<HEADER id='usr_name' label='ATTR_USR_NOM'/>
		<HEADER id='usr_age' label='ATTR_USR_AGE'/>
		<HEADER id='usr_typ' label='ATTR_USR_TYP'/>
		<HEADER id='usr_tel' label='ATTR_USR_TEL'/>
		<HEADER id='usr_ema' label='ATTR_USR_EMA'/>
	</HEADERS>
	<!-- Rows of the list (one row per user) -->
	<ROWS>
		<ROW id='usr_cls\admin'>
			<CELL label='admin'/>
			<CELL label='Administrator'/>
			<CELL/>
			<CELL label='administrator'/>
			<CELL label='01 02 03 04 05'/>
			<CELL label='admin@mydomain.com'/>
		</ROW>
		<ROW id='usr_cls\jdu'>
			<CELL label='jdu'/>
			<CELL label='Jean Dupont'/>
			<CELL label='28'/>
			<CELL label='user'/>
			<CELL label='01 02 03 04 06'/>
			<CELL label='jean.dupont@mydomain.com'/>
		</ROW>
		<ROW id='usr_cls\ime'>
			<CELL label='ime'/>
			<CELL label='Isidore MEDARD'/>
			<CELL label='24'/>
			<CELL label='user'/>
			<CELL label='01 02 03 04 07'/>
			<CELL/>
			<CELL/>
		</ROW>
	</ROWS>
</TABLE>