Class EditorTableDataModel

  • All Implemented Interfaces:
    java.io.Serializable, javax.swing.table.TableModel

    public class EditorTableDataModel
    extends javax.swing.table.AbstractTableModel
    Table data model for display of Digitrax SPJ files.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void configureTable​(javax.swing.JTable table)
      Configure a table to have our standard rows and columns.
      void dispose()  
      (package private) void editSdfButtonPressed​(java.lang.Object value, int row, int col)  
      java.lang.Class<?> getColumnClass​(int col)  
      int getColumnCount()  
      java.lang.String getColumnName​(int col)  
      int getPreferredWidth​(int col)  
      int getRowCount()  
      java.lang.Object getValueAt​(int row, int col)  
      boolean isCellEditable​(int row, int col)  
      javax.swing.JButton largestWidthButton​(int col)  
      (package private) void playButtonPressed​(java.lang.Object value, int row, int col)  
      protected void printColumns​(HardcopyWriter w, java.lang.String[] columnStrings, int columnSize)  
      void printTable​(HardcopyWriter w)
      Self print - or print preview - the table.
      (package private) void replWavButtonPressed​(java.lang.Object value, int row, int col)  
      (package private) void setColumnToHoldButton​(javax.swing.JTable table, int column, javax.swing.JButton sample)
      Service method to set up a column so that it will hold a button for it's values.
      void setValueAt​(java.lang.Object value, int row, int col)  
      (package private) void viewSdfButtonPressed​(java.lang.Object value, int row, int col)  
      (package private) void viewTxtButtonPressed​(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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getColumnName

        public java.lang.String getColumnName​(int col)
        Specified by:
        getColumnName in interface javax.swing.table.TableModel
        Overrides:
        getColumnName in class javax.swing.table.AbstractTableModel
      • getColumnClass

        public java.lang.Class<?> getColumnClass​(int col)
        Specified by:
        getColumnClass in interface javax.swing.table.TableModel
        Overrides:
        getColumnClass in class javax.swing.table.AbstractTableModel
      • isCellEditable

        public boolean isCellEditable​(int row,
                                      int col)
        Specified by:
        isCellEditable in interface javax.swing.table.TableModel
        Overrides:
        isCellEditable in class javax.swing.table.AbstractTableModel
      • getValueAt

        public java.lang.Object getValueAt​(int row,
                                           int col)
      • setValueAt

        public void setValueAt​(java.lang.Object value,
                               int row,
                               int col)
        Specified by:
        setValueAt in interface javax.swing.table.TableModel
        Overrides:
        setValueAt in class javax.swing.table.AbstractTableModel
      • playButtonPressed

        void playButtonPressed​(java.lang.Object value,
                               int row,
                               int col)
      • configureTable

        public void configureTable​(javax.swing.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 - table to configured.
      • setColumnToHoldButton

        void setColumnToHoldButton​(javax.swing.JTable table,
                                   int column,
                                   javax.swing.JButton sample)
        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 formatting
        column - Which column to configure with this call
        sample - Typical button, used for size
      • printTable

        public void printTable​(HardcopyWriter w)
        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