|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
cayleytable.groupTableModel
public class groupTableModel
Extended AbstractTableModel class describing how a group stored in
a groupMatrix
object is displayed in a JTable object.
Field Summary | |
---|---|
private boolean |
canEditTable
boolean that determines if the JTable can be manually edited |
private int |
order
int that contains the current order of the group on display |
private java.util.ArrayList<java.util.ArrayList<java.lang.String>> |
tableRows
ArrayList of ArrayList of String objects which contains every cell in the JTable which is the groupMatrix object passed to the groupTableModel
constructor. |
private groupPanel |
topPanel
groupPanel object that contains the JTable that the current
instanced of groupTableModel defines. |
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
groupTableModel(groupPanel inputPanel)
Creates a new instance of groupTableModel with an empty group of order 0 |
Method Summary | |
---|---|
void |
displayTable(groupMatrix matrix,
boolean makeEditable)
Method that fills the column headers and cells in the JTable with the newest groupMatrix object. |
int |
getColumnCount()
Method to return number of columns in the JTable. |
java.lang.String |
getColumnName(int column)
Method used to return value to display as column name for a specific column in the JTable. |
int |
getRowCount()
Method to return number of rows in the JTable. |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Method used to return value to display for a specific row, column in the JTable. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Method to determine if a specific cell is editable on the JTable. |
void |
setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
Method to set the value of a cell in the JTable as well as resets the value of the same cell in the group stored in topPanel . |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int order
private boolean canEditTable
private java.util.ArrayList<java.util.ArrayList<java.lang.String>> tableRows
groupMatrix
object passed to the groupTableModel
constructor.
private groupPanel topPanel
groupPanel
object that contains the JTable that the current
instanced of groupTableModel
defines.
Constructor Detail |
---|
public groupTableModel(groupPanel inputPanel)
inputPanel
- groupPanel object which contains the JTable objectMethod Detail |
---|
public void displayTable(groupMatrix matrix, boolean makeEditable)
groupMatrix
object.
matrix
- groupMatrix
object that contains the newest group to be displayed.makeEditable
- Boolean variable that defines if the newest group can be manually edited in the JTablepublic java.lang.String getColumnName(int column)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
column
- int value of column name to retrieve
public int getRowCount()
public int getColumnCount()
public void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
topPanel
.
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
aValue
- Object that is the new value of the cell in the table.rowIndex
- integer containing row of the cell to change in the JTablecolumnIndex
- integer containing column of the cell to change in the JTablepublic java.lang.Object getValueAt(int rowIndex, int columnIndex)
rowIndex
- integer containing row of cell in JTable to retrieve.columnIndex
- integer containing column of cell in JTable to retrieve.
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
rowIndex
- integer containing row of cell in JTable to check.columnIndex
- integer containing column of cell in JTable to check.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |