Package jmri.jmrix.openlcb.swing.tie
Class ConsumerTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrix.openlcb.swing.tie.ConsumerTableModel
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.table.TableModel
public class ConsumerTableModel extends javax.swing.table.AbstractTableModel
Table Model for access to producer info- Since:
- 2.3.7
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.String[]
columnName
(package private) java.lang.String[][]
dummy
static int
NODE_COLUMN
static int
NUMBER_COLUMN
(package private) static java.util.ResourceBundle
rb
static int
USERNAME_COLUMN
-
Constructor Summary
Constructors Constructor Description ConsumerTableModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
setValueAt(java.lang.Object type, int r, int c)
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Field Detail
-
rb
static java.util.ResourceBundle rb
-
USERNAME_COLUMN
public static final int USERNAME_COLUMN
- See Also:
- Constant Field Values
-
NODE_COLUMN
public static final int NODE_COLUMN
- See Also:
- Constant Field Values
-
NUMBER_COLUMN
public static final int NUMBER_COLUMN
- See Also:
- Constant Field Values
-
columnName
final java.lang.String[] columnName
-
dummy
final java.lang.String[][] dummy
-
-
Constructor Detail
-
ConsumerTableModel
public ConsumerTableModel()
-
-
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()
-
getValueAt
public java.lang.Object getValueAt(int r, int c)
-
setValueAt
public void setValueAt(java.lang.Object type, int r, int c)
- Specified by:
setValueAt
in interfacejavax.swing.table.TableModel
- Overrides:
setValueAt
in classjavax.swing.table.AbstractTableModel
-
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
- hard copy writer connectioncolWidth
- array of column widths
-
printColumns
protected void printColumns(HardcopyWriter w, java.lang.String[] columnStrings, int[] columnSize)
-
-