Package ptolemy.actor.gui
Class ArrayOfRecordsPane.ArrayAsTable
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- ptolemy.actor.gui.ArrayOfRecordsPane.ArrayAsTable
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.table.TableModel
- Enclosing class:
- ArrayOfRecordsPane
public static class ArrayOfRecordsPane.ArrayAsTable extends javax.swing.table.AbstractTableModel
This class provides an implementation of the TableModel interface for viewing an array of records.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getColumnCount()
Get the column count of the Matrix.java.lang.String
getColumnName(int columnIndex)
Get the name of the specified column, which is the column index as a string.int
getRowCount()
Get the row count of the Matrix.java.lang.Object
getValueAt(int row, int column)
Get the specified entry as a String.void
removeRow(int row)
Remove the specified row from the table.-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
-
-
-
-
Method Detail
-
getColumnCount
public int getColumnCount()
Get the column count of the Matrix.- Returns:
- the column count.
-
getColumnName
public java.lang.String getColumnName(int columnIndex)
Get the name of the specified column, which is the column index as a string.- Specified by:
getColumnName
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnName
in classjavax.swing.table.AbstractTableModel
- Parameters:
columnIndex
- The index of the column.- Returns:
- The column index as a string.
-
getRowCount
public int getRowCount()
Get the row count of the Matrix.- Returns:
- the row count.
-
getValueAt
public java.lang.Object getValueAt(int row, int column)
Get the specified entry as a String.- Parameters:
row
- The row number.column
- The column number.- Returns:
- An instance of Token representing the matrix value at the specified row and column.
-
removeRow
public void removeRow(int row)
Remove the specified row from the table. If the row is out of range, do nothing.- Parameters:
row
- The row to remove, starting with index 0.
-
-