Recent Changes - Search:

Information

Installation

Documentation

ElementsArrayPanel

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

An ArrayPanel displays an array. The model changes the values in the 1D or 2D Data property and the array display is updated. The array does not change as the model evolves.

(:applet clickimg="ArrayPanel.jpg" clickalt="" clickcaption="EJS ArrayPanel example: an ArrayPanel is used to display the multipls and powers of a given number. Download this example and unzip it in your source code directory." code="ArrayPanelExample_pkg.ArrayPanelExampleApplet.class" codebase="http://www.um.es/fem/EjsDL/Examples/Elements/Interface" archive="ejs_ArrayPanelExample.jar" width="285" height="249" draggable="true" :)

Properties

Property values in the ArrayPanel inspector.

Main
NameDescriptionValues acceptedDefault
DataThe data for the element.int[], int[][], int[][][], double[], double[][], double[][][], boolean[], boolean[][], boolean[][][], String[], String[][], String[][][], Object. 
StaticStatic elements are not automatically refreshed.A boolean variable or one of the constants true or false. 
TransposedWhether to transpose the array.A boolean variable or one of the constants true or false. 
FormatThe format used to display the value, i.e. the number of decimal digits with which to display the value.Type 0.0 with one or more zeros. 
EditableWhether the displayed value can be changed.A boolean variable or one of the constants true or false. 
Columns LockedWhether the column is locked and cannot be edited.A boolean variable or one of the constants true or false. 
ActionThe action to invoke when the user interacts with the element.The Java code to invoke for the action. 
Graphical Aspect
NameDescriptionValues acceptedDefault
Columns NamesThe names of the columns.A string array, String[]. 
Show Row NumberWhether to display the row numbers.A boolean variable or one of the constants true or false. 
First RowThe first row number to display.An integer value. 
First ColumnThe first row number to display.An integer value. 
Alignment The horizontal alignment of the text.  
Column Width The width of the column.  
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. 
Data BackgroundThe background color for the data.Use the editor provided or read about colors. 
Data ForegroundThe color for the data text.Use the editor provided or read about colors. 
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 ArrayPanel element that can be invoked in a code page.

SignatureDescription
void setArray(Object arrayObj)Sets the array to be displayed.
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:48 AM