Package jmri.jmrix.loconet.soundloader
Class EditorTableDataModel
java.lang.Object
javax.swing.table.AbstractTableModel
jmri.jmrix.loconet.soundloader.EditorTableDataModel
- All Implemented Interfaces:
Serializable,TableModel
Table data model for display of Digitrax SPJ files.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static JFileChooser(package private) SpjFilestatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureTable(JTable table) Configure a table to have our standard rows and columns.voiddispose()(package private) voideditSdfButtonPressed(Object value, int row, int col) Class<?>getColumnClass(int col) intgetColumnName(int col) intgetPreferredWidth(int col) intgetValueAt(int row, int col) booleanisCellEditable(int row, int col) largestWidthButton(int col) (package private) voidplayButtonPressed(Object value, int row, int col) protected voidprintColumns(HardcopyWriter w, String[] columnStrings, int columnSize) voidSelf print - or print preview - the table.(package private) voidreplWavButtonPressed(Object value, int row, int col) (package private) voidsetColumnToHoldButton(JTable table, int column, JButton sample) Service method to set up a column so that it will hold a button for it's values.voidsetValueAt(Object value, int row, int col) (package private) voidviewSdfButtonPressed(Object value, int row, int col) (package private) voidviewTxtButtonPressed(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 Details
-
HEADERCOL
- See Also:
-
TYPECOL
- See Also:
-
MAPCOL
- See Also:
-
HANDLECOL
- See Also:
-
FILENAMECOL
- See Also:
-
LENGTHCOL
- See Also:
-
PLAYBUTTONCOL
- See Also:
-
REPLACEBUTTONCOL
- See Also:
-
NUMCOLUMN
- See Also:
-
file
-
chooser
-
-
Constructor Details
-
EditorTableDataModel
-
-
Method Details
-
getRowCount
-
getColumnCount
-
getColumnName
- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel
-
getColumnClass
- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classAbstractTableModel
-
isCellEditable
- Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classAbstractTableModel
-
getValueAt
-
getPreferredWidth
-
setValueAt
- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classAbstractTableModel
-
replWavButtonPressed
-
playButtonPressed
-
viewTxtButtonPressed
-
viewSdfButtonPressed
-
editSdfButtonPressed
-
configureTable
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- table to configured.
-
largestWidthButton
-
setColumnToHoldButton
Service method to set up a column so that it will hold a button for it's values.- Parameters:
table- The overall table, accessed for formattingcolumn- Which column to configure with this callsample- Typical button, used for size
-
dispose
-
printTable
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.
- Parameters:
w- the printer output to write to
-
printColumns
-