Class CompositeVariableValue

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.beans.PropertyChangeListener, java.util.EventListener

    public class CompositeVariableValue
    extends EnumVariableValue
    Extends EnumVariableValue to represent a composition of variable values.

    Internally, each "choice" is stored as a list of "setting" items. Numerical values for this type of variable (itself) are strictly sequential, because they are arbitrary.

    This version of the class has certain limitations:

    1. Variables referenced in the definition of one of these must have already been declared earlier in the decoder file. This prevents circular references, and makes it much easier to find the target variables.
    2. This version of the variable never changes "State" (color), though it does track its value from changes to other variables.
    3. There should be a final choice (entry) that doesn't define any settings. This will then form the default value when the target variables change.
    4. Programming operations on a variable of this type doesn't do anything, because there doesn't seem to be a consistent model of what "read changes" and "write changes" should do. This has two implications:
      • Variables referenced as targets must appear on some programming pane, or they won't be updated by programming operations.
      • If this variable references variables that are not on this pane, the user needs to do a read/write all panes operation to record the changes made to this variable.
      It's therefore recommended that a CompositeVariableValue just make changes to target variables on the same programming page.
    5. To apply a mask when setting a value, use an intermediary variable set from here, which in turn references the goal variable with a mask.