|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrit.symbolicprog.AbstractValue
jmri.jmrit.symbolicprog.VariableValue
jmri.jmrit.symbolicprog.IndexedPairVariableValue
public class IndexedPairVariableValue
Extends VariableValue to represent a indexed variable split across two indexed CVs. Factor is the multiplier of the value in the high order CV Value to put in High CV = (value in text field)/Factor Value to put in Low CV = (value in text field) - High CV value Value to put in text field = ((value in High CV) * Factor) + Low CV
| Nested Class Summary | |
|---|---|
class |
IndexedPairVariableValue.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 | |
|---|---|
IndexedPairVariableValue(int row,
String name,
String comment,
String cvName,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
boolean opsOnly,
int cvNum,
String mask,
int minVal,
int maxVal,
Vector<CvValue> v,
JLabel status,
String stdname,
int secondCVrow,
String pSecondCV,
int pFactor,
int pOffset,
String uppermask)
|
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
ActionListener implementations |
void |
confirmAll()
Confirm the contents of this Variable |
void |
dispose()
|
void |
focusGained(FocusEvent e)
FocusListener implementations |
void |
focusLost(FocusEvent e)
|
Component |
getCommonRep()
|
int |
getIntValue()
Get the value as a single number. |
Component |
getNewRep(String format)
|
Object |
getValueObject()
|
String |
getValueString()
|
boolean |
isChanged()
Determine whether this Variable is "changed", so that "read changes" and "write changes" will act on it. |
boolean |
isToRead()
Simple implementation for the case of a single CV. |
boolean |
isToWrite()
Simple implementation for the case of a single CV. |
void |
propertyChange(PropertyChangeEvent e)
|
Object |
rangeVal()
|
void |
readAll()
Always read the contents of this Variable |
void |
readChanges()
Read the contents of this Variable if it's in a state that indicates it was "changed" |
void |
setAvailable(boolean a)
|
void |
setCvState(int state)
Notify the connected CVs of a state change from above |
void |
setIntValue(int i)
Set the value from a single number. |
void |
setToolTipText(String t)
Set tooltip text to be used by both the "value" and representations of this Variable. |
void |
setToRead(boolean state)
Simple implementation for the case of a single CV. |
void |
setToWrite(boolean state)
Simple implementation for the case of a single CV. |
void |
setValue(int value)
|
CvValue[] |
usesCVs()
Provide access to CVs referenced by this operation |
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.VariableValue |
|---|
considerChanged, cvName, getComment, 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 |
| Constructor Detail |
|---|
public IndexedPairVariableValue(int row,
String name,
String comment,
String cvName,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
boolean opsOnly,
int cvNum,
String mask,
int minVal,
int maxVal,
Vector<CvValue> v,
JLabel status,
String stdname,
int secondCVrow,
String pSecondCV,
int pFactor,
int pOffset,
String uppermask)
| Method Detail |
|---|
public CvValue[] usesCVs()
VariableValue
usesCVs in class VariableValuepublic void setToolTipText(String t)
VariableValueThis is expected to be overridden in subclasses to change their internal info.
setToolTipText in class VariableValueVariableValue.updateRepresentation(javax.swing.JComponent)public Object rangeVal()
rangeVal in class VariableValuepublic void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic void focusGained(FocusEvent e)
focusGained in interface FocusListenerpublic void focusLost(FocusEvent e)
focusLost in interface FocusListenerpublic String getValueString()
getValueString in class VariableValuepublic void setIntValue(int i)
VariableValue
setIntValue in class VariableValuepublic int getIntValue()
VariableValue
getIntValue in class VariableValuepublic Object getValueObject()
getValueObject in class VariableValuepublic Component getCommonRep()
getCommonRep in class VariableValuepublic void setValue(int value)
public Component getNewRep(String format)
getNewRep in class VariableValuepublic void setAvailable(boolean a)
setAvailable in class AbstractValuepublic void setCvState(int state)
setCvState in class VariableValuestate - public void setToRead(boolean state)
VariableValue
setToRead in class VariableValuepublic boolean isToRead()
VariableValue
isToRead in class VariableValuepublic void setToWrite(boolean state)
VariableValue
setToWrite in class VariableValuepublic boolean isToWrite()
VariableValue
isToWrite in class VariableValuepublic boolean isChanged()
VariableValue
isChanged in class VariableValueVariableValue.considerChanged(jmri.jmrit.symbolicprog.CvValue)public void readChanges()
VariableValue
readChanges in class VariableValueVariableValue.isChanged()public void writeChanges()
VariableValue
writeChanges in class VariableValueVariableValue.isChanged()public void readAll()
VariableValue
readAll in class VariableValuepublic void writeAll()
VariableValue
writeAll in class VariableValuepublic void confirmAll()
VariableValue
confirmAll in class VariableValuepublic void propertyChange(PropertyChangeEvent e)
propertyChange in interface PropertyChangeListenerpropertyChange in class VariableValuepublic void dispose()
dispose in class VariableValue
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||