jmri.jmrix.loconet.soundloader
Class EditorTableDataModel
java.lang.Object
javax.swing.table.AbstractTableModel
jmri.jmrix.loconet.soundloader.EditorTableDataModel
- All Implemented Interfaces:
- Serializable, TableModel
public class EditorTableDataModel
- extends AbstractTableModel
Table data model for display of Digitrax SPJ files
- Author:
- Bob Jacobsen Copyright (C) 2003, 2006, Dennis Miller Copyright (C) 2006
- See Also:
- Serialized Form
| 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 |
HEADERCOL
public static final int HEADERCOL
- See Also:
- Constant Field Values
TYPECOL
public static final int TYPECOL
- See Also:
- Constant Field Values
MAPCOL
public static final int MAPCOL
- See Also:
- Constant Field Values
HANDLECOL
public static final int HANDLECOL
- See Also:
- Constant Field Values
FILENAMECOL
public static final int FILENAMECOL
- See Also:
- Constant Field Values
LENGTHCOL
public static final int LENGTHCOL
- See Also:
- Constant Field Values
PLAYBUTTONCOL
public static final int PLAYBUTTONCOL
- See Also:
- Constant Field Values
REPLACEBUTTONCOL
public static final int REPLACEBUTTONCOL
- See Also:
- Constant Field Values
NUMCOLUMN
public static final int NUMCOLUMN
- See Also:
- Constant Field Values
EditorTableDataModel
public EditorTableDataModel(SpjFile file)
getRowCount
public int getRowCount()
getColumnCount
public int getColumnCount()
getColumnName
public String getColumnName(int col)
- Specified by:
getColumnName in interface TableModel- Overrides:
getColumnName in class AbstractTableModel
getColumnClass
public Class<?> getColumnClass(int col)
- Specified by:
getColumnClass in interface TableModel- Overrides:
getColumnClass in class AbstractTableModel
isCellEditable
public boolean isCellEditable(int row,
int col)
- Specified by:
isCellEditable in interface TableModel- Overrides:
isCellEditable in class AbstractTableModel
getValueAt
public Object getValueAt(int row,
int col)
getPreferredWidth
public int getPreferredWidth(int col)
setValueAt
public void setValueAt(Object value,
int row,
int col)
- Specified by:
setValueAt in interface TableModel- Overrides:
setValueAt in class AbstractTableModel
configureTable
public void configureTable(JTable table)
- Configure a table to have our standard rows and columns.
This is optional, in that other table formats can use this table model.
But we put it here to help keep it consistent.
- Parameters:
table -
largestWidthButton
public JButton largestWidthButton(int col)
dispose
public void dispose()
printTable
public void printTable(HardcopyWriter w)
- Method to self print or print preview the table.
Printed in equally sized columns across the page with headings and
vertical lines between each column. Data is word wrapped within a column.
Can handle data as strings, comboboxes or booleans
printColumns
protected void printColumns(HardcopyWriter w,
String[] columnStrings,
int columnSize)
Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.
Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: