|
SandMark version 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.table.AbstractTableModel | +--sandmark.gui.ObTableModel
This class is the data model of the JTable. It takes a ClassFileCollection as input and fills the JTable with that data. It provides methods which change and access the table's values.
Field Summary | |
(package private) java.lang.Class[] |
columnClasses
|
(package private) java.lang.String[] |
columnNames
|
(package private) java.lang.Object[][] |
data
|
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Constructor Summary | |
ObTableModel(ClassFileCollection cfc)
Constructs a new JTable with the starting values specified in the ClassFileCollection. |
Method Summary | |
java.lang.Class |
getColumnClass(int c)
Returns the Class of object at the first row of the cth column. |
int |
getColumnCount()
Returns the number of colmuns. |
java.lang.String |
getColumnName(int col)
Returns the title of the specified column |
java.lang.Object[][] |
getData()
Gets the Object array that represents the data stored in the table. |
int |
getNumObfuscations()
|
int |
getRowCount()
Returns the current number of rows |
java.lang.Object |
getValueAt(int row,
int col)
Returns the value at the cell specified |
boolean |
isCellEditable(int r,
int c)
Returns true if the cell at row r, column c is editable, otherwise false. |
void |
resetAll()
Resets all of the obfuscations in the table to their default.. |
void |
setClassOn(int row)
When a class name is clicked on, sets all obfuscations in all methods to full. |
void |
setMethodOn(int row)
When a method name in the table is clicked on, all of the obfuscations for that method are set to full. |
void |
setValueAt(java.lang.Object value,
int row,
int col)
Sets the value in the table to the specified value. |
void |
updateCellLight(int row,
int col)
Increments the integer in the table at the (row, col) coordinates by one modulo three. |
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 |
Field Detail |
final java.lang.String[] columnNames
final java.lang.Object[][] data
final java.lang.Class[] columnClasses
Constructor Detail |
public ObTableModel(ClassFileCollection cfc)
cfc
- the starting ClassFileCollection.Method Detail |
public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
public int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
public java.lang.String getColumnName(int col)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
col
- the column number (zero based index)
public java.lang.Object getValueAt(int row, int col)
getValueAt
in interface javax.swing.table.TableModel
row
- the row in the tablecol
- the column in the table
public java.lang.Class getColumnClass(int c)
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
c
- the column in the table for which to get the class
public boolean isCellEditable(int r, int c)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
r
- a row in the table.c
- a column in the table.
public void setValueAt(java.lang.Object value, int row, int col)
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
value
- the value to insert into the table.row
- a row in the tablepublic java.lang.Object[][] getData()
public void updateCellLight(int row, int col)
row
- a row in the tablecol
- a column in the tablepublic int getNumObfuscations()
public void setMethodOn(int row)
row
- the row to set all of the obfuscations.public void setClassOn(int row)
row
- the row where the class name is.public void resetAll()
|
SandMark version 3.0 Wed Jan 29 10:30:05 MST 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |