jmri.jmrit.symbolicprog
Class ShortAddrVariableValue

java.lang.Object
  extended by jmri.jmrit.symbolicprog.AbstractValue
      extended by jmri.jmrit.symbolicprog.VariableValue
          extended by jmri.jmrit.symbolicprog.DecVariableValue
              extended by jmri.jmrit.symbolicprog.ShortAddrVariableValue
All Implemented Interfaces:
ActionListener, FocusListener, PropertyChangeListener, EventListener

public class ShortAddrVariableValue
extends DecVariableValue

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 there 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.

Author:
Bob Jacobsen Copyright (C) 2001, 2006, 2007

Nested Class Summary
 
Nested classes/interfaces inherited from class jmri.jmrit.symbolicprog.DecVariableValue
DecVariableValue.VarTextField
 
Field Summary
 
Fields inherited from class jmri.jmrit.symbolicprog.VariableValue
_cvVector, _status, _tooltipText
 
Fields inherited from class jmri.jmrit.symbolicprog.AbstractValue
DIFF, EDITED, FROMFILE, READ, SAME, STORED, UNKNOWN
 
Constructor Summary
ShortAddrVariableValue(String name, String comment, String cvName, boolean readOnly, boolean infoOnly, boolean writeOnly, boolean opsOnly, int cvNum, String mask, Vector<CvValue> v, JLabel status, String stdname)
           
 
Method Summary
 void dispose()
           
 void setModifiedCV(int cvNum)
          Register a CV to be modified regardless of current value
 void writeAll()
          Always write the contents of this Variable
 void writeChanges()
          Write 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, focusGained, focusLost, getCommonRep, getIntValue, getNewRep, getValueObject, getValueString, isChanged, propertyChange, rangeVal, readAll, readChanges, setAvailable, setCvState, setIntValue, setToolTipText, setValue, usesCVs
 
Methods inherited from class jmri.jmrit.symbolicprog.VariableValue
confirmAll, considerChanged, cvName, getComment, getCvNum, getInfoOnly, getMask, getOpsOnly, getReadOnly, getState, getTextValue, getWriteOnly, isBusy, isToRead, isToWrite, item, label, maskVal, newValue, offsetVal, setBusy, setState, setToRead, setToWrite, updateRepresentation
 
Methods inherited from class jmri.jmrit.symbolicprog.AbstractValue
addPropertyChangeListener, getAvailable, removePropertyChangeListener, stateNameFromValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShortAddrVariableValue

public ShortAddrVariableValue(String name,
                              String comment,
                              String cvName,
                              boolean readOnly,
                              boolean infoOnly,
                              boolean writeOnly,
                              boolean opsOnly,
                              int cvNum,
                              String mask,
                              Vector<CvValue> v,
                              JLabel status,
                              String stdname)
Method Detail

setModifiedCV

public void setModifiedCV(int cvNum)
Register a CV to be modified regardless of current value


writeChanges

public void writeChanges()
Description copied from class: VariableValue
Write the contents of this Variable if it's in a state that indicates it was "changed"

Overrides:
writeChanges in class DecVariableValue
See Also:
VariableValue.isChanged()

writeAll

public void writeAll()
Description copied from class: VariableValue
Always write the contents of this Variable

Overrides:
writeAll in class DecVariableValue

dispose

public void dispose()
Overrides:
dispose in class DecVariableValue


Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads