<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=LIST2</id>
	<title>LIST2 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=LIST2"/>
	<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=LIST2&amp;action=history"/>
	<updated>2026-04-10T11:07:39Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.ice-online.com/index.php?title=LIST2&amp;diff=773&amp;oldid=prev</id>
		<title>ConvertBot: Displays the contents of a file or NeXtMidas TABLE in a table.</title>
		<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=LIST2&amp;diff=773&amp;oldid=prev"/>
		<updated>2020-04-27T22:04:52Z</updated>

		<summary type="html">&lt;p&gt;Displays the contents of a file or NeXtMidas TABLE in a table.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Displays the contents of a file or NeXtMidas TABLE in a table.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;FILE&amp;gt;     Name of input file or TABLE. (OPTIONAL)&lt;br /&gt;
&amp;lt;TEMPLATE&amp;gt; Name of template file OR a table containing the template. (OPTIONAL)&lt;br /&gt;
&lt;br /&gt;
Keyword Only Parameters:&lt;br /&gt;
[AUTOSELECT]   - Automatically highlight selection [DEF=TRUE]&lt;br /&gt;
[CNT]          - Control when messages are sent: CLICK,MOTION,DRAG [DEF=CLICK]&lt;br /&gt;
[CLICKACTION]  - Table to control what happens when a LMB is pressed and the&lt;br /&gt;
                 content of the corresponding SELECT message.&lt;br /&gt;
                 [DEF={CELL=SELECT,ROW=SELECT,COL=SORT}]&lt;br /&gt;
                 OPTIONS:&lt;br /&gt;
                    CELL - SELECT,ROW,COL,NONE&lt;br /&gt;
                    ROW  - SELECT,NONE&lt;br /&gt;
                    COL  - SELECT,SORT,NONE&lt;br /&gt;
                 This does NOT alter column sorting, the global template entry&lt;br /&gt;
                 SORTENABLED= handles sorting.&lt;br /&gt;
[BUTTONACTION] - Table to control what happens when a mouse button is pressed&lt;br /&gt;
                 other than LMB which is context-sensitive (controlled by&lt;br /&gt;
                 CLICKACTION=). The table should be in the form:&lt;br /&gt;
                    {MMB=&amp;lt;act&amp;gt;,RMB=&amp;lt;act&amp;gt;}&lt;br /&gt;
                 Where &amp;lt;act&amp;gt; is one of the following:&lt;br /&gt;
                    None           - Do nothing&lt;br /&gt;
                    Menu           - Toggle the graphical menu (default for MMB)&lt;br /&gt;
                    Message        - Send a message to the macro&lt;br /&gt;
                    ClearSelection - Clear current selection (default for RMB)&lt;br /&gt;
&lt;br /&gt;
LIST2 is a NeXtMidas file viewer primitive.&lt;br /&gt;
&lt;br /&gt;
 ******************************************************************************&lt;br /&gt;
 **                         -- IMPORTANT NOTES --                            **&lt;br /&gt;
 ** As of release 2.2.0:                                                     **&lt;br /&gt;
 **    LIST is is scheduled for replacement by LIST2 in future releases.     **&lt;br /&gt;
 **    Please see nxm/sys/docs/list2migration.txt for details.               **&lt;br /&gt;
 **                                                                          **&lt;br /&gt;
 ** As of release 2.5.0:                                                     **&lt;br /&gt;
 **    Access to unsafe methods in MJList has been disabled by default. Only **&lt;br /&gt;
 **    those methods included as part of the &amp;quot;Public API&amp;quot; for MJList can be  **&lt;br /&gt;
 **    accessed. The /UNSAFE switch allows access to unsafe methods for      **&lt;br /&gt;
 **    backwards compatibility.                                              **&lt;br /&gt;
 ******************************************************************************&lt;br /&gt;
&lt;br /&gt;
FILES:&lt;br /&gt;
  The following file types are supported:&lt;br /&gt;
      Blue - All standard Blue files supported by NeXtMidas&lt;br /&gt;
      Data - Any NeXtMidas pipes (read only)&lt;br /&gt;
      Text - Text files (read only)&lt;br /&gt;
      Dbf  - DBF database files (read only)&lt;br /&gt;
      CSV  - Comma-separated files&lt;br /&gt;
&lt;br /&gt;
   Since 3.1.0, LIST2 can also display NeXtMidas Tables (see example).&lt;br /&gt;
&lt;br /&gt;
FILE SIZES:&lt;br /&gt;
   The default mode of operations is for LIST2 to copy a file into RAM and then&lt;br /&gt;
   list the RAM. This allows for faster access to the file data. Since 3.1.2,&lt;br /&gt;
   LIST2 will only copy the file into RAM if the file is smaller than the size&lt;br /&gt;
   defined using the switch /UseRamFileMaxSize, which has a default of 16 MiB&lt;br /&gt;
   and a max of 2 GiB. Setting /UseRamFileMaxSize=0 or /UseRamFile=false&lt;br /&gt;
   will disable the creation of these RAM files.&lt;br /&gt;
&lt;br /&gt;
SORTING:&lt;br /&gt;
  LIST2 provides the ability to do &amp;quot;one-click-sorting&amp;quot; of the table simply by&lt;br /&gt;
  clicking on the title of the column to sort by. Clicking on the title of the&lt;br /&gt;
  column once will sort the column in ASCENDING order (note the arrow next to&lt;br /&gt;
  the title points UP to indicate the sorting state), clicking a second time&lt;br /&gt;
  will sort the column in DESCENDING order (note the DOWN arrow now present),&lt;br /&gt;
  a third click will return the column to NOT_SORTED. LIST2 only supports&lt;br /&gt;
  sorting by a single column at a time.&lt;br /&gt;
&lt;br /&gt;
  The &amp;quot;one-click-sorting&amp;quot; is an in-memory sort that affects how the data is&lt;br /&gt;
  displayed but does not alter the data in the file. Since the sort is done&lt;br /&gt;
  in memory it is not possible to sort large files, nor is it advisable to&lt;br /&gt;
  sort moderately-sized files since the sort may take away memory and CPU&lt;br /&gt;
  resources that would otherwise be available to data-processing primitives.&lt;br /&gt;
  The /SORTLIMIT switch can be used to set the maximum sort size or can be&lt;br /&gt;
  used to disable sorting entirely (with /SORTLIMIT=-1).&lt;br /&gt;
&lt;br /&gt;
MOUSE:&lt;br /&gt;
  The CTRL key may be used to perform non-contiguous multiple selection and&lt;br /&gt;
  of the SHIFT key to select a range.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TEMPLATES:&lt;br /&gt;
  LIST2 uses an &amp;quot;Enhanced Midas Template&amp;quot; for setting the display properties of&lt;br /&gt;
  the table. This template format is a plain-text table and is often defined in&lt;br /&gt;
  a plain-text table file (e.g. &amp;quot;mytemplate.tbl&amp;quot;). The following is an example&lt;br /&gt;
  of a simple template that can be used with the ellipseflags5000.prm file:&lt;br /&gt;
&lt;br /&gt;
         _GLOBAL_={TYPE=&amp;quot;LIST2&amp;quot;,LABELS=&amp;quot;ROW&amp;quot;,GRID=&amp;quot;ON&amp;quot;,BGCOLOR=&amp;quot;GRAY&amp;quot;}&lt;br /&gt;
         POS={LABEL=&amp;quot;Position (m)&amp;quot;,FGCOLOR=&amp;quot;RED&amp;quot;}&lt;br /&gt;
         ELPS={LABEL=&amp;quot;Ellipse Parameters&amp;quot;,FGCOLOR=&amp;quot;BLUE&amp;quot;}&lt;br /&gt;
         NAME={LABEL=&amp;quot;Name&amp;quot;,FGCOLOR=&amp;quot;RED&amp;quot;,WIDTH=10}&lt;br /&gt;
         _3_={LABEL=&amp;quot;Display Flags&amp;quot;,FGCOLOR=&amp;quot;BLUE&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
  The first entry in the table is named &amp;quot;_GLOBAL_&amp;quot; and sets the global settings&lt;br /&gt;
  for the table. Each subsequent entry sets the properties of an individual&lt;br /&gt;
  column. The column entries are named based on the name IN THE FILE (for the&lt;br /&gt;
  above example this means &amp;quot;POS&amp;quot; and not &amp;quot;Position (m)&amp;quot;) or the ZERO-BASED&lt;br /&gt;
  column index (e.g. &amp;quot;_3_&amp;quot; -- note that the underscores before and after the&lt;br /&gt;
  column number are required).&lt;br /&gt;
&lt;br /&gt;
    Special Note for Midas Type 1000/2000 Files:&lt;br /&gt;
      The columns in Type 1000/2000 files have the names F1, F2, F3, etc. This&lt;br /&gt;
      is for compatibility with the XDATALIST primitive in X-Midas which uses&lt;br /&gt;
      this naming convention for Type 1000/2000 files.&lt;br /&gt;
&lt;br /&gt;
  No columns should be defined more than once in the table, EXCEPT that a named&lt;br /&gt;
  entry and a numbered entry may specify the same column (this allows a general&lt;br /&gt;
  numbered entry and a specific named entry to be in a template that is used for&lt;br /&gt;
  various file types), in this case the named version will be processed and the&lt;br /&gt;
  numbered entry will be ignored.&lt;br /&gt;
&lt;br /&gt;
  The column entries in the template will only be applied to those columns that&lt;br /&gt;
  are in the table at the time when the template is applied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  GLOBAL PROPERTIES:&lt;br /&gt;
    TYPE=[LIST2|XDATALIST]                  (Default is LIST2)&lt;br /&gt;
      Indicates the type of template. The XDATALIST type is used only for those&lt;br /&gt;
      tables converted from an X-Midas template file (see CONVERT, LIST) that&lt;br /&gt;
      follow the structure used by XDATALIST. Note that an XDATALIST template&lt;br /&gt;
      will not follow any of the normal LIST2 template properties, other than&lt;br /&gt;
      having the global TYPE=XDATALIST set.&lt;br /&gt;
&lt;br /&gt;
    LABELS=[ROW|COL|BOTH|NONE]              (Default is BOTH)&lt;br /&gt;
      Indicates if row/column labels should be shown.&lt;br /&gt;
&lt;br /&gt;
    GRID=[ON|OFF]                           (Default is ON)&lt;br /&gt;
      Indicates if the grid should be shown.&lt;br /&gt;
&lt;br /&gt;
    ROWHEIGHT=&amp;lt;int&amp;gt;                         (Default is -1)&lt;br /&gt;
      (Since 2.5.0) Sets the height of the rows in the table in pixels (set&lt;br /&gt;
      this to -1 to have the height computed to match the font used). Great&lt;br /&gt;
      care should be taken in setting this since a height that looks good&lt;br /&gt;
      on one system may look bad on another system.&lt;br /&gt;
&lt;br /&gt;
    FONTSIZE=&amp;lt;float&amp;gt;                        (Default is based on Look &amp;amp; Feel)&lt;br /&gt;
      (Since 2.5.0) Sets the font size for all of the cells. Note that the&lt;br /&gt;
      font size is in &amp;quot;points&amp;quot; and not pixels. (Note: Some of the column&lt;br /&gt;
      renderer may ignore this setting.)&lt;br /&gt;
&lt;br /&gt;
    FONTSTYLE=&amp;lt;mask&amp;gt;                        (Default is based on Look &amp;amp; Feel)&lt;br /&gt;
      (Since 2.5.0) Sets the font style for all of the cells. This is a mask&lt;br /&gt;
      value with options for &amp;quot;ITALIC&amp;quot; and &amp;quot;BOLD&amp;quot;. This matches the behavior&lt;br /&gt;
      of nxm.sys.line.setFontStyle(..). (Note: Some of the column renderers&lt;br /&gt;
      may ignore this setting.)&lt;br /&gt;
&lt;br /&gt;
    FGCOLOR=&amp;lt;color&amp;gt;                         (Default is based on Look &amp;amp; Feel)&lt;br /&gt;
    BGCOLOR=&amp;lt;color&amp;gt;                         (Default is based on Look &amp;amp; Feel)&lt;br /&gt;
      Sets the default cell foreground (text) and background colors. &amp;lt;color&amp;gt;&lt;br /&gt;
      may be either a named color (e.g. &amp;quot;red&amp;quot;) or the RGB value of the color&lt;br /&gt;
      (e.g. 0xFF00FF). Alternatively it may be set to the text &amp;quot;FIELDN&amp;quot; where&lt;br /&gt;
      N is the column number (1..n) where the color is stored. The &amp;quot;FIELDN&amp;quot;&lt;br /&gt;
      syntax is usually used in conjunction with a hidden COLR column that&lt;br /&gt;
      has a specific color defined for each row. (Prior to NeXtMidas 2.3.0&lt;br /&gt;
      the FIELDN syntax only worked with FGCOLOR, since NeXtMidas 2.3.0 it&lt;br /&gt;
      works with both FGCOLOR and BGCOLOR.)&lt;br /&gt;
&lt;br /&gt;
      As of NeXtMidas 2.3.0 it is also possible to use &amp;quot;FIELD_&amp;lt;name&amp;gt;&amp;quot; where&lt;br /&gt;
      &amp;lt;name&amp;gt; is the name of one of the columns. This less confusing than&lt;br /&gt;
      the FIELDN syntax and allows templates to be independent of the order&lt;br /&gt;
      of the columns in a file.&lt;br /&gt;
&lt;br /&gt;
    COLORMAP=&amp;lt;cmap&amp;gt;                         (Default is DEFAULT)&lt;br /&gt;
      Sets the color map used for indexed colors (usually combined with&lt;br /&gt;
      FGCOLOR=FIELDn). The &amp;lt;cmap&amp;gt; variable can be the name of any predefined&lt;br /&gt;
      colormap (GrayScale,Ramp,XRamp,Wheel,Terrain,Multi,T5Layer,MapLine,Grid,&lt;br /&gt;
      Spectrum,XDatalist), or a list of colors (e.g. COLORMAP=&amp;quot;BLACK,RED,YELLOW,&lt;br /&gt;
      GREEN,BLUE&amp;quot;). Note that if giving a list of colors the initial color&lt;br /&gt;
      listed is not used (this matches the behavior in PLOT where the initial&lt;br /&gt;
      color has special meaning). The most common color map is &amp;quot;XDATALIST&amp;quot;&lt;br /&gt;
      which sets the colors similar to those used by XDATALIST in X-Midas. If&lt;br /&gt;
      &amp;lt;cmap&amp;gt; is set to DEFAULT then the default color map settings (which match&lt;br /&gt;
      LIST) are restored.&lt;br /&gt;
&lt;br /&gt;
    SHADECOLOR=&amp;lt;color&amp;gt;                      (Default is based on BGCOLOR)&lt;br /&gt;
    SHADEINT=&amp;lt;int&amp;gt;                          (Default is 0)&lt;br /&gt;
      This applies shading to alternate rows to aid in reading across large&lt;br /&gt;
      tables. To apply a gray shading color to every third row (this gives&lt;br /&gt;
      a view common to many accounting forms) set SHADECOLOR=gray,SHADEINT=3.&lt;br /&gt;
      SHADECOLOR sets the color to use for shading and SHADEINT sets the&lt;br /&gt;
      interval between shaded rows. Setting SHADEINT=0 will disable shading,&lt;br /&gt;
      setting SHADEINT to a value GREATER THAN one will enable shading (it is&lt;br /&gt;
      an error to set SHADEINT=1 since that would attempt to shade all rows).&lt;br /&gt;
&lt;br /&gt;
    SORTENABLED=[ON|OFF]                    (Default is ON)&lt;br /&gt;
    SORT=&amp;lt;sort&amp;gt;                             (Default is &amp;quot;&amp;quot;)&lt;br /&gt;
      SORTENABLED enables/disables the sorting of rows based on a given column&lt;br /&gt;
      value. If sorting is enabled, SORT sets the column to sort by (e.g. &amp;quot;+FOO&amp;quot;&lt;br /&gt;
      to sort FOO in ascending order or &amp;quot;-FOO&amp;quot; to sort descending), set this to&lt;br /&gt;
      &amp;quot;&amp;quot; to set the table to unsorted. Use {SORTENABLED=&amp;quot;ON&amp;quot;,SORT=&amp;quot;&amp;quot;} to enable&lt;br /&gt;
      sorting (if the user chooses to use it) but with no initial sorting.&lt;br /&gt;
&lt;br /&gt;
    COLDRAG=[ON|OFF]                        (Default is ON)&lt;br /&gt;
      This enables/disables the re-arranging of the column display by the user.&lt;br /&gt;
      When this is turned on the user may elect to re-order the display of the&lt;br /&gt;
      various columns to an ordering that they find easiest to use. Turning this&lt;br /&gt;
      off will guarantee that columns are always ordered as specified in the&lt;br /&gt;
      file.&lt;br /&gt;
&lt;br /&gt;
    AUTOHIDE=[ON|OFF]                       (Default is ON)&lt;br /&gt;
      If this is ON any columns not specified in the template will be hidden,&lt;br /&gt;
      If this is OFF all file columns will be shown, whether in the template&lt;br /&gt;
        or not, unless the template defines the column as HIDE=TRUE.&lt;br /&gt;
&lt;br /&gt;
    AUTOORDER=[ON|OFF]                      (Default is ON)&lt;br /&gt;
      If this is ON any columns will be initially ordered (left-to-right) in&lt;br /&gt;
      the order they appear in the template. When this is OFF they will be&lt;br /&gt;
      initially ordered in the order specified in the file.&lt;br /&gt;
&lt;br /&gt;
    ADJSELCELLS=[ON|OFF]                (Default is FALSE)&lt;br /&gt;
      If this is ON any selected cell will be adjusted to remain selected when&lt;br /&gt;
      a row is added or removed in a location that re-indexes the selected cell.&lt;br /&gt;
      For example, if Row 4 is selected and a new Row 1 is added, Row 4, (which&lt;br /&gt;
      was formerly Row 3 before the addition of the new row) will 'lose'&lt;br /&gt;
      selection and Row 5 (the former Row 4) will be selected. By default,&lt;br /&gt;
      selections are maintained by row index.&lt;br /&gt;
&lt;br /&gt;
  COLUMN PROPERTIES:&lt;br /&gt;
    RENDERER=&amp;lt;string&amp;gt;                       (Default is null)&lt;br /&gt;
    RENDEROPTS=&amp;lt;table&amp;gt;                      (Default is null)&lt;br /&gt;
      Override the default renderer used for the cells in the given column.&lt;br /&gt;
      When this is used most of the options below are simply ignored, it is&lt;br /&gt;
      expected that the custom cell renderer will do all of the work. See&lt;br /&gt;
      &amp;quot;RENDERER&amp;quot; below for details and examples.&lt;br /&gt;
&lt;br /&gt;
    LABEL=&amp;lt;string&amp;gt;                          (Default is to use the column name)&lt;br /&gt;
      Sets the column label to be shown at the top of the table (when column&lt;br /&gt;
      labels are displayed).&lt;br /&gt;
&lt;br /&gt;
      (Use of this feature will not alter the actual name of the column, only&lt;br /&gt;
      the title displayed on the row header.)&lt;br /&gt;
&lt;br /&gt;
    WIDTH=&amp;lt;int&amp;gt;                             (Default is automatically set)&lt;br /&gt;
      Sets the width of a column (in number of characters).&lt;br /&gt;
&lt;br /&gt;
    ALIGN=[LEFT|RIGHT|CENTER]               (Default is automatically set)&lt;br /&gt;
      Sets the horizontal text alignment of a column.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    FGCOLOR=&amp;lt;color&amp;gt;                         (Default uses global setting)&lt;br /&gt;
    BGCOLOR=&amp;lt;color&amp;gt;                         (Default uses global setting)&lt;br /&gt;
      Overrides the global FGCOLOR/BGCOLOR settings to set the foreground and&lt;br /&gt;
      background colors for cells in the column.&lt;br /&gt;
&lt;br /&gt;
    COLORMAP=&amp;lt;cmap&amp;gt;                         (Default is DEFAULT)&lt;br /&gt;
      As of NeXtMidas 2.3.0 is also possible to use a column-specific COLORMAP&lt;br /&gt;
      that is a table. In this case the table is in {&amp;lt;val&amp;gt;=&amp;lt;color&amp;gt;,...} form&lt;br /&gt;
      that maps possible column values to their assigned color. The value of&lt;br /&gt;
      &amp;quot;_DEFAULT_&amp;quot; can be provided as a default for any that don't otherwise&lt;br /&gt;
      match in the COLORMAP. It is also possible to provide colors that link&lt;br /&gt;
      to other fields (e.g. &amp;quot;FIELD_&amp;lt;name&amp;gt;&amp;quot;). This allows a template to link&lt;br /&gt;
      various attributes in the coloring. For example:&lt;br /&gt;
&lt;br /&gt;
        {_GLOBAL_={FGCOLOR=&amp;quot;FIELD_STATUS&amp;quot;},&amp;amp;&lt;br /&gt;
         MODULATOR={},&amp;amp;&lt;br /&gt;
         STATUS={COLORMAP={OFF=&amp;quot;GRAY&amp;quot;,_DEFAULT_=&amp;quot;FIELD_TYPE&amp;quot;}},&amp;amp;&lt;br /&gt;
         TYPE={COLORMAP={AM=&amp;quot;BLUE&amp;quot;,FM=&amp;quot;GREEN&amp;quot;,CM=&amp;quot;YELLOW&amp;quot;,_DEFAULT_=&amp;quot;RED&amp;quot;}}}&lt;br /&gt;
&lt;br /&gt;
      In the above example all rows will be colored blue if TYPE=AM, green if&lt;br /&gt;
      TYPE=FM, yellow if TYPE=CM, and red if unknown; EXCEPT if it is turned&lt;br /&gt;
      off in which case it will be colored gray. There is another example of&lt;br /&gt;
      this in the test macro %test_list2_templates_colors.&lt;br /&gt;
&lt;br /&gt;
      Since NeXtMidas 2.5.0 it is possible to color based on a range of values.&lt;br /&gt;
      To do this the table key is an in-line test (i.e. &amp;quot;TEST(...)&amp;quot;) that tests&lt;br /&gt;
      the current cell value (&amp;quot;X&amp;quot;) against a range of values. For example:&lt;br /&gt;
&lt;br /&gt;
        nM&amp;gt; list2 testxy3000.prm &amp;amp;&lt;br /&gt;
              {_GLOBAL_={AUTOHIDE=NO,FGCOLOR=FIELD_ABSC},&amp;amp;&lt;br /&gt;
               ABSC={COLORMAP={_DEFAULT_=red,TEST(X,LT,3)=yellow}}}&lt;br /&gt;
&lt;br /&gt;
      Important notes about using &amp;quot;TEST(...)&amp;quot;:&lt;br /&gt;
        (1) The order in which the tests are evaluated is arbitrary and may&lt;br /&gt;
            change without notice, all tests should be mutually exclusive.&lt;br /&gt;
        (2) The only result/variable available is &amp;quot;X&amp;quot; which is set to the&lt;br /&gt;
            value of the cell.&lt;br /&gt;
        (3) Any of the standard tests (see EXPLAIN IF) can be used.&lt;br /&gt;
&lt;br /&gt;
      The COLORMAP is evaluated in the following order:&lt;br /&gt;
        (1) Any test cases.&lt;br /&gt;
        (2) Any exact-match values.&lt;br /&gt;
        (3) Use _DEFAULT_ value.&lt;br /&gt;
&lt;br /&gt;
      Acceptable color values:&lt;br /&gt;
        (1) The name of a color (e.g. &amp;quot;red&amp;quot;)&lt;br /&gt;
        (2) The hex value of a color (e.g. &amp;quot;#FF0000&amp;quot;)&lt;br /&gt;
        (3) The index of another column to get the color from (e.g.&lt;br /&gt;
            &amp;quot;FIELD1&amp;quot; for column 1), this is similar to XDATALIST&lt;br /&gt;
        (4) The name of another column to get the color from (e.g.&lt;br /&gt;
            &amp;quot;FIELD_ABSC&amp;quot; for the column named &amp;quot;ABSC&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    MCOLORS=&amp;lt;colors&amp;gt;                        (Default is DEFAULT)&lt;br /&gt;
      TBD&lt;br /&gt;
&lt;br /&gt;
    TYPE=[ANGLE|DATE|ENUM|NUMBER|           (Default is automatically set)&lt;br /&gt;
          STRING|TOGGLE]&lt;br /&gt;
    FORMAT=&amp;lt;string&amp;gt;                         (Default is automatically set)&lt;br /&gt;
    TIMEZONE=&amp;lt;string&amp;gt;                       (Default is &amp;quot;UTC&amp;quot;)&lt;br /&gt;
    ENUM=&amp;lt;table&amp;gt;                            (Default is null)&lt;br /&gt;
      TYPE sets the type of type of data to be displayed:&lt;br /&gt;
        - ANGLE:  (Since 2.5.0) An angle format is applied to an angle in&lt;br /&gt;
                  decimal degrees. See nxm.sys.lib.MFormat for details on the&lt;br /&gt;
                  syntax for allowable FORMAT= values.&lt;br /&gt;
        - DATE:   (Since 2.5.0) A date format that is applied to a Midas time&lt;br /&gt;
                  (seconds since 1950). The FORMAT= used with TYPE=DATE matches&lt;br /&gt;
                  the java.text.SimpleDateFormat class. The TIMEZONE= entry can&lt;br /&gt;
                  be used to override the time zone being used, the allowable&lt;br /&gt;
                  time zone values must match those given by java.util.TimeZone.&lt;br /&gt;
        - ENUM:   An enumerated set of choices. When this is set the ENUM table&lt;br /&gt;
                  must be given listing the properties for each option:&lt;br /&gt;
                    LABEL - The value as displayed graphically. (Required)&lt;br /&gt;
                    VALUE - The value as it exists in the file. (Required)&lt;br /&gt;
                    COLOR - The color for the value.            (Optional)&lt;br /&gt;
        - NUMBER: A numerical value (double, float, long, int, ...). The format&lt;br /&gt;
                  for the numerical value is set by FORMAT.&lt;br /&gt;
        - STRING: Any Java String or ASCII String to be displayed, or any Java&lt;br /&gt;
                  Object for which the display value can be obtained via the&lt;br /&gt;
                  Object's toString() method.&lt;br /&gt;
        - TOGGLE: A true/false option that will display as a checkbox but will&lt;br /&gt;
                  represent a true (checked) or false (unchecked) value. If&lt;br /&gt;
                  the corresponding value in the file is numeric then zero&lt;br /&gt;
                  is false and all others are also true. If the corresponding&lt;br /&gt;
                  value in the file is a string then any value that evaluates&lt;br /&gt;
                  to true using StringUtil.isTrue(..) is true and all others&lt;br /&gt;
                  are false.&lt;br /&gt;
&lt;br /&gt;
      FORMAT sets the format for a number using a Java format string (see the&lt;br /&gt;
      documentation for java.text.DecimalFormat for details), or one of the&lt;br /&gt;
      following strings:&lt;br /&gt;
        GEN    - X-Midas GENeral format (no exponent if between 1E-3, 1E15).&lt;br /&gt;
        VIS    - X-Midas VISual  format (no exponent if between 1E-3, 1E7).&lt;br /&gt;
        SCI    - SCIentific notation.&lt;br /&gt;
        ENG    - ENGineering notation   (exponent is a multiple of 3).&lt;br /&gt;
        MAN    - MANtissa notation      (no exponents).&lt;br /&gt;
        DMS    - Deg-Min-Sec angular format.            ddd'mm'ss&lt;br /&gt;
        LAT    - Deg-Min-Sec format for latitude.       ddd'mm'ssN&lt;br /&gt;
        LON    - Deg-Min-Sec format for longitude.      ddd'mm'ssE&lt;br /&gt;
        STD    - STanDard time code format.             [yy]yy:mm:dd::hh:mm:ss&lt;br /&gt;
        ACQ    - ACQisition time code format.           [yy.ddd]:[hh:mm:ss]&lt;br /&gt;
        EPOCH  - EPOCH quadwords for time code.         [yy]yy:sec_in_year&lt;br /&gt;
        NORAD  - NORAD timecode format.                 yyddd.frac_of_day&lt;br /&gt;
        TCR    - TimeCode Reader format.                ddd:hh:mm:ss&lt;br /&gt;
        VAX    - VAX time format.                       dd-MMM-yy[yy]:hh:mm:ss&lt;br /&gt;
        HMS    - Hour-Min-Sec time format.              hh:mm:ss.ffff&lt;br /&gt;
        YMD    - Year-Month-Day format.                 yyyy:mm:dd&lt;br /&gt;
        NET    - 32-bit integer formatted as URL.       127.0.0.1&lt;br /&gt;
&lt;br /&gt;
      If the data is an array type (e.g. CF, VD, 8B) all elements will use the&lt;br /&gt;
      same formatting and nothing special needs to be done.&lt;br /&gt;
&lt;br /&gt;
      To create a format for a fixed array size of non-homogeneous values,&lt;br /&gt;
      specify the pattern to use for each element in the array separated by an&lt;br /&gt;
      ampersand (&amp;quot;&amp;amp;&amp;quot;) character. For example:&lt;br /&gt;
        &amp;quot;DMS&amp;amp;DMS&amp;quot;       (Latitude + Longitude)&lt;br /&gt;
        &amp;quot;VIS&amp;amp;LAT&amp;amp;LON&amp;quot;   (Altitude + Latitude + Longitude)&lt;br /&gt;
        &amp;quot;###ft&amp;amp;DMS&amp;amp;DMS&amp;quot; (Altitude + Latitude + Longitude)&lt;br /&gt;
        &amp;quot;HMS&amp;amp;SCI&amp;quot;       (Time + Magnitude)&lt;br /&gt;
      Note that use of a fixed array size format mandates that the data in the&lt;br /&gt;
      table match in size and order.&lt;br /&gt;
&lt;br /&gt;
    HIDE=[ON|OFF]                           (Default is OFF)&lt;br /&gt;
      Indicates if the column should be hidden from display.&lt;br /&gt;
&lt;br /&gt;
RENDERER:&lt;br /&gt;
  The RENDERER= and RENDEROPTS= attributes in the template allow a custom cell&lt;br /&gt;
  renderer to be used for all of the cells in a given column. When this is used&lt;br /&gt;
  most of the standard template options are ignored, it is expected that the&lt;br /&gt;
  custom cell renderer will do all of the work.&lt;br /&gt;
&lt;br /&gt;
  The RENDERER= option specifies the fully-qualified class name of the cell&lt;br /&gt;
  renderer to use. The class must implement javax.swing.table.TableCellRenderer&lt;br /&gt;
  and must have either a no-argument constructor or a constructor that takes in&lt;br /&gt;
  a nxm.sys.lib.Midas instance. Additional constructors will be ignored, if both&lt;br /&gt;
  a no-argument constructor and a constructor that takes in a Midas instance are&lt;br /&gt;
  provided, the one that takes in the Midas instance will be used.&lt;br /&gt;
&lt;br /&gt;
      Example:&lt;br /&gt;
        {ABSC={RENDERER=&amp;quot;nxm.myopt.libg.SpecialRenderer&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
  The optional RENDEROPTS= entry in the template takes in a table of keys that&lt;br /&gt;
  should be set in the renderer's class. The should match the set methods in&lt;br /&gt;
  the constructor. This allows options a custom renderer to have its own &amp;quot;mini-&lt;br /&gt;
  template&amp;quot; for the column:&lt;br /&gt;
&lt;br /&gt;
      Example:&lt;br /&gt;
        {ABSC={RENDERER=&amp;quot;nxm.myopt.libg.SpecialRenderer&amp;quot;,&lt;br /&gt;
               RENDEROPTS={MYSTR=&amp;quot;HelloWorld&amp;quot;}}}&lt;br /&gt;
&lt;br /&gt;
  A word of warning: It is very easy to create a custom renderer that has such&lt;br /&gt;
  bad performance that it causes all graphics (not just LIST2) to run slowly.&lt;br /&gt;
  In fact, numerous books and web sites provide tutorials on TableCellRenderer&lt;br /&gt;
  that are extremely slow. It is strongly suggested that users avoid writing&lt;br /&gt;
  a custom renderer without extensive Swing experience.&lt;br /&gt;
&lt;br /&gt;
  ******************************************************************************&lt;br /&gt;
  * WARNING: Custom renderers are a &amp;quot;use at your own risk&amp;quot; feature. When using *&lt;br /&gt;
  *          a custom renderer you assume all responsibility for performance   *&lt;br /&gt;
  *          and functionality. The NeXtMidas team is unable assist users of   *&lt;br /&gt;
  *          custom renderers.                                                 *&lt;br /&gt;
  ******************************************************************************&lt;br /&gt;
&lt;br /&gt;
DRAG AND DROP:&lt;br /&gt;
  Since NeXtMidas 3.3.0, LIST2 supports Drag and Drop as follows:&lt;br /&gt;
&lt;br /&gt;
  Enabling or disabling Drag and Drop is done via the /DRAGDROP switch.&lt;br /&gt;
&lt;br /&gt;
  When enabled, the DRAG object created by dragging from a LIST2 will be a&lt;br /&gt;
  Table (in String form) of the current selected rows from the LIST2.&lt;br /&gt;
&lt;br /&gt;
  Since the actions to take for a DROP are application-dependent, an object&lt;br /&gt;
  DROP-ed into a LIST2 is sent to the message handler as the DATA portion of&lt;br /&gt;
  a Message.&lt;br /&gt;
&lt;br /&gt;
  For example usage, see the macro nxm.sys.test.test_plot_drag_drop.mm.&lt;br /&gt;
&lt;br /&gt;
OTHER:&lt;br /&gt;
  - Like other graphical primitives it is possible to Iconify/Deiconify a&lt;br /&gt;
    stand-alone LIST2. If LIST2 is in a PANEL, you need to do this on the PANEL.&lt;br /&gt;
    Here is an example of a stand-alone LIST2:&lt;br /&gt;
        nM&amp;gt; list2/bg testxy3000.prm&lt;br /&gt;
        nM&amp;gt; set reg.list2.mw.display icon&lt;br /&gt;
        nM&amp;gt; set reg.list2.mw.display front&lt;br /&gt;
&lt;br /&gt;
  - Reducing &amp;quot;flicker&amp;quot; with Java Swing double buffering: Due to the nature of&lt;br /&gt;
    LIST2 only reading part of the file at a time (so it can read files greater&lt;br /&gt;
    than the RAM size), many users notice a flicker effect while scrolling.&lt;br /&gt;
    This can be alleviated through the use of Swing double buffering, which&lt;br /&gt;
    buffers the drawing in the background and then draws it all at once. To&lt;br /&gt;
    enable Swing double buffering in NeXtMidas, do the following:&lt;br /&gt;
&lt;br /&gt;
      nM&amp;gt; env set graphics +swingdb&lt;br /&gt;
&lt;br /&gt;
MESSAGES:&lt;br /&gt;
  Messaging support for List2 is limited. However, if the /LEGACY switch&lt;br /&gt;
  is used the messages used for LIST in NeXtMidas 2.1.0 will work (for details&lt;br /&gt;
  see EXPLAIN LIST).&lt;br /&gt;
&lt;br /&gt;
  Message names followed by a star (*) are only supported when in /LEGACY mode,&lt;br /&gt;
  see the LIST explain file for more details.&lt;br /&gt;
&lt;br /&gt;
  Processed:&lt;br /&gt;
    ADDCOLUMN *      - Adds a column.&lt;br /&gt;
    APPLYTEMPLATE *  - Applies a new template.&lt;br /&gt;
    CLOSEFILE *      - Closes the current file.&lt;br /&gt;
    CURSOR *         - Sets highlight color.&lt;br /&gt;
    EXIT             - Exits the LIST.&lt;br /&gt;
    GETROW *         - Gets a row from the list.&lt;br /&gt;
    GETROWVECTOR *   - Gets a row from the list as a vector.&lt;br /&gt;
    GETROWTABLE *    - Gets a row from the list as a table.&lt;br /&gt;
    GETCOL *         - Gets a col from the list.&lt;br /&gt;
    GETCOLUMNVECTOR *- Gets a col from the list as a vector.&lt;br /&gt;
    GETCOLUMNTABLE * - Gets a col from the list as a table.&lt;br /&gt;
    HIGHLIGHT *      - Message is ignored by LIST2.&lt;br /&gt;
    OPENFILE *       - Opens a new data file.&lt;br /&gt;
    OPENTEMPLATE *   - Opens a new template.&lt;br /&gt;
    OUTPUTTYPE *     - Sets the output type for legacy functions.&lt;br /&gt;
    PAN *            - Deprecated: Does nothing.&lt;br /&gt;
    POP              - Push or pop the window INFO field indicates action&lt;br /&gt;
                       (0=Push,1=Pop,-1=Toggle). (Warning: LIST did not check&lt;br /&gt;
                       the INFO field and always assumed INFO=-1; this was&lt;br /&gt;
                       inconsistent with other primitives such as PLOT.)&lt;br /&gt;
    REFRESH          - Refresh the list.&lt;br /&gt;
    SETROW *         - Sets a row in the list.&lt;br /&gt;
    THEME *          - Message is ignored by LIST2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    BUTTON           - Internal Message: Mouse click.&lt;br /&gt;
    CONTROLS *       - Internal Message: Does nothing in LIST2.&lt;br /&gt;
    KEYPRESS         - Internal Message: Keyboard key press.&lt;br /&gt;
    MENU *           - Internal Message: Does nothing in LIST2.&lt;br /&gt;
    OTHER *          - Internal Message: Does nothing in LIST2.&lt;br /&gt;
    POINTER          - Internal Message: Mouse motion.&lt;br /&gt;
    RESIZE           - Internal Message: Window resized.&lt;br /&gt;
    SETTINGS *       - Internal Message: Does nothing in LIST2.&lt;br /&gt;
    WINDOW           - Internal Message: Window action.&lt;br /&gt;
&lt;br /&gt;
  Sent:&lt;br /&gt;
    DESELECT *       - Deselect of selected rows (see SELECT message)&lt;br /&gt;
    DROPDATA         - User has executed a drag and drop on a LIST2&lt;br /&gt;
    SELECT *         - Selection information&lt;br /&gt;
                       Required Data Fields:&lt;br /&gt;
                         S:TYPE    - ROW, COLUMN or CELL&lt;br /&gt;
                         O:ROW     - Row number (1..n or -1 for COLUMN type)&lt;br /&gt;
                         O:COLUMN  - Col number (1..n or -1 for ROW type)&lt;br /&gt;
                         T:VALUE   - Table of data from last click&lt;br /&gt;
                         S:NAME    - TBD&lt;br /&gt;
                       Optional Data Fields:&lt;br /&gt;
                         T:CURRSEL - Table of CURRENT selected rows&lt;br /&gt;
                         T:PREVSEL - Table of PREVIOUS selected rows&lt;br /&gt;
    SELECTROW *      - Selection information for a row (see SELECT message)&lt;br /&gt;
&lt;br /&gt;
EXAMPLES:&lt;br /&gt;
  1. List a file:&lt;br /&gt;
       nM&amp;gt; list2 fftdemo     ! Type 1000 file&lt;br /&gt;
       nM&amp;gt; list2 testxy3000  ! Type 3000 file&lt;br /&gt;
       nM&amp;gt; list2 cities.txt  ! Text file&lt;br /&gt;
       nM&amp;gt; list2 world.dbf   ! DBF file&lt;br /&gt;
&lt;br /&gt;
  2. List a file with an X-Midas XDATALIST template:&lt;br /&gt;
       nM&amp;gt; list2/legacy myFile myTemplate&lt;br /&gt;
&lt;br /&gt;
  3. List a file with a LIST2 table template:&lt;br /&gt;
       nM&amp;gt; list2 fftdemo {F1={TYPE=&amp;quot;NUMBER&amp;quot;,FORMAT=&amp;quot;0.00&amp;quot;}}&lt;br /&gt;
       nM&amp;gt; list2 cities  {_GLOBAL_={SORTENABLED=&amp;quot;ON&amp;quot;,SORT=&amp;quot;+NAME&amp;quot;},&amp;amp;&lt;br /&gt;
                          POS={FGCOLOR=&amp;quot;BLUE&amp;quot;,FORMAT=&amp;quot;###m&amp;amp;LAT&amp;amp;LON&amp;quot;},&amp;amp;&lt;br /&gt;
                          NAME={FGCOLOR=&amp;quot;RED&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
  4. List a file where all changes go directly to disk (this is the default):&lt;br /&gt;
       nM&amp;gt; list2 myfile&lt;br /&gt;
&lt;br /&gt;
  5. List a file where all exist only in ram (the file on disk is not modified):&lt;br /&gt;
       nM&amp;gt; list2/copy myfile&lt;br /&gt;
&lt;br /&gt;
  6. List the file using 1-based or 0-based indexing:&lt;br /&gt;
       nM&amp;gt; list2/base=1 fftdemo&lt;br /&gt;
       nM&amp;gt; list2/base=0 fftdemo&lt;br /&gt;
&lt;br /&gt;
  7. List a pipe:&lt;br /&gt;
       nM&amp;gt; list2 _mypipe&lt;br /&gt;
&lt;br /&gt;
  8. List a file but poll it for changes every 5 seconds:&lt;br /&gt;
       nM&amp;gt; list2/polldata=5 myfile&lt;br /&gt;
&lt;br /&gt;
  9. Automatically create a file in ram that matches a given template (note that&lt;br /&gt;
     this creates a Type 3000 file with each record of type &amp;quot;XA&amp;quot;, template names&lt;br /&gt;
     must be valid Type 3000 record names):&lt;br /&gt;
       nM&amp;gt; list2 ,, {NAME={FGCOLOR=&amp;quot;RED&amp;quot;},DATE={FGCOLOR=&amp;quot;BLUE&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
  10. List a file but do not allow the cells to be edited.&lt;br /&gt;
       nM&amp;gt; list2 cities /editable=false&lt;br /&gt;
&lt;br /&gt;
  11. Refresh (repaint/redraw) a row in the List&lt;br /&gt;
       invoke reg.mylist.redraw(rownum)&lt;br /&gt;
&lt;br /&gt;
  12. Refresh (repaint/redraw) the entire List&lt;br /&gt;
      message send id=mylist ,, &amp;quot;REFRESH&amp;quot;&lt;br /&gt;
           - or -&lt;br /&gt;
      invoke reg.mylist.refresh()&lt;br /&gt;
&lt;br /&gt;
  13. List a TABLE&lt;br /&gt;
       nM&amp;gt; list2 {ROW1={A=&amp;quot;hi&amp;quot;,B=&amp;quot;there&amp;quot;},ROW2={A=&amp;quot;hello&amp;quot;,B=&amp;quot;world&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
  14. List a file without copying the file into RAM&lt;br /&gt;
       nM&amp;gt; list2/useRamFileMaxSize=0/bg apenny&lt;br /&gt;
           - or -&lt;br /&gt;
       nM&amp;gt; list2/useRamFile=f/bg apenny&lt;br /&gt;
&lt;br /&gt;
  15. List a file of size 64 MegaBytes and allow the file to be copied into RAM&lt;br /&gt;
      for faster paging:&lt;br /&gt;
       nM&amp;gt; list2/useRamFileMaxSize=65M/bg myFile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SWITCHES:&lt;br /&gt;
  /BASE=n            - Set this to 1 for 1-based indexing, 0 for 0-based&lt;br /&gt;
                       indexing.&lt;br /&gt;
  /COPY              - DEPRECATED: Use /MOD=F in place of this.&lt;br /&gt;
  /DRAGDROP          - Enable or disable Drag and Drop. (Since NeXtMidas 3.3.0)&lt;br /&gt;
  /EDITABLE          - Allow editing of cells in the table. This is different&lt;br /&gt;
                       from the /MOD switch in that this will select the cell&lt;br /&gt;
                       but not enter 'edit' mode. [DEF=TRUE]&lt;br /&gt;
                       (Since NeXtMidas 2.7.3)&lt;br /&gt;
  /EXIT=             - Mask value with flags RETURN, MENU, MESSAGE, WINDOW&lt;br /&gt;
                       or ALL [DEF=NONE in pipe mode, else ALL]&lt;br /&gt;
  /LEGACY            - DEPRECATED: Enables the legacy interface causing LIST2&lt;br /&gt;
                       to act more like LIST from NeXtMidas 2.0.0.&lt;br /&gt;
  /MOD               - Allow direct file modifications. [DEF=FALSE]&lt;br /&gt;
  /MSGID=            - The ID to process messages (usually /MSGID=MAIN to send&lt;br /&gt;
                       to the processMessage procedure of the current macro.)&lt;br /&gt;
  /POLLDATA=n        - Polls the current file for changes n seconds. Set this&lt;br /&gt;
                       to 0 to disable polling. If the input file is a pipe&lt;br /&gt;
                       this indicates the delay between pipe reads.&lt;br /&gt;
                       Do not use /MOD switch with this. [DEFAULT=0]&lt;br /&gt;
                       Changed from /POLL=n in 3.3.1.&lt;br /&gt;
  /PREVANDCURR       - DEPRECATED: Used with /LEGACY to indicate if previous and&lt;br /&gt;
                       current selections are included in selection message&lt;br /&gt;
                       (true) or not. Excluding them matches LIST in NeXtMidas&lt;br /&gt;
                       2.0.0, including them matches LIST in NeXtMidas 2.4.0.&lt;br /&gt;
                       [DEF=TRUE]&lt;br /&gt;
  /SORTLIMIT=n       - Sets the maximum number of records in a sortable file&lt;br /&gt;
                       (see SORTING above). [DEFAULT=8192]&lt;br /&gt;
  /UNSAFE            - DEPRECATED: Allow access to unsafe methods in MJList&lt;br /&gt;
                       (this was the default in NeXtMidas 2.2.0)&lt;br /&gt;
  /USERAMFILE        - Whether or not to copy the file being listed into RAM for&lt;br /&gt;
                       faster access. [DEF=TRUE], unless /MOD=TRUE.&lt;br /&gt;
                       (Since NeXtMidas 3.1.2)&lt;br /&gt;
  /USERAMFILEMAXSIZE - Used to set the maximum size allowable for the listed&lt;br /&gt;
                       file to be in order for it to be copied to RAM. Setting&lt;br /&gt;
                       this to &amp;lt;= 0 will prevent the creation of the RAM file.&lt;br /&gt;
                       [DEF=16 MiB] (Since NeXtMidas 3.1.2)&lt;br /&gt;
&lt;br /&gt;
See Also: nxm.sys.inc.ListInterface, nxm.sys.inc.ListFile, nxm.sys.lib.MFormat,&lt;br /&gt;
See Also: LIST, nxm.sys.libg.MJList&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:NXM_Explain]]&lt;/div&gt;</summary>
		<author><name>ConvertBot</name></author>
		
	</entry>
</feed>