Inherits ScriptObject.
Public Member Functions | |
ModalGroup () | |
setStrict (Boolean strict) | |
setAutoReset (Boolean autoreset) | |
setLogUndefined (Boolean logundefined) | |
Integer | getNumberOfGroups () |
Integer | getNumberOfCodes () |
Integer | getNumberOfCodesInGroup (Integer group) |
Boolean | isCodeDefined (Integer code) |
Boolean | isActiveCode (Integer code) |
makeActiveCode (Integer code) | |
Integer | getActiveCode (Integer group) |
Boolean | hasActiveCode (Integer group) |
reset () | |
Integer | resetGroup (Integer group) |
Integer | createGroup () |
removeCode (Integer code) | |
addCode (Integer group, Integer code) | |
Boolean | isGroup (Integer group) |
Integer | getGroup (Integer code) |
Boolean | inSameGroup (Integer a, Integer b) |
Boolean | isEnabled () |
enable () | |
disable () | |
setForce (Boolean force) | |
setFormatNumber (FormatNumber formatNumber) | |
setPrefix (String prefix) | |
setSuffix (String suffix) | |
String | format (Integer code) |
A modal group.
Use createModalGroup() to construct the object.
ModalGroup | ( | ) |
Construct a new modal group.
Adds the specified code to the given group.
group | The group. |
code | The code. |
Integer createGroup | ( | ) |
Creates a new group.
disable | ( | ) |
Disables the output.
enable | ( | ) |
Enables the output.
Returns the formatted code.
Code must be defined in strict mode. If code is not defined in non-strict mode than the codes is output always.
Returns the group id for the specified code.
Integer getNumberOfCodes | ( | ) |
Returns the total number of defined codes.
Returns the number of codes in the specified group.
Integer getNumberOfGroups | ( | ) |
Returns the number of groups.
Returns true if the specified codes are in the same group.
Boolean isEnabled | ( | ) |
Returns true if enabled.
makeActiveCode | ( | Integer | code | ) |
Marks the specified code as active within its group.
removeCode | ( | Integer | code | ) |
Removes the specified code.
code | The code. |
reset | ( | ) |
Resets all groups.
Resets the specified group.
group | The group. |
setAutoReset | ( | Boolean | autoreset | ) |
Sets the auto-reset mode. All groups are reset if an undefined code is output. Only appplies in non-strict mode.
setForce | ( | Boolean | force | ) |
Sets the force mode.
setFormatNumber | ( | FormatNumber | formatNumber | ) |
Sets the format.
setLogUndefined | ( | Boolean | logundefined | ) |
Enables output of for use of undefined codes. Only on the first usage.
setPrefix | ( | String | prefix | ) |
Sets the prefix.
setStrict | ( | Boolean | strict | ) |
Sets the strict mode.
setSuffix | ( | String | suffix | ) |
Sets the suffix.