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" :)
Property values in the ArrayPanel inspector.
Main |
Name | Description | Values accepted | Default |
Data | The data for the element. | int[], int[][], int[][][], double[], double[][], double[][][], boolean[], boolean[][], boolean[][][], String[], String[][], String[][][], Object. | |
Static | Static elements are not automatically refreshed. | A boolean variable or one of the constants true or false. | |
Transposed | Whether to transpose the array. | A boolean variable or one of the constants true or false. | |
Format | The 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. | |
Editable | Whether the displayed value can be changed. | A boolean variable or one of the constants true or false. | |
Columns Locked | Whether the column is locked and cannot be edited. | A boolean variable or one of the constants true or false. | |
Action | The action to invoke when the user interacts with the element. | The Java code to invoke for the action. | |
Graphical Aspect |
Name | Description | Values accepted | Default |
Columns Names | The names of the columns. | A string array, String[]. | |
Show Row Number | Whether to display the row numbers. | A boolean variable or one of the constants true or false. | |
First Row | The first row number to display. | An integer value. | |
First Column | The 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 Background | The background color for the data. | Use the editor provided or read about colors. | |
Data Foreground | The color for the data text. | Use the editor provided or read about colors. | |
Background | The background color for the element. | Use the editor provided or read about colors. | |
Foreground | The color to use when drawing or writing in the element. | Use the editor provided or read about colors. | |
Font | The font used to display text in the element. | Use the editor provided to select name, style and size of the font. | |
Tooltip | Text displayed when the mouse is over the element. | A string constant or variable. | |
Public methods of the ArrayPanel element that can be invoked in a code page.