Units
What is a unit?
Meter, centimeter, millimeter, micrometer, light year, etc
are units of the category length for example. If you want to add, change
or delete untis, edit the textfiles Installationdirectory/data/units/*.list
Description of a file containing units
The ".list" files are used to specify units and factors.
Empty lines and lines with a leading hash (#) are ignored by the program.
The sequence in the GUI appears as you defined them in the ".list"
files.
Format of a line
Each token is separated by a colon. Each line must have at
least two tokens: "Name" and "Value".
This is the full format:
Name:Value:Countrycode:Validity:Selection
Description of the tokens
Name
The name appears in the combo box.
Value
The factor of the unit. Basic units like meter, second, watt,
kilogramm, etc. should have the factor 1. Here are some examples to show
the syntax of valid values:
1
=
1.0
2.45 = 2.45
1e-4 = 0.0001
2.45e3 = 2450
1/2
= 0.5
1e-4/9 = 0.00001111...
Countrycode
What countries are using the unit? A little flag shows the
country or the countries which are using the unit.
The NC find flags in the file "lib/flags30x15iso3166.jar",
their code is defined in the ISO 3166 standard. The country code has to
be specified in lowercase characters ("de" for Germany). Self created flags
can be found in "installationdirecotry/data/images/flags/Countrycode.png".
Only png is supported.
Validity
Set the value of this token to "false", if the unit is old,
obsolete, unusual or not valid anymore. The unit will be displayed with
a grey textcolor in the combo box. Otherwise a black textcolor is shown.
Valid values for the Validity are "true" and "false".
Selection
This token will be evaluated if the category will change. Valid
values are:
source = unit will be used as source
target = unit will be used as target
source,target = unit will be used as source and target