|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
edu.stanford.smi.protegex.owl.ui.owltable.AbstractOWLTableModel
An AbstractTableModel that represents superclasses/equivalent classes with one row. Its contents is automatically synchronized with the given Cls. This is the common base class for three types of TableModels:
Field Summary | |
private ClassListener |
classListener
The ClsListener that detects changes in the superclasses of the edited cls. |
private OWLNamedClass |
cls
The currently edited class |
private int |
expressionColumn
The index of the column that represents the expression |
private List |
rows
The List of RDFSClass instances in the table, sorted by rows |
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Constructor Summary | |
protected |
AbstractOWLTableModel(int expressionColumn)
|
Method Summary | |
int |
addEmptyRow(int rowIndex)
Called to allow for editing. |
protected void |
addRows()
This method completely fills the whole table and assumes that the rows list is empty. |
(package private) void |
clearRows()
Removes all rows from the table. |
void |
deleteRow(int index)
Deletes the superclass in a given row. |
void |
displaySemanticError(String message)
Displays an illegal assignment error dialog, e.g. through a JOptionPane. |
void |
dispose()
Clears any dangling listeners. |
RDFSClass |
getClass(int rowIndex)
|
int |
getClassRow(RDFSClass superCls)
|
(package private) edu.stanford.smi.protege.model.Cls |
getCls()
|
Class |
getColumnClass(int columnIndex)
|
int |
getColumnCount()
|
String |
getColumnName(int column)
|
OWLNamedClass |
getEditedCls()
|
Icon |
getIcon(RDFResource resource)
|
protected abstract int |
getInsertRowIndex(edu.stanford.smi.protege.model.Cls cls)
|
RDFResource |
getRDFResource(int row)
|
int |
getRowCount()
|
RDFResource |
getSubject()
|
int |
getSymbolColumnIndex()
|
Object |
getValueAt(int rowIndex,
int columnIndex)
|
protected void |
insertRow(edu.stanford.smi.protege.model.Cls cls)
|
boolean |
isAddEnabledAt(int rowIndex)
|
boolean |
isCellEditable(int rowIndex,
int columnIndex)
|
boolean |
isEditable()
|
protected abstract boolean |
isSuitable(edu.stanford.smi.protege.model.Cls cls)
Checks whether a given superclass shall be displayed or not. |
void |
refill()
|
void |
removeEmptyRow()
|
private void |
removeListeners()
|
void |
setCls(OWLNamedClass newCls)
|
protected abstract void |
setValueAt(int rowIndex,
OWLModel owlModel,
String parsableText)
|
void |
setValueAt(Object value,
int rowIndex,
int columnIndex)
|
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 |
Methods inherited from interface edu.stanford.smi.protegex.owl.ui.owltable.OWLTableModel |
addRow, isDeleteEnabledFor |
Methods inherited from interface edu.stanford.smi.protegex.owl.ui.owltable.SymbolTableModel |
getPredicate |
Methods inherited from interface javax.swing.table.TableModel |
addTableModelListener, removeTableModelListener |
Field Detail |
private OWLNamedClass cls
private int expressionColumn
private List rows
private ClassListener classListener
Constructor Detail |
protected AbstractOWLTableModel(int expressionColumn)
Method Detail |
public int addEmptyRow(int rowIndex)
addEmptyRow
in interface OWLTableModel
protected void addRows()
void clearRows()
public void deleteRow(int index)
deleteRow
in interface OWLTableModel
index
- the index of the row to deletepublic void displaySemanticError(String message)
OWLTableModel
displaySemanticError
in interface OWLTableModel
message
- the message textpublic void dispose()
dispose
in interface OWLTableModel
edu.stanford.smi.protege.model.Cls getCls()
public Class getColumnClass(int columnIndex)
getColumnClass
in interface TableModel
public int getColumnCount()
getColumnCount
in interface TableModel
public String getColumnName(int column)
getColumnName
in interface TableModel
public RDFSClass getClass(int rowIndex)
getClass
in interface OWLTableModel
public int getClassRow(RDFSClass superCls)
getClassRow
in interface OWLTableModel
public OWLNamedClass getEditedCls()
getEditedCls
in interface OWLTableModel
public RDFResource getRDFResource(int row)
getRDFResource
in interface SymbolTableModel
public RDFResource getSubject()
getSubject
in interface SymbolTableModel
public int getSymbolColumnIndex()
getSymbolColumnIndex
in interface SymbolTableModel
public Icon getIcon(RDFResource resource)
getIcon
in interface SymbolTableModel
public boolean isAddEnabledAt(int rowIndex)
isAddEnabledAt
in interface OWLTableModel
public boolean isEditable()
isEditable
in interface OWLTableModel
protected abstract int getInsertRowIndex(edu.stanford.smi.protege.model.Cls cls)
public int getRowCount()
getRowCount
in interface TableModel
public Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface TableModel
protected void insertRow(edu.stanford.smi.protege.model.Cls cls)
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface TableModel
protected abstract boolean isSuitable(edu.stanford.smi.protege.model.Cls cls)
cls
- the superclass to test
public void refill()
public void removeEmptyRow()
removeEmptyRow
in interface OWLTableModel
private void removeListeners()
public void setCls(OWLNamedClass newCls)
setCls
in interface OWLTableModel
public void setValueAt(Object value, int rowIndex, int columnIndex)
setValueAt
in interface TableModel
protected abstract void setValueAt(int rowIndex, OWLModel owlModel, String parsableText) throws Exception
Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |