|
||||||||||
| 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.DecVariableValue
public class DecVariableValue
Decimal representation of a value.
| Nested Class Summary | |
|---|---|
class |
DecVariableValue.VarTextField
|
| Field Summary | |
|---|---|
(package private) Color |
_defaultColor
|
(package private) int |
_maxVal
|
(package private) int |
_minVal
|
(package private) JTextField |
_value
|
(package private) static org.slf4j.Logger |
log
|
(package private) String |
oldContents
|
(package private) List<Component> |
reps
|
(package private) ArrayList<DecVarSlider> |
sliders
|
| Fields inherited from class jmri.jmrit.symbolicprog.VariableValue |
|---|
_cvVector, _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 | |
|---|---|
DecVariableValue(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 |
actionPerformed(ActionEvent e)
ActionListener implementations |
void |
dispose()
|
(package private) void |
enterField()
|
(package private) void |
exitField()
|
void |
focusGained(FocusEvent e)
FocusListener implementations |
void |
focusLost(FocusEvent e)
|
(package private) Color |
getColor()
|
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. |
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)
|
(package private) void |
setColor(Color c)
|
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 |
setValue(int value)
Set a new value, including notification as needed. |
(package private) void |
updatedTextField()
Invoked when a permanent change to the JTextField has been made. |
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 |
|---|
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 |
| Field Detail |
|---|
int _maxVal
int _minVal
String oldContents
List<Component> reps
ArrayList<DecVarSlider> sliders
Color _defaultColor
JTextField _value
static org.slf4j.Logger log
| Constructor Detail |
|---|
public DecVariableValue(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 Detail |
|---|
public 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 CvValue[] usesCVs()
VariableValue
usesCVs in class VariableValuepublic Object rangeVal()
rangeVal in class VariableValuevoid enterField()
void exitField()
void updatedTextField()
updatedTextField 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 setAvailable(boolean a)
setAvailable in class AbstractValuepublic Component getNewRep(String format)
getNewRep in class VariableValuepublic void setValue(int value)
Color getColor()
void setColor(Color c)
setColor in class AbstractValuepublic void setCvState(int state)
setCvState in class VariableValuestate - public 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 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 | |||||||||