edu.stanford.smi.protegex.owl.ui.matrix
Class MatrixTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
edu.stanford.smi.protegex.owl.ui.matrix.MatrixTableModel
- All Implemented Interfaces:
- edu.stanford.smi.protege.util.Disposable, Serializable, TableModel
- Direct Known Subclasses:
- ClassMatrixTableModel, PropertyMatrixTableModel
- public class MatrixTableModel
- extends AbstractTableModel
- implements edu.stanford.smi.protege.util.Disposable
- Author:
- Holger Knublauch
- See Also:
- Serialized Form
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 |
COL_NAME
public static final int COL_NAME
- See Also:
- Constant Field Values
COL_PREFIX
public static final int COL_PREFIX
- See Also:
- Constant Field Values
columns
private List columns
filter
private MatrixFilter filter
instances
private List instances
modelListener
private ModelListener modelListener
owlModel
private OWLModel owlModel
sortColumn
private int sortColumn
table
private MatrixTable table
MatrixTableModel
public MatrixTableModel(OWLModel owlModel,
MatrixFilter filter)
addColumn
public void addColumn(MatrixColumn column)
- Adds a new MatrixColumn programmatically. This should not be called by
user code directly: Instead, use the corresponding method in MatrixTable.
- Parameters:
column
- the MatrixColumn to add- See Also:
MatrixTable.addColumn(edu.stanford.smi.protegex.owl.ui.matrix.MatrixColumn)
addColumn
void addColumn(MatrixColumn column,
int index)
addDefaultColumns
protected void addDefaultColumns()
addInstances
private void addInstances()
dispose
public void dispose()
- Specified by:
dispose
in interface edu.stanford.smi.protege.util.Disposable
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interface TableModel
getColumnClass
public Class getColumnClass(int columnIndex)
- Specified by:
getColumnClass
in interface TableModel
getColumnName
public String getColumnName(int column)
- Specified by:
getColumnName
in interface TableModel
getIndexFor
private int getIndexFor(RDFResource instance)
getInstance
public RDFResource getInstance(int row)
getMatrixColumn
public MatrixColumn getMatrixColumn(int column)
getNewColumnIndex
public int getNewColumnIndex(MatrixColumn col)
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interface TableModel
getSortableMatrixColumn
private SortableMatrixColumn getSortableMatrixColumn()
getValueAt
public Object getValueAt(int rowIndex,
int columnIndex)
- Specified by:
getValueAt
in interface TableModel
getVisibleAnnotationProperties
public Collection getVisibleAnnotationProperties()
handleInstanceCreated
private void handleInstanceCreated(edu.stanford.smi.protege.model.Instance instance)
handleInstanceDeleted
private void handleInstanceDeleted(RDFResource instance)
isCellEditable
public boolean isCellEditable(int rowIndex,
int columnIndex)
- Specified by:
isCellEditable
in interface TableModel
isDependentOn
protected boolean isDependentOn(RDFResource instance)
isSortableColumn
public boolean isSortableColumn(int column)
refill
public void refill()
removeDependentColumns
private void removeDependentColumns(RDFResource RDFResource)
removeColumn
private void removeColumn(MatrixColumn column)
setSortColumn
public void setSortColumn(int column)
setTable
void setTable(MatrixTable table)
setValueAt
public void setValueAt(Object value,
int rowIndex,
int columnIndex)
- Specified by:
setValueAt
in interface TableModel
sortInstances
private void sortInstances()