Recent Changes - Search:

Information

Installation

Documentation

ElementsDataTable

(Available in the IO Elements palette of the Interface group.)

A Data Table collects data row by row using the table's Input property. Every time the input row changes, the table adds another row. The table grows as the model evolves.

(:applet clickimg="DataTable.jpg" clickalt="" clickcaption="EJS Data Table example: a DataTable is used to display the values of the sine function. Download this example and unzip it in your source code directory." code="DataTableExample_pkg.DataTableExampleApplet.class" codebase="http://www.um.es/fem/EjsDL/Examples/Elements/Interface" archive="ejs_DataTableExample.jar" width="291" height="258" draggable="true" :)

Properties

Property values in the Data Table inspector.

Main
NameDescriptionValues acceptedDefault
InputThe data to display.A constant or variable of type double, double[] or int. 
Max PointsThe maximum number of input data to display.A constant or variable of type int. Select -1 to display all the data. 
ActiveWhether the element actually accepts input data.A boolean variable or one of the constants true or false. 
No RepeatWhether to ignore equal succesive points.A boolean variable or one of the constants true or false. 
StrideThe stride when displaying the data.A constant or variable of type int. 
Show Row NumberWhether to display the row numbers.A boolean variable or one of the constants true or false. 
Column NamesThe number for the columns.A String or String[] variable. Example new String[]{"#","t","x"} 
Column FormatThe format of the columns, i.e. the number of decimal digits with which to display the value.Type 0.0 with one or more zeros after the point. Example new String[]{"0.0","0.0","0.0"} 
Graphical Aspect
NameDescriptionValues acceptedDefault
Resize Mode The tableĀ“s auto resize mode when it is resized.  
Visible The visibility of the element.A boolean variable or one of the constants true or false. 
Size The double[] array with the size of the frame in each direction.Type the two size values or use the editor provided. 
BackgroundThe background color for the element.Use the editor provided or read about colors. 
ForegroundThe color to use when drawing or writing in the element.Use the editor provided or read about colors. 
FontThe font used to display text in the element.Use the editor provided to select name, style and size of the font. 
TooltipText displayed when the mouse is over the element.A string constant or variable. 

Methods

Public methods of the DataTable element that can be invoked in a code page.

SignatureDescription
void appendRow(double[] x)Appends a row of data with the given values to the table.
void appendRow(int[] x)Appends a row of data with the given values to the table.
void appendRow(byte[] x)Appends a row of data with the given values to the table.
void appendRow(Object[] x)Appends a row of data with the given values to the table.
void clearData()Clears data from this table. Column names and format patterns are not affected.

Further examples

(deliberately left empty)

Edit - History - Print - Recent Changes - Search
Page last modified on October 18, 2010, at 12:05 AM