Package jmri.jmrix.maple.assignment
Class ListFrame.AssignmentTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrix.maple.assignment.ListFrame.AssignmentTableModel
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.table.TableModel
- Enclosing class:
- ListFrame
public class ListFrame.AssignmentTableModel 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
ADDRESS_COLUMN
static int
BIT_COLUMN
static int
SYSNAME_COLUMN
static int
USERNAME_COLUMN
-
Constructor Summary
Constructors Constructor Description AssignmentTableModel()
-
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)
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
-
BIT_COLUMN
public static final int BIT_COLUMN
- See Also:
- Constant Field Values
-
ADDRESS_COLUMN
public static final int ADDRESS_COLUMN
- See Also:
- Constant Field Values
-
SYSNAME_COLUMN
public static final int SYSNAME_COLUMN
- See Also:
- Constant Field Values
-
USERNAME_COLUMN
public static final int USERNAME_COLUMN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AssignmentTableModel
public AssignmentTableModel()
-
-
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)
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
- the HardcopyWriter instance.colWidth
- column width array.
-
printColumns
protected void printColumns(HardcopyWriter w, java.lang.String[] columnStrings, int[] columnSize)
-
-