|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.table.AbstractTableModel net.sourceforge.bee.ChapterTableModel
public class ChapterTableModel
A TableModel for displaying all the questions in a chapter.
Field Summary |
---|
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
ChapterTableModel(Question[] arr)
Creates a new ChapterTableModel instance. |
Method Summary | |
---|---|
Class |
getColumnClass(int i)
Describe getColumnClass method here. |
int |
getColumnCount()
Returns number of columns for table. |
String |
getColumnName(int i)
Returns user-readable column names for JTable. |
int |
getRowCount()
Returns number of questions in chapter. |
Object |
getValueAt(int row,
int col)
Picks the appropriate value out of the list of questions to display in the JTable. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Implemented to always return true. |
void |
setValueAt(Object val,
int row,
int col)
Sets the appropriate value in the question corresponding to the edited row. |
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 ChapterTableModel(Question[] arr)
ChapterTableModel
instance.
arr[]
- a Question
valueMethod Detail |
---|
public Class getColumnClass(int i)
getColumnClass
method here.
getColumnClass
in interface TableModel
getColumnClass
in class AbstractTableModel
i
- an int
value
Class
valuepublic int getColumnCount()
int
valuepublic int getRowCount()
int
valuepublic boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface TableModel
isCellEditable
in class AbstractTableModel
rowIndex
- an int
valuecolumnIndex
- an int
value
boolean
valuepublic Object getValueAt(int row, int col)
row
- an int
valuecol
- an int
value
Object
valuepublic void setValueAt(Object val, int row, int col)
setValueAt
in interface TableModel
setValueAt
in class AbstractTableModel
val
- an Object
valuerow
- an int
valuecol
- an int
valuepublic String getColumnName(int i)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
i
- an int
value
String
value
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |