|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--javax.swing.table.AbstractTableModel
|
+--com.monkeycoder.monkeynes.gui.GameGenieTableModel
This is the table model used for the display of GameGenieCodes by
the GameGenieGui.
Originally part of the MonkeyNES project.
| Field Summary |
| Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
| Constructor Summary | |
GameGenieTableModel()
Creates a new GameGenieTableModel with no headers or data. |
|
GameGenieTableModel(String[] inColNames)
Creates a new GameGenieTableModel with the supplied headers. |
|
GameGenieTableModel(String[] inColNames,
ArrayList inData)
Creates a new GameGenieTableModel with the supplied headers and data. |
|
GameGenieTableModel(String[] inColNames,
Object[][] inData)
Creates a new GameGenieTableModel with the supplied headers and raw data. |
|
| Method Summary | |
void |
addRow(GameGenieCode inCode)
Adds a row to the bottom of the table. |
Class |
getColumnClass(int col)
Returns the object class of the requested column. |
int |
getColumnCount()
Returns the number of columns in this table. |
String |
getColumnName(int col)
Returns the column header name for the requested column. |
ArrayList |
getDataSet()
Builds an ArrayList full of all the GameGenieCode objects currently in the table. |
int |
getRowCount()
Returns the number of data rows in this table. |
Object |
getValueAt(int row,
int col)
Returns the data at the specified table coordinates. |
boolean |
isCellEditable(int row,
int col)
Returns whether or not the data at the specified table coordinates is editable. |
void |
removeRow(int row)
Removes a row from the table. |
void |
setDataSet(ArrayList inData)
Replaces the data used with new data. |
void |
setValueAt(Object value,
int row,
int col)
Sets the raw data at the specified table coordinates. |
| 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 |
| Constructor Detail |
public GameGenieTableModel()
public GameGenieTableModel(String[] inColNames)
inColNames - A string array containing column headers labels.
public GameGenieTableModel(String[] inColNames,
Object[][] inData)
inColNames - A string array containing column headers labels.inData - Object data for each cell of the table.
public GameGenieTableModel(String[] inColNames,
ArrayList inData)
inColNames - A string array containing column headers labels.inData - An ArrayList expected to contain GameGenieCode objects.| Method Detail |
public ArrayList getDataSet()
public void setDataSet(ArrayList inData)
inData - An ArrayList expected to contain GameGenieCode objects.public int getColumnCount()
public int getRowCount()
public String getColumnName(int col)
getColumnName in interface TableModelgetColumnName in class AbstractTableModelcol - The requested column.
public Object getValueAt(int row,
int col)
row - The row coordinate.col - The column coordinate.
public Class getColumnClass(int col)
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModelcol - The requested column.
public boolean isCellEditable(int row,
int col)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelrow - The row coordinate.col - The column coordinate.
public void setValueAt(Object value,
int row,
int col)
setValueAt in interface TableModelsetValueAt in class AbstractTableModelvalue - The raw data.row - The row coordinate.col - The column coordinate.public void addRow(GameGenieCode inCode)
inCode - The GameGenieCode that will be used to add a row to the table.public void removeRow(int row)
row - The index of the row to remove.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||