edu.stanford.smi.protegex.owl.ui.search
Class FindUsageTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byedu.stanford.smi.protegex.owl.ui.search.FindUsageTableModel
All Implemented Interfaces:
edu.stanford.smi.protege.util.Disposable, FindUsageTableModelColumns, Serializable, TableModel

public class FindUsageTableModel
extends AbstractTableModel
implements edu.stanford.smi.protege.util.Disposable, FindUsageTableModelColumns

A TableModel displaying the results of a "find usage" run. This has two columns - one for the anonymous class, and one for the named host class.

Author:
Holger Knublauch
See Also:
Serialized Form

Field Summary
static int COL_COUNT
           
static int COL_HOST
           
static int COL_TYPE
           
static int COL_USAGE
           
private  List items
           
private  ModelListener listener
           
private  OWLModel owlModel
           
private  int sortColumn
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
FindUsageTableModel(OWLModel owlModel, Collection items)
           
 
Method Summary
private  void deleteItemsWith(edu.stanford.smi.protege.model.Frame cls)
           
 void dispose()
           
 Class getColumnClass(int column)
           
 int getColumnCount()
           
 String getColumnName(int column)
           
(package private)  RDFResource getHost(int row)
           
private  FindUsageTableItem getItem(int row)
           
 int getRowCount()
           
 RDFResource getUsage(int rowIndex)
           
 Object getValueAt(int rowIndex, int columnIndex)
           
 void setItems(Collection items)
           
 void setSortColumn(int column)
           
private  void sort()
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

items

private List items

owlModel

private OWLModel owlModel

listener

private ModelListener listener

sortColumn

private int sortColumn

COL_HOST

public static final int COL_HOST
See Also:
Constant Field Values

COL_TYPE

public static final int COL_TYPE
See Also:
Constant Field Values

COL_USAGE

public static final int COL_USAGE
See Also:
Constant Field Values

COL_COUNT

public static final int COL_COUNT
See Also:
Constant Field Values
Constructor Detail

FindUsageTableModel

public FindUsageTableModel(OWLModel owlModel,
                           Collection items)
Method Detail

deleteItemsWith

private void deleteItemsWith(edu.stanford.smi.protege.model.Frame cls)

dispose

public void dispose()
Specified by:
dispose in interface edu.stanford.smi.protege.util.Disposable

getColumnClass

public Class getColumnClass(int column)
Specified by:
getColumnClass in interface TableModel

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface TableModel

getColumnName

public String getColumnName(int column)
Specified by:
getColumnName in interface TableModel

getHost

RDFResource getHost(int row)

getItem

private FindUsageTableItem getItem(int row)

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface TableModel

getUsage

public RDFResource getUsage(int rowIndex)

getValueAt

public Object getValueAt(int rowIndex,
                         int columnIndex)
Specified by:
getValueAt in interface TableModel

setItems

public void setItems(Collection items)

setSortColumn

public void setSortColumn(int column)

sort

private void sort()