Package jmri.jmrit.symbolicprog
Class ShortAddrVariableValue
java.lang.Object
jmri.jmrit.symbolicprog.AbstractValue
jmri.jmrit.symbolicprog.VariableValue
jmri.jmrit.symbolicprog.DecVariableValue
jmri.jmrit.symbolicprog.ShortAddrVariableValue
- All Implemented Interfaces:
ActionListener,FocusListener,PropertyChangeListener,EventListener
Representation of a short address (CV1).
This is a decimal value, extended to modify the other CVs when written. The CVs to be modified and their new values are stored in two arrays for simplicity.
The NMRA has decided that writing CV1 causes other CVs to update within the decoder (CV19 for consisting, CV29 for short/long address). We want DP to overwrite those _after_ writing CV1, so that the DP values are forced to be the correct ones.
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.jmrit.symbolicprog.DecVariableValue
DecVariableValue.VarTextFieldNested classes/interfaces inherited from class jmri.jmrit.symbolicprog.AbstractValue
AbstractValue.ValueState -
Field Summary
FieldsModifier and TypeFieldDescription(package private) String[](package private) int(package private) static final int(package private) int[]Fields inherited from class jmri.jmrit.symbolicprog.DecVariableValue
_defaultColor, _factor, _maxVal, _minVal, _offset, _value, oldContents, reps, slidersFields inherited from class jmri.jmrit.symbolicprog.VariableValue
_cvMap, _status, _tooltipTextFields inherited from class jmri.jmrit.symbolicprog.AbstractValue
prop -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Dispose of the object.voidsetModifiedCV(String cvNum) Register a CV to be modified regardless of current value.voidwriteAll()Always write the contents of this Variable.voidWrite the contents of this Variable if it's in a state that indicates it was "changed".Methods inherited from class jmri.jmrit.symbolicprog.DecVariableValue
actionPerformed, enterField, exitField, fieldLength, focusGained, focusLost, getColor, getCommonRep, getDefaultColor, getIntValue, getNewRep, getValueObject, getValueString, isChanged, propertyChange, rangeVal, readAll, readChanges, setAvailable, setColor, setCvState, setIntValue, setToolTipText, setValue, textToValue, updatedTextField, usesCVs, valueToTextMethods inherited from class jmri.jmrit.symbolicprog.VariableValue
confirmAll, considerChanged, cvName, getComment, getCvDescription, getCvName, getCvNum, getInfoOnly, getLongValue, getMask, getMaxMask, getOpsOnly, getReadOnly, getState, getTextValue, getValueInCV, getWriteOnly, isBitMask, isBusy, isToRead, isToWrite, item, label, maskValAsInt, offsetVal, setBusy, setState, setToRead, setToWrite, setValue, setValueInCV, simplifyMask, updateRepresentationMethods inherited from class jmri.jmrit.symbolicprog.AbstractValue
addPropertyChangeListener, getAvailable, removePropertyChangeListener
-
Field Details
-
firstFreeSpace
int firstFreeSpace -
maxCVs
- See Also:
-
cvNumbers
-
newValues
int[] newValues
-
-
Constructor Details
-
ShortAddrVariableValue
-
-
Method Details
-
setModifiedCV
Register a CV to be modified regardless of current value.- Parameters:
cvNum- cv number string.
-
writeChanges
Description copied from class:VariableValueWrite the contents of this Variable if it's in a state that indicates it was "changed".- Overrides:
writeChangesin classDecVariableValue- See Also:
-
writeAll
Description copied from class:VariableValueAlways write the contents of this Variable.- Overrides:
writeAllin classDecVariableValue
-
dispose
Description copied from class:VariableValueDispose of the object.- Overrides:
disposein classDecVariableValue
-