sk.stuba.fiit.foo07.genex.gui
Class CheckBoxTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by sk.stuba.fiit.foo07.genex.gui.CheckBoxTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class CheckBoxTableModel
extends javax.swing.table.AbstractTableModel

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
CheckBoxTableModel(java.lang.String t, java.lang.String b)
           
CheckBoxTableModel(java.lang.String t, java.lang.String b, boolean singleSelect)
           
 
Method Summary
 void addAnswer(Answer toAdd)
           
 Answer getAnswer(int r)
           
 java.util.ArrayList<Answer> getAnswers()
           
 java.lang.Class getColumnClass(int columnIndex)
           
 int getColumnCount()
           
 java.lang.String getColumnName(int c)
           
 int getRowCount()
           
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
           
 boolean isCellEditable(int r, int c)
           
 boolean isSingleSelect()
           
 void removeAnswer(int r)
           
 void saveAnswers(Question q, java.sql.Connection c)
           
 void setAnswers(java.util.ArrayList<Answer> answers)
           
 void setAnswers(Question q, java.sql.Connection c)
           
 void setColumnNames(java.lang.String tColumn, java.lang.String bColumn)
           
 void setSingleSelect(boolean singleSelect)
           
 void setValueAt(java.lang.Object value, int r, int c)
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableDataChanged, fireTableChanged, 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

CheckBoxTableModel

public CheckBoxTableModel(java.lang.String t,
                          java.lang.String b)

CheckBoxTableModel

public CheckBoxTableModel(java.lang.String t,
                          java.lang.String b,
                          boolean singleSelect)
Method Detail

getColumnCount

public int getColumnCount()

getRowCount

public int getRowCount()

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)

setValueAt

public void setValueAt(java.lang.Object value,
                       int r,
                       int c)
Specified by:
setValueAt in interface javax.swing.table.TableModel
Overrides:
setValueAt in class javax.swing.table.AbstractTableModel

getColumnClass

public java.lang.Class getColumnClass(int columnIndex)
Specified by:
getColumnClass in interface javax.swing.table.TableModel
Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel

isCellEditable

public boolean isCellEditable(int r,
                              int c)
Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel

getColumnName

public java.lang.String getColumnName(int c)
Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel

setColumnNames

public void setColumnNames(java.lang.String tColumn,
                           java.lang.String bColumn)

addAnswer

public void addAnswer(Answer toAdd)

getAnswer

public Answer getAnswer(int r)

removeAnswer

public void removeAnswer(int r)

getAnswers

public java.util.ArrayList<Answer> getAnswers()

setAnswers

public void setAnswers(java.util.ArrayList<Answer> answers)

setAnswers

public void setAnswers(Question q,
                       java.sql.Connection c)

setSingleSelect

public void setSingleSelect(boolean singleSelect)

isSingleSelect

public boolean isSingleSelect()

saveAnswers

public void saveAnswers(Question q,
                        java.sql.Connection c)


Copyright © 2008 Faculty of Informatics and Information Technologies, STU Bratislava. All Rights Reserved.