jmri.jmrit.symbolicprog
Class IndexedVariableValue

Show UML class diagram
java.lang.Object
  extended by jmri.jmrit.symbolicprog.AbstractValue
      extended by jmri.jmrit.symbolicprog.VariableValue
          extended by jmri.jmrit.symbolicprog.IndexedVariableValue
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.FocusListener, java.beans.PropertyChangeListener, java.util.EventListener

Deprecated. // since 3.7.1

@Deprecated
public class IndexedVariableValue
extends VariableValue
implements java.awt.event.ActionListener, java.beans.PropertyChangeListener, java.awt.event.FocusListener

Extends VariableValue to represent an indexed variable


Nested Class Summary
 class IndexedVariableValue.VarTextField
          Deprecated.  
 
Field Summary
(package private)  java.awt.Color _defaultColor
          Deprecated.  
(package private)  int _maxVal
          Deprecated.  
(package private)  int _minVal
          Deprecated.  
(package private)  javax.swing.JTextField _value
          Deprecated.  
(package private) static org.slf4j.Logger log
          Deprecated.  
(package private)  java.lang.String oldContents
          Deprecated.  
(package private)  java.util.ArrayList<IndexedVarSlider> sliders
          Deprecated.  
(package private)  java.util.ArrayList<IndexedVariableValue.VarTextField> valuereps
          Deprecated.  
 
Fields inherited from class jmri.jmrit.symbolicprog.VariableValue
_cvMap, _status, _tooltipText
 
Fields inherited from class jmri.jmrit.symbolicprog.AbstractValue
COLOR_DIFF, COLOR_EDITED, COLOR_FROMFILE, COLOR_READ, COLOR_SAME, COLOR_STORED, COLOR_UNKNOWN, DIFF, EDITED, FROMFILE, prop, READ, SAME, STORED, UNKNOWN
 
Constructor Summary
protected IndexedVariableValue()
          Deprecated. Create a null object.
  IndexedVariableValue(java.lang.String name, java.lang.String comment, java.lang.String cvName, boolean readOnly, boolean infoOnly, boolean writeOnly, boolean opsOnly, java.lang.String cvNum, java.lang.String mask, int minVal, int maxVal, java.util.HashMap<java.lang.String,CvValue> v, javax.swing.JLabel status, java.lang.String stdname)
          Deprecated.  
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Deprecated. ActionListener implementations
 void confirmAll()
          Deprecated. Confirm the contents of this Variable
 void dispose()
          Deprecated.  
(package private)  void enterField()
          Deprecated.  
(package private)  void exitField()
          Deprecated.  
 void focusGained(java.awt.event.FocusEvent e)
          Deprecated. FocusListener implementations
 void focusLost(java.awt.event.FocusEvent e)
          Deprecated.  
(package private)  java.awt.Color getColor()
          Deprecated.  
 java.awt.Component getCommonRep()
          Deprecated.  
 java.lang.String getCvDescription()
          Deprecated. Provide a user-readable description of the CVs accessed by this variable.
(package private)  java.awt.Color getDefaultColor()
          Deprecated.  
 int getIntValue()
          Deprecated. Get the value as a single number.
 java.awt.Component getNewRep(java.lang.String format)
          Deprecated.  
 java.lang.Object getValueObject()
          Deprecated.  
 java.lang.String getValueString()
          Deprecated.  
 boolean isChanged()
          Deprecated. Determine whether this Variable is "changed", so that "read changes" and "write changes" will act on it.
 boolean isToRead()
          Deprecated. Simple implementation for the case of a single CV.
 boolean isToWrite()
          Deprecated. Simple implementation for the case of a single CV.
 void propertyChange(java.beans.PropertyChangeEvent e)
          Deprecated.  
 java.lang.Object rangeVal()
          Deprecated.  
 void readAll()
          Deprecated. Always read the contents of this Variable
 void readChanges()
          Deprecated. Read the contents of this Variable if it's in a state that indicates it was "changed"
 void setAvailable(boolean a)
          Deprecated.  
(package private)  void setColor(java.awt.Color c)
          Deprecated.  
 void setCvState(int state)
          Deprecated. Notify the connected CVs of a state change from above
 void setIntValue(int i)
          Deprecated. Set the value from a single number.
 void setToolTipText(java.lang.String t)
          Deprecated. Set tooltip text to be used by both the "value" and representations of this Variable.
 void setToRead(boolean state)
          Deprecated. Simple implementation for the case of a single CV.
 void setToWrite(boolean state)
          Deprecated. Simple implementation for the case of a single CV.
 void setValue(int value)
          Deprecated. Set a new value, including notification as needed.
(package private)  void updatedTextField()
          Deprecated.  
 CvValue[] usesCVs()
          Deprecated. Provide access to CVs referenced by this operation
 void writeAll()
          Deprecated. Always write the contents of this Variable
 void writeChanges()
          Deprecated. Write the contents of this Variable if it's in a state that indicates it was "changed"
 
Methods inherited from class jmri.jmrit.symbolicprog.VariableValue
considerChanged, cvName, getComment, getCvName, getCvNum, getInfoOnly, getMask, getOpsOnly, getReadOnly, getState, getTextValue, getWriteOnly, isBusy, item, label, maskVal, newValue, offsetVal, setBusy, setState, 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
 

Field Detail

_maxVal

int _maxVal
Deprecated. 

_minVal

int _minVal
Deprecated. 

oldContents

java.lang.String oldContents
Deprecated. 

sliders

java.util.ArrayList<IndexedVarSlider> sliders
Deprecated. 

valuereps

java.util.ArrayList<IndexedVariableValue.VarTextField> valuereps
Deprecated. 

_defaultColor

java.awt.Color _defaultColor
Deprecated. 

_value

javax.swing.JTextField _value
Deprecated. 

log

static org.slf4j.Logger log
Deprecated. 
Constructor Detail

IndexedVariableValue

public IndexedVariableValue(java.lang.String name,
                            java.lang.String comment,
                            java.lang.String cvName,
                            boolean readOnly,
                            boolean infoOnly,
                            boolean writeOnly,
                            boolean opsOnly,
                            java.lang.String cvNum,
                            java.lang.String mask,
                            int minVal,
                            int maxVal,
                            java.util.HashMap<java.lang.String,CvValue> v,
                            javax.swing.JLabel status,
                            java.lang.String stdname)
Deprecated. 
Parameters:
cvName - address of this indexed CV e.g. "12.34.56"
cvNum - the CV finally written after the index operations

IndexedVariableValue

protected IndexedVariableValue()
Deprecated. 
Create a null object. Normally only used for tests and to pre-load classes.

Method Detail

setToolTipText

public void setToolTipText(java.lang.String t)
Deprecated. 
Description copied from class: VariableValue
Set tooltip text to be used by both the "value" and representations of this Variable.

This is expected to be overridden in subclasses to change their internal info.

Overrides:
setToolTipText in class VariableValue
See Also:
VariableValue.updateRepresentation(javax.swing.JComponent)

usesCVs

public CvValue[] usesCVs()
Deprecated. 
Description copied from class: VariableValue
Provide access to CVs referenced by this operation

Specified by:
usesCVs in class VariableValue

rangeVal

public java.lang.Object rangeVal()
Deprecated. 
Specified by:
rangeVal in class VariableValue

getCvDescription

public java.lang.String getCvDescription()
Deprecated. 
Provide a user-readable description of the CVs accessed by this variable.

Overrides:
getCvDescription in class VariableValue

enterField

void enterField()
Deprecated. 

exitField

void exitField()
Deprecated. 

updatedTextField

void updatedTextField()
Deprecated. 
Overrides:
updatedTextField in class VariableValue

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Deprecated. 
ActionListener implementations

Specified by:
actionPerformed in interface java.awt.event.ActionListener

focusGained

public void focusGained(java.awt.event.FocusEvent e)
Deprecated. 
FocusListener implementations

Specified by:
focusGained in interface java.awt.event.FocusListener

focusLost

public void focusLost(java.awt.event.FocusEvent e)
Deprecated. 
Specified by:
focusLost in interface java.awt.event.FocusListener

getValueString

public java.lang.String getValueString()
Deprecated. 
Specified by:
getValueString in class VariableValue
Returns:
String that can (usually) be interpreted as an integer

setIntValue

public void setIntValue(int i)
Deprecated. 
Description copied from class: VariableValue
Set the value from a single number. In some cases, e.g. speed tables, this will result in complex behavior, where setIntValue(getIntValue()) results in something unexpected.

Specified by:
setIntValue in class VariableValue

getIntValue

public int getIntValue()
Deprecated. 
Description copied from class: VariableValue
Get the value as a single number. In some cases, e.g. speed tables, this will result in complex behavior, where setIntValue(getIntValue()) results in something unexpected.

Specified by:
getIntValue in class VariableValue

getValueObject

public java.lang.Object getValueObject()
Deprecated. 
Specified by:
getValueObject in class VariableValue
Returns:
Value as a native-form Object

getCommonRep

public java.awt.Component getCommonRep()
Deprecated. 
Specified by:
getCommonRep in class VariableValue

getNewRep

public java.awt.Component getNewRep(java.lang.String format)
Deprecated. 
Specified by:
getNewRep in class VariableValue

setAvailable

public void setAvailable(boolean a)
Deprecated. 
Overrides:
setAvailable in class AbstractValue

setValue

public void setValue(int value)
Deprecated. 
Set a new value, including notification as needed. This does the conversion from string to int, so if the place where formatting needs to be applied


getDefaultColor

java.awt.Color getDefaultColor()
Deprecated. 

getColor

java.awt.Color getColor()
Deprecated. 

setColor

void setColor(java.awt.Color c)
Deprecated. 
Specified by:
setColor in class AbstractValue

setCvState

public void setCvState(int state)
Deprecated. 
Notify the connected CVs of a state change from above

Specified by:
setCvState in class VariableValue
Parameters:
state -

setToRead

public void setToRead(boolean state)
Deprecated. 
Description copied from class: VariableValue
Simple implementation for the case of a single CV. Intended to be sufficient for many subclasses.

Overrides:
setToRead in class VariableValue

isToRead

public boolean isToRead()
Deprecated. 
Description copied from class: VariableValue
Simple implementation for the case of a single CV. Intended to be sufficient for many subclasses.

Overrides:
isToRead in class VariableValue

setToWrite

public void setToWrite(boolean state)
Deprecated. 
Description copied from class: VariableValue
Simple implementation for the case of a single CV. Intended to be sufficient for many subclasses.

Overrides:
setToWrite in class VariableValue

isToWrite

public boolean isToWrite()
Deprecated. 
Description copied from class: VariableValue
Simple implementation for the case of a single CV. Intended to be sufficient for many subclasses.

Overrides:
isToWrite in class VariableValue

isChanged

public boolean isChanged()
Deprecated. 
Description copied from class: VariableValue
Determine whether this Variable is "changed", so that "read changes" and "write changes" will act on it.

Specified by:
isChanged in class VariableValue
See Also:
VariableValue.considerChanged(jmri.jmrit.symbolicprog.CvValue)

readChanges

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

Specified by:
readChanges in class VariableValue
See Also:
VariableValue.isChanged()

writeChanges

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

Specified by:
writeChanges in class VariableValue
See Also:
VariableValue.isChanged()

readAll

public void readAll()
Deprecated. 
Description copied from class: VariableValue
Always read the contents of this Variable

Specified by:
readAll in class VariableValue

writeAll

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

Specified by:
writeAll in class VariableValue

confirmAll

public void confirmAll()
Deprecated. 
Description copied from class: VariableValue
Confirm the contents of this Variable

Overrides:
confirmAll in class VariableValue

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent e)
Deprecated. 
Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Specified by:
propertyChange in class VariableValue

dispose

public void dispose()
Deprecated. 
Specified by:
dispose in class VariableValue


Copyright © 1997-2014 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