|
||||||||||
| 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.ConstantValue
public class ConstantValue
Extends VariableValue to represent a constant enum-like-thing Note that there's no CV associated with this.
| 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 | |
|---|---|
ConstantValue()
Create a null object. |
|
ConstantValue(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)
|
|
| Method Summary | |
|---|---|
void |
dispose()
|
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()
Skip actually reading, but set states and notifications anyway. |
void |
readChanges()
Read the contents of this Variable if it's in a state that indicates it was "changed" |
void |
setCvState(int state)
No connected CV, so this notify does nothing |
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()
Skip actually writing, but set states and notifications anyway. |
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 |
|---|
confirmAll, 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, setAvailable, stateNameFromValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConstantValue(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)
public ConstantValue()
| 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 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 setCvState(int state)
setCvState in class VariableValuestate - public boolean isChanged()
VariableValue
isChanged in class VariableValueVariableValue.considerChanged(jmri.jmrit.symbolicprog.CvValue)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 void readChanges()
VariableValue
readChanges in class VariableValueVariableValue.isChanged()public void writeChanges()
VariableValue
writeChanges in class VariableValueVariableValue.isChanged()public void readAll()
This sets the state to READ so that you can have algorithms like "write all variables that aren't in READ state" This is different from the 'normal' VariableValue objects, which rely on the associated CV objects to drive state changes at the end of the write.
readAll in class VariableValuepublic void writeAll()
This sets the state to STORED so that you can have algorithms like "write all variables that aren't in STORED state" This is different from the 'normal' VariableValue objects, which rely on the associated CV objects to drive state changes at the end of the write.
writeAll 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 | |||||||||