org.argouml.cognitive.checklist.ui
Class TableModelChecklist

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byorg.argouml.cognitive.checklist.ui.TableModelChecklist
All Implemented Interfaces:
EventListener, PropertyChangeListener, Serializable, TableModel, VetoableChangeListener

class TableModelChecklist
extends AbstractTableModel
implements VetoableChangeListener, PropertyChangeListener

The table model for checklists.


Field Summary
private static Logger LOG
          Logger.
private  TabChecklist panel
           
private  Object target
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
TableModelChecklist(TabChecklist tc)
          Constructor.
 
Method Summary
 Class getColumnClass(int c)
           
 int getColumnCount()
           
 String getColumnName(int c)
           
 int getRowCount()
           
 Object getValueAt(int row, int col)
           
 boolean isCellEditable(int row, int col)
           
 void propertyChange(PropertyChangeEvent evt)
           
 void setTarget(Object t)
          This function is called when the target is changed (by the user).
 void setValueAt(Object aValue, int rowIndex, int columnIndex)
           
 void vetoableChange(PropertyChangeEvent pce)
           
 
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

LOG

private static final Logger LOG
Logger.


target

private Object target

panel

private TabChecklist panel
Constructor Detail

TableModelChecklist

public TableModelChecklist(TabChecklist tc)
Constructor.

Parameters:
tc - The TabChecklist to show.
Method Detail

setTarget

public void setTarget(Object t)
This function is called when the target is changed (by the user). It updates the items, and causes events to arrive when the UML model of the new target gets updated.

Limited to the target name changes, to reduce the number of events fired.

Parameters:
t - the new target

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface TableModel
See Also:
TableModel.getColumnCount()

getColumnName

public String getColumnName(int c)
Specified by:
getColumnName in interface TableModel
See Also:
TableModel.getColumnName(int)

getColumnClass

public Class getColumnClass(int c)
Specified by:
getColumnClass in interface TableModel
See Also:
TableModel.getColumnClass(int)

isCellEditable

public boolean isCellEditable(int row,
                              int col)
Specified by:
isCellEditable in interface TableModel
See Also:
TableModel.isCellEditable(int, int)

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface TableModel
See Also:
TableModel.getRowCount()

getValueAt

public Object getValueAt(int row,
                         int col)
Specified by:
getValueAt in interface TableModel
See Also:
TableModel.getValueAt(int, int)

setValueAt

public void setValueAt(Object aValue,
                       int rowIndex,
                       int columnIndex)
Specified by:
setValueAt in interface TableModel
See Also:
TableModel.setValueAt(java.lang.Object, int, int)

vetoableChange

public void vetoableChange(PropertyChangeEvent pce)
Specified by:
vetoableChange in interface VetoableChangeListener
See Also:
VetoableChangeListener.vetoableChange(java.beans.PropertyChangeEvent)

propertyChange

public void propertyChange(PropertyChangeEvent evt)
Specified by:
propertyChange in interface PropertyChangeListener
See Also:
PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook