The ParameterElement is the common component to display and edit most types of M&C parameters. Depending on the data type of the parameter (the data type is detected automatically) the parameter elements appears as textual / numeric entry field, choice box or as display field for read only parameters.
Data Model (extends ScreenElement)
| Key | Type | Value |
|---|---|---|
| type | String | Always "ParameterElement". |
| xpos | Number | see ScreenElement |
| ypos | Number | see ScreenElement |
| width | Number | see ScreenElement |
| height | Number | see ScreenElement |
| id | String | The message ID this element listens to |
| privilege | Number | The privilege level requires to change this parameter |
| label | String | A label shown above the field / drop down |
| enableId | String | The enable ID (may be empty) |
| enableValue | String | The value which must be matched to enable the field |
| font | String | The font to be used |
| color | String | The color used for the label (#RRGGBB) |
| mustQuery | Boolean | true = show a query popup before changing the value |
| queryText | String | The text to show in the query. If empty, a default query text shall be used. |
| useSpinButtons | Boolean | true = use spin buttons for numeric values |
| spinSmallIncrement | String | Small spin increment, empty = use default |
| spinLargeIncrement | String | Large spin increment, empty = use default |
| useComboBox | Boolean | true = use a searchable combobox |
| editableComboBox | Boolean | true = allow free text edit in the box |
| variableBackgroundColor | Boolean | true = use a variable background color. |
| colorId | String | The message ID to listen for the background color |
| colors | Array | of ColorDefinition objects. Defines how to translate values of the colorId parameter to color values. |
Remarks
Widget Variants: Depending on the type of parameter and on the height parameter there are different widget types associated with the ParameterElement. As the parameter type is not known at the time the screen definition is read, the decision what widget type shall be used must be done after the parameter type description has been received from the server.
| Parameter Type | height < 40 | height >= 40 |
|---|---|---|
| Text | single line entry field | multi line entry field, scrollable if text does not fit into the field |
| Numeric | single line entry field | single line entry field |
| Enum/Choice | drop down or combo box | scrollable list selection |
| r/o Text | single line display | multi line display, scrollable if text does not fit into the field |
| r/o Numeric | single line display | single line display |
| r/o Enum/Choice | single line display | single line display |
Conditionally Enable: If the enableId property is not empty, the ParameterElement subscribes for this additional parameter and disables (disabled means "dimmed, not changeable") the widget unless the received parameter value matches the values stated in enableValue.
Font Selection: The sat-nms software defines 6 preset fonts named 'small', 'plain', 'bold', 'title', 'huge' and 'typewriter'. The font property contains one of these names. The selected font is used for the text in the widget, the label above the entry field always is shown with the 'plain' font, unless font reads 'small', in this case the label is shown with the 'small' font as well. For information about fonts and font sizes see section Fonts in the appendix of this document.
Operator Query: If the property mustQuery reads 'true', the ParameterElement pops up a 'Do you really want...' dialog before a parameter change is sent to the server. queryText contains the question to be shown in this case. In the question text, placeholders may used for two values: Any occurrences of the pattern $P get replaced by the parameter name (message ID). Any occurrences of the pattern $V get replaced by the new value to set. If queryText is empty, the ParameterElement uses a standard text instead.
Spin Buttons: With useSpinButtons set 'true', the ParameterElement shows spin buttons with editable numberic values. The spin buttons allow to increment/decrement the value by clicking on them. By default, a spin button click increments or decrements the lowest significant digit shown in the entry field. With the shift key hold down, the effective increment is x10. The above applies if the spinSmallIncrement / spinLargeIncrement properties are empty. If set, these values override the defaults.
ComboBox Variants: For CHOICE parameter the ParameterElement normally uses a simple drop down box. With selection parameter with a handful of choices this easy to operate. There are however situations where the ParameterElement must handle hundreds of choices (e.g. in satellite channel lists). For this the ParameterElement provides variants of the simple drop down box.
With the useComboBox parameter set 'true', the ParameterElement uses a special combo box, which implements some filtering on the displayed choices. The operator may enter some text into the edit field of the combo box and only choices which (partially) contain the the entered text are offered for selection.
With the editableComboBox parameter set 'true', the ParameterElement permits to send any entered text as the new parameter value to the server, not only one of the valid choices for this parameter.
Variable Background Color: With the variableBackgroundColor parameter set 'true', the ParameterElement listens to the additional parameter stated in colorId and sets the background color of the widget according to the value received. The received value is translated to a color (and optional 'bold' printing) through the colors array. If the received value does not match any of the values listed in the array, the first entry in the array is used as a default / fallback.