Package jmri.jmrit.symbolicprog
Class SplitHexVariableValue
- java.lang.Object
-
- jmri.jmrit.symbolicprog.AbstractValue
-
- jmri.jmrit.symbolicprog.VariableValue
-
- jmri.jmrit.symbolicprog.SplitVariableValue
-
- jmri.jmrit.symbolicprog.SplitHexVariableValue
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.FocusListener
,java.beans.PropertyChangeListener
,java.util.EventListener
public class SplitHexVariableValue extends SplitVariableValue
LikeSplitVariableValue
, except that the string representation is in hexadecimal
All the attributes ofSplitVariableValue
are inherited.
An optionalcase
attribute can be used to force the hex characters to display in"upper"
or"lower"
case.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jmri.jmrit.symbolicprog.SplitVariableValue
SplitVariableValue.CvItem, SplitVariableValue.VarTextField
-
Nested classes/interfaces inherited from class jmri.jmrit.symbolicprog.AbstractValue
AbstractValue.ValueState
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.String
_case
-
Fields inherited from class jmri.jmrit.symbolicprog.SplitVariableValue
_columns, _cvNum, _defaultColor, _fieldShrink, _mask, _maskArray, _maxVal, _minVal, _name, _textField, _uppermask, currentOffset, cvCount, cvList, mFactor, mOffset, mSecondCV, oldContents, reps
-
Fields inherited from class jmri.jmrit.symbolicprog.VariableValue
_cvMap, _status, _tooltipText
-
Fields inherited from class jmri.jmrit.symbolicprog.AbstractValue
prop
-
-
Constructor Summary
Constructors Constructor Description SplitHexVariableValue(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, java.lang.String pSecondCV, int pFactor, int pOffset, java.lang.String uppermask, java.lang.String extra1, java.lang.String extra2, java.lang.String extra3, java.lang.String extra4)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.lang.String
getTextFromValue(long v)
(package private) long
getValueFromText(java.lang.String s)
void
setValue(java.lang.String value)
Set value from a String value.void
stepOneActions(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, java.lang.String pSecondCV, int pFactor, int pOffset, java.lang.String uppermask, java.lang.String extra1, java.lang.String extra2, java.lang.String extra3, java.lang.String extra4)
Subclasses can override this to pick up constructor-specific attributes and perform other actions before cvList has been built.-
Methods inherited from class jmri.jmrit.symbolicprog.SplitVariableValue
actionPerformed, dispose, enterField, exitField, focusGained, focusLost, getCommonRep, getCvDescription, getCvNum, getCvValsFromTextField, getIntValue, getLongValue, getMask, getMask, getNewRep, getValueObject, getValueString, isChanged, isToRead, isToWrite, priorityValue, propertyChange, rangeVal, readAll, readChanges, setAvailable, setColor, setCvState, setIntValue, setLongValue, setToolTipText, stepTwoActions, updatedTextField, updateVariableValue, usesCVs, writeAll, writeChanges
-
Methods inherited from class jmri.jmrit.symbolicprog.VariableValue
confirmAll, considerChanged, cvName, getComment, getCvName, getInfoOnly, getMaxMask, getOpsOnly, getReadOnly, getState, getTextValue, getValueInCV, getWriteOnly, isBitMask, isBusy, item, label, maskValAsInt, offsetVal, setBusy, setState, setToRead, setToWrite, setValueInCV, simplifyMask, updateRepresentation
-
Methods inherited from class jmri.jmrit.symbolicprog.AbstractValue
addPropertyChangeListener, getAvailable, removePropertyChangeListener
-
-
-
-
Field Detail
-
_case
java.lang.String _case
-
-
Constructor Detail
-
SplitHexVariableValue
public SplitHexVariableValue(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, java.lang.String pSecondCV, int pFactor, int pOffset, java.lang.String uppermask, java.lang.String extra1, java.lang.String extra2, java.lang.String extra3, java.lang.String extra4)
-
-
Method Detail
-
stepOneActions
public void stepOneActions(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, java.lang.String pSecondCV, int pFactor, int pOffset, java.lang.String uppermask, java.lang.String extra1, java.lang.String extra2, java.lang.String extra3, java.lang.String extra4)
Description copied from class:SplitVariableValue
Subclasses can override this to pick up constructor-specific attributes and perform other actions before cvList has been built.- Overrides:
stepOneActions
in classSplitVariableValue
- Parameters:
name
- name.comment
- comment.cvName
- cv name.readOnly
- true for read only, else false.infoOnly
- true for info only, else false.writeOnly
- true for write only, else false.opsOnly
- true for ops only, else false.cvNum
- cv number.mask
- cv mask.minVal
- minimum value.maxVal
- maximum value.v
- hashmap of string and cv value.status
- status.stdname
- std name.pSecondCV
- second cv (no longer preferred, specify in cv)pFactor
- factor.pOffset
- offset.uppermask
- upper mask (no longer preferred, specify in mask)extra1
- extra 1.extra2
- extra 2.extra3
- extra 3.extra4
- extra 4.
-
getValueFromText
long getValueFromText(java.lang.String s)
- Overrides:
getValueFromText
in classSplitVariableValue
-
getTextFromValue
java.lang.String getTextFromValue(long v)
- Overrides:
getTextFromValue
in classSplitVariableValue
-
setValue
public void setValue(java.lang.String value)
Set value from a String value.- Overrides:
setValue
in classSplitVariableValue
- Parameters:
value
- a string representing the unsigned long hex value to be set
-
-