Class NodeConfigManagerFrame.NodeTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrix.cmri.serial.nodeconfigmanager.NodeConfigManagerFrame.NodeTableModel
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.table.TableModel
- Enclosing class:
- NodeConfigManagerFrame
public class NodeConfigManagerFrame.NodeTableModel extends javax.swing.table.AbstractTableModel
Set up table for displaying bit assignments- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
NODEDESC_COLUMN
static int
NODENUM_COLUMN
static int
NODETYPE_COLUMN
static int
NUM_COLUMNS
static int
NUMBITS_COLUMN
static int
NUMINBYTES_COLUMN
static int
NUMINCARDS_COLUMN
static int
NUMOUTBYTES_COLUMN
static int
NUMOUTCARDS_COLUMN
static int
SELECT_COLUMN
-
Constructor Summary
Constructors Constructor Description NodeTableModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRow(SerialNode newNode)
void
changeRow(int row, SerialNode aNode)
java.lang.Class<?>
getColumnClass(int c)
int
getColumnCount()
java.lang.String
getColumnName(int c)
int
getRowCount()
java.lang.Object
getValueAt(int r, int c)
boolean
isCellEditable(int r, int c)
protected void
printColumns(HardcopyWriter w, java.lang.String[] columnStrings, int[] columnSize)
void
printTable(HardcopyWriter w, int[] colWidth)
Method to print or print preview the assignment table.void
removeRow(int row)
void
setValueAt(java.lang.Object value, int row, int col)
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Field Detail
-
NODENUM_COLUMN
public static final int NODENUM_COLUMN
- See Also:
- Constant Field Values
-
NODETYPE_COLUMN
public static final int NODETYPE_COLUMN
- See Also:
- Constant Field Values
-
NUMBITS_COLUMN
public static final int NUMBITS_COLUMN
- See Also:
- Constant Field Values
-
NUMINCARDS_COLUMN
public static final int NUMINCARDS_COLUMN
- See Also:
- Constant Field Values
-
NUMOUTCARDS_COLUMN
public static final int NUMOUTCARDS_COLUMN
- See Also:
- Constant Field Values
-
NUMINBYTES_COLUMN
public static final int NUMINBYTES_COLUMN
- See Also:
- Constant Field Values
-
NUMOUTBYTES_COLUMN
public static final int NUMOUTBYTES_COLUMN
- See Also:
- Constant Field Values
-
SELECT_COLUMN
public static final int SELECT_COLUMN
- See Also:
- Constant Field Values
-
NODEDESC_COLUMN
public static final int NODEDESC_COLUMN
- See Also:
- Constant Field Values
-
NUM_COLUMNS
public static final int NUM_COLUMNS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NodeTableModel
public NodeTableModel()
-
-
Method Detail
-
getColumnName
public java.lang.String getColumnName(int c)
- Specified by:
getColumnName
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnName
in classjavax.swing.table.AbstractTableModel
-
getColumnClass
public java.lang.Class<?> getColumnClass(int c)
- Specified by:
getColumnClass
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnClass
in classjavax.swing.table.AbstractTableModel
-
isCellEditable
public boolean isCellEditable(int r, int c)
- Specified by:
isCellEditable
in interfacejavax.swing.table.TableModel
- Overrides:
isCellEditable
in classjavax.swing.table.AbstractTableModel
-
getColumnCount
public int getColumnCount()
-
getRowCount
public int getRowCount()
-
removeRow
public void removeRow(int row)
-
addRow
public void addRow(SerialNode newNode)
-
changeRow
public void changeRow(int row, SerialNode aNode)
-
setValueAt
public void setValueAt(java.lang.Object value, int row, int col)
- Specified by:
setValueAt
in interfacejavax.swing.table.TableModel
- Overrides:
setValueAt
in classjavax.swing.table.AbstractTableModel
-
getValueAt
public java.lang.Object getValueAt(int r, int c)
-
printTable
public void printTable(HardcopyWriter w, int[] colWidth)
Method to print or print preview the assignment table. Printed in proportionately sized columns across the page with headings and vertical lines between each column. Data is word wrapped within a column. Can only handle 4 columns of data as strings. Adapted from routines in BeanTableDataModel.java by Bob Jacobsen and Dennis Miller- Parameters:
w
- hardcopywriter instance.colWidth
- column width array.
-
printColumns
protected void printColumns(HardcopyWriter w, java.lang.String[] columnStrings, int[] columnSize)
-
-