sk.stuba.fiit.foo07.genex.gui
Class NewTestTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
javax.swing.table.DefaultTableModel
sk.stuba.fiit.foo07.genex.gui.NewTestTableModel
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.table.TableModel
public class NewTestTableModel
- extends javax.swing.table.DefaultTableModel
- Author:
- _mizu_
- See Also:
- Serialized Form
Fields inherited from class javax.swing.table.DefaultTableModel |
columnIdentifiers, dataVector |
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Methods inherited from class javax.swing.table.DefaultTableModel |
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getDataVector, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount |
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableDataChanged, fireTableChanged, 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 |
NewTestTableModel
public NewTestTableModel(java.sql.Connection c)
NewTestTableModel
public NewTestTableModel(java.sql.Connection c,
Test test)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
setQuestions
public void setQuestions(java.util.ArrayList<Question> questions,
java.util.ArrayList<java.lang.Float> points)
throws java.lang.Exception
- Throws:
java.lang.Exception
addQuestion
public void addQuestion(Question toAdd,
java.lang.Float points)
addQuestions
public void addQuestions(java.util.ArrayList<Question> toAdd,
java.util.ArrayList<java.lang.Float> points)
throws java.lang.Exception
- Throws:
java.lang.Exception
removeQuestions
public void removeQuestions(int[] indices)
setQuestion
public void setQuestion(Question toSet,
int index)
getQuestion
public Question getQuestion(int index)
reorder
public void reorder()
moveUp
public void moveUp(int index)
moveDown
public void moveDown(int index)
initColumnNames
public void initColumnNames()
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interface javax.swing.table.TableModel
- Overrides:
getColumnCount
in class javax.swing.table.DefaultTableModel
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interface javax.swing.table.TableModel
- Overrides:
getRowCount
in class javax.swing.table.DefaultTableModel
getColumnName
public java.lang.String getColumnName(int col)
- Specified by:
getColumnName
in interface javax.swing.table.TableModel
- Overrides:
getColumnName
in class javax.swing.table.DefaultTableModel
setValueAt
public void setValueAt(java.lang.Object val,
int row,
int col)
- Specified by:
setValueAt
in interface javax.swing.table.TableModel
- Overrides:
setValueAt
in class javax.swing.table.DefaultTableModel
getValueAt
public java.lang.Object getValueAt(int row,
int col)
- Specified by:
getValueAt
in interface javax.swing.table.TableModel
- Overrides:
getValueAt
in class javax.swing.table.DefaultTableModel
isCellEditable
public boolean isCellEditable(int row,
int col)
- Specified by:
isCellEditable
in interface javax.swing.table.TableModel
- Overrides:
isCellEditable
in class javax.swing.table.DefaultTableModel
getQuestionCount
public int getQuestionCount()
getPointsSum
public float getPointsSum()
getAverageDiff
public float getAverageDiff()
getQuestions
public java.util.ArrayList<Question> getQuestions()
getPoints
public java.util.ArrayList<java.lang.Float> getPoints()
Copyright © 2008 Faculty of Informatics and Information Technologies, STU Bratislava. All Rights Reserved.