Class FnMapPanelESU

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public final class FnMapPanelESU extends JPanel
Provide a graphical representation of the ESU mapping table. Each row represents a possible mapping between input conditions (function keys, etc.) and logical, physical or sound outputs.

Uses data from the "model" and "family" elements from the decoder definition file to configure the number of rows and set up any custom item names:

extFnsESU
Uses the ESU-style function map rather than the NMRA style.
   extFnsESU="V4" for generation 4 decoders.
   extFnsESU="V5" for generation 5 decoders.
 
numOuts
Number of physical outputs (information only, not used by the code).
 
numOutsFromDefinition
Number of physical outputs read from decoder definition.
 
numFns
Number of mapping rows to display.
Only use this parameter if the specific decoder definition implements less rows than the default for that decoder generation (V4/V5), for example the LokPilot V4.
 
output (in "family" or "model")
name="blockNo,itemNo" label="theName"
 - Set name of block "blockNo", item "itemNo" to "theName".
 
name="blockNo,itemNo" label="theName|OnChoice|OffChoice"
 - Set name of block "blockNo", item "itemNo" to "theName" and replace the default "On and "Off" choices for enumChoice items.
 
name="blockNo,itemNo" label="|"
 - Cause item block "blockNo", item "itemNo" to be suppressed from the table.
 
name="itemNo" label="..."
 - As above, but using an absolute "itemNo" (not recommended).
 
name="theName" label="OnChoice|OffChoice"
 - Set name of the nth item to "theName" and replace the default "On and "Off" choices for enumChoice items, where this line is the nth "output" element of the "model" element in the decoder definition file (not recommended).
Default item headings:
Coded in String array itemDescESU[] of this class.
Item headings can be overridden by the "output" elements documented above.
Items will be suppressed if any of the following are true:
No variables are found for that item.
The item output name is of the form name="n" label="|".
Item number is > numOuts.
Variable definitions:
Are of the form "ESU Function Row xx Item yy" and are created "on the fly" by this class. Many thousands of variables are needed to populate the function map. It is more efficient to create these in code than to use XML in the decoder file. DO NOT specify them in the decoder file.

The "tooltip" & "label" attributes on a fnmapping variable are ignored. Expanded internationalized tooltips are generated in the code.
See Also: