|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
jmri.jmrit.symbolicprog.VariableTableModel
public class VariableTableModel
Table data model for display of variables in symbolic programmer. Also responsible for loading from the XML file...
| Field Summary |
|---|
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
VariableTableModel(JLabel status,
String[] h,
CvTableModel cvModel,
IndexedCvTableModel iCvModel)
Defines the columns; values understood are: "Name", "Value", "Range", "Read", "Write", "Comment", "CV", "Mask", "State" |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
|
void |
configDone()
|
protected VariableValue |
createIndexedVariableFromElement(Element e,
int row,
String name,
String comment,
String cvName,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
boolean opsOnly,
int cv,
String mask,
String item,
String productID)
Create an IndexedVariableValue object of a specific type from a describing element. |
boolean |
decoderDirty()
Check for change to values, etc, hence rewriting the decoder is desirable. |
void |
dispose()
|
boolean |
fileDirty()
Represents any change to values, etc, hence rewriting the file is desirable. |
VariableValue |
findVar(String name)
|
int |
findVarIndex(String name)
|
Class<?> |
getColumnClass(int col)
|
int |
getColumnCount()
|
String |
getColumnName(int col)
|
String |
getCvName(int row)
|
String |
getItem(int row)
|
String |
getLabel(int row)
|
Object |
getRep(int row,
String format)
|
int |
getRowCount()
|
int |
getState(int row)
|
String |
getValString(int row)
|
Object |
getValueAt(int row,
int col)
|
VariableValue |
getVariable(int row)
|
boolean |
isCellEditable(int row,
int col)
|
void |
newDecVariableValue(String name,
int CV,
String mask,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
boolean opsOnly)
|
int |
piCv()
|
protected VariableValue |
processCompositeVal(Element child,
String name,
String comment,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
boolean opsOnly,
int CV,
String mask,
String item)
|
protected VariableValue |
processDecVal(Element child,
String name,
String comment,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
boolean opsOnly,
int CV,
String mask,
String item)
|
protected VariableValue |
processEnumVal(Element child,
String name,
String comment,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
boolean opsOnly,
int CV,
String mask,
String item)
|
protected VariableValue |
processHexVal(Element child,
String name,
String comment,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
boolean opsOnly,
int CV,
String mask,
String item)
|
protected VariableValue |
processIEnumVal(Element child,
int row,
String name,
String comment,
String cvName,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
boolean opsOnly,
int cv,
String mask,
String item,
String productID)
|
protected VariableValue |
processIndexedPairVal(Element child,
int row,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
String name,
String comment,
String cvName,
boolean opsOnly,
int cv,
String mask,
String item)
|
protected VariableValue |
processIndexedVal(Element child,
int row,
String name,
String comment,
String cvName,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
boolean opsOnly,
int cv,
String mask,
String item)
|
protected VariableValue |
processLongAddressVal(int CV,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
String name,
String comment,
boolean opsOnly,
String mask,
String item)
|
protected void |
processModifierElements(Element e,
VariableValue v)
If there are any modifier elements, process them by e.g. setting attributes on the VariableValue |
protected VariableValue |
processShortAddressVal(String name,
String comment,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
boolean opsOnly,
int CV,
String mask,
String item,
Element child)
|
protected VariableValue |
processSpeedTableVal(Element child,
int CV,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
String name,
String comment,
boolean opsOnly,
String mask,
String item)
|
protected VariableValue |
processSplitVal(Element child,
int CV,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
String name,
String comment,
boolean opsOnly,
String mask,
String item)
|
void |
propertyChange(PropertyChangeEvent e)
|
void |
read(int i)
Command reading of a particular variable |
protected void |
setButtonsReadWrite(boolean readOnly,
boolean infoOnly,
boolean writeOnly,
JButton bw,
JButton br,
int row)
|
void |
setConstant(Element e)
Configure from a constant. |
protected boolean |
setDefaultValue(Element e,
VariableValue v)
If there's a "default" attribute, set that value to start |
void |
setFileDirty(boolean b)
|
int |
setIndxRow(int row,
Element e,
String productID)
Load one row in the IndexedVariableTableModel, by reading in the Element containing its definition. |
void |
setIntValue(int row,
int val)
|
void |
setRow(int row,
Element e)
Load one row in the VariableTableModel, by reading in the Element containing its definition. |
void |
setState(int row,
int val)
|
protected void |
setToolTip(Element e,
VariableValue v)
|
void |
setValueAt(Object value,
int row,
int col)
|
int |
siCv()
|
void |
write(int i)
Command writing of a particular variable |
| Methods inherited from class javax.swing.table.AbstractTableModel |
|---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VariableTableModel(JLabel status,
String[] h,
CvTableModel cvModel,
IndexedCvTableModel iCvModel)
| Method Detail |
|---|
public int getRowCount()
getRowCount in interface TableModelpublic int getColumnCount()
getColumnCount in interface TableModelpublic String getColumnName(int col)
getColumnName in interface TableModelgetColumnName in class AbstractTableModelpublic Class<?> getColumnClass(int col)
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModel
public boolean isCellEditable(int row,
int col)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelpublic VariableValue getVariable(int row)
public String getLabel(int row)
public String getItem(int row)
public String getCvName(int row)
public String getValString(int row)
public void setIntValue(int row,
int val)
public void setState(int row,
int val)
public int getState(int row)
public Object getRep(int row,
String format)
public Object getValueAt(int row,
int col)
getValueAt in interface TableModel
public void setValueAt(Object value,
int row,
int col)
setValueAt in interface TableModelsetValueAt in class AbstractTableModel
public void setRow(int row,
Element e)
Invoked from DecoderFile
row - number of row to fille - Element of type "variable"
protected void processModifierElements(Element e,
VariableValue v)
protected VariableValue createIndexedVariableFromElement(Element e,
int row,
String name,
String comment,
String cvName,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
boolean opsOnly,
int cv,
String mask,
String item,
String productID)
throws NumberFormatException
NumberFormatException
protected boolean setDefaultValue(Element e,
VariableValue v)
public int piCv()
public int siCv()
public int setIndxRow(int row,
Element e,
String productID)
Invoked from DecoderFile
row - number of row to fille - Element of type "variable"
protected VariableValue processCompositeVal(Element child,
String name,
String comment,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
boolean opsOnly,
int CV,
String mask,
String item)
protected VariableValue processDecVal(Element child,
String name,
String comment,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
boolean opsOnly,
int CV,
String mask,
String item)
throws NumberFormatException
NumberFormatException
protected VariableValue processEnumVal(Element child,
String name,
String comment,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
boolean opsOnly,
int CV,
String mask,
String item)
throws NumberFormatException
NumberFormatException
protected VariableValue processHexVal(Element child,
String name,
String comment,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
boolean opsOnly,
int CV,
String mask,
String item)
throws NumberFormatException
NumberFormatException
protected VariableValue processIEnumVal(Element child,
int row,
String name,
String comment,
String cvName,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
boolean opsOnly,
int cv,
String mask,
String item,
String productID)
throws NumberFormatException
NumberFormatException
protected VariableValue processIndexedPairVal(Element child,
int row,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
String name,
String comment,
String cvName,
boolean opsOnly,
int cv,
String mask,
String item)
throws NumberFormatException
NumberFormatException
protected VariableValue processIndexedVal(Element child,
int row,
String name,
String comment,
String cvName,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
boolean opsOnly,
int cv,
String mask,
String item)
throws NumberFormatException
NumberFormatException
protected VariableValue processLongAddressVal(int CV,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
String name,
String comment,
boolean opsOnly,
String mask,
String item)
protected VariableValue processShortAddressVal(String name,
String comment,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
boolean opsOnly,
int CV,
String mask,
String item,
Element child)
protected VariableValue processSpeedTableVal(Element child,
int CV,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
String name,
String comment,
boolean opsOnly,
String mask,
String item)
throws NumberFormatException
NumberFormatException
protected VariableValue processSplitVal(Element child,
int CV,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
String name,
String comment,
boolean opsOnly,
String mask,
String item)
throws NumberFormatException
NumberFormatException
protected void setButtonsReadWrite(boolean readOnly,
boolean infoOnly,
boolean writeOnly,
JButton bw,
JButton br,
int row)
protected void setToolTip(Element e,
VariableValue v)
public void setConstant(Element e)
public void newDecVariableValue(String name,
int CV,
String mask,
boolean readOnly,
boolean infoOnly,
boolean writeOnly,
boolean opsOnly)
public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic void read(int i)
i - row numberpublic void write(int i)
i - row numberpublic void propertyChange(PropertyChangeEvent e)
propertyChange in interface PropertyChangeListenerpublic void configDone()
public boolean fileDirty()
public void setFileDirty(boolean b)
public boolean decoderDirty()
public VariableValue findVar(String name)
public int findVarIndex(String name)
public void dispose()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||