edu.stanford.smi.protegex.owl.ui.properties.range
Class UnionRangeClassesTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byedu.stanford.smi.protegex.owl.ui.properties.range.UnionRangeClassesTableModel
All Implemented Interfaces:
OWLTableModel, Serializable, SymbolTableModel, TableModel

class UnionRangeClassesTableModel
extends AbstractTableModel
implements OWLTableModel

An AbstractTableModel that represents each of the classes in the union range of a property with one row.

Author:
Holger Knublauch

Field Summary
private  PropertyWidget propertyWidget
           
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
(package private) UnionRangeClassesTableModel(PropertyWidget propertyWidget)
           
 
Method Summary
 int addEmptyRow(int rowIndex)
           
 boolean addRow(RDFSClass aClass, int rowIndex)
           
(package private)  void clearRows()
          Removes all rows from the table.
 void deleteRow(int index)
           
 void displaySemanticError(String message)
          Displays an illegal assignment error dialog, e.g. through a JOptionPane.
 void dispose()
           
 RDFSClass getClass(int rowIndex)
           
 int getClassRow(RDFSClass cls)
           
 Class getColumnClass(int columnIndex)
           
 int getColumnCount()
           
 String getColumnName(int column)
           
 OWLNamedClass getEditedCls()
           
(package private)  RDFProperty getEditedProperty()
           
 Icon getIcon(RDFResource resource)
           
 RDFProperty getPredicate(int row)
           
 RDFResource getRDFResource(int row)
           
 int getRowCount()
           
 RDFResource getSubject()
           
 int getSymbolColumnIndex()
           
 Object getValueAt(int rowIndex, int columnIndex)
           
(package private)  Collection getValues()
           
private  void insertRow(RDFSClass cls)
           
 boolean isAddEnabledAt(int rowIndex)
           
 boolean isCellEditable(int rowIndex, int columnIndex)
           
 boolean isDeleteEnabledFor(RDFSClass cls)
           
 boolean isEditable()
           
(package private)  boolean isInherited(RDFSClass cls)
           
(package private)  void refill()
           
 void removeEmptyRow()
           
private  void removeSuperclasses(Collection clses, RDFSClass aClass)
           
 void setCls(OWLNamedClass cls)
           
 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 javax.swing.table.TableModel
addTableModelListener, removeTableModelListener
 

Field Detail

propertyWidget

private PropertyWidget propertyWidget

rows

private List rows
The List of RDFSClass instances in the table, sorted by rows

Constructor Detail

UnionRangeClassesTableModel

UnionRangeClassesTableModel(PropertyWidget propertyWidget)
Method Detail

addRow

public boolean addRow(RDFSClass aClass,
                      int rowIndex)
Specified by:
addRow in interface OWLTableModel

addEmptyRow

public int addEmptyRow(int rowIndex)
Specified by:
addEmptyRow in interface OWLTableModel

clearRows

void clearRows()
Removes all rows from the table.


deleteRow

public void deleteRow(int index)
Specified by:
deleteRow in interface OWLTableModel

displaySemanticError

public void displaySemanticError(String message)
Description copied from interface: OWLTableModel
Displays an illegal assignment error dialog, e.g. through a JOptionPane. This can be used if someone tries to assign an illegal superclass to the model.

Specified by:
displaySemanticError in interface OWLTableModel
Parameters:
message - the message text

dispose

public void dispose()
Specified by:
dispose in interface OWLTableModel

getColumnCount

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

getColumnName

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

getColumnClass

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

getClass

public RDFSClass getClass(int rowIndex)
Specified by:
getClass in interface OWLTableModel

getClassRow

public int getClassRow(RDFSClass cls)
Specified by:
getClassRow in interface OWLTableModel

getEditedCls

public OWLNamedClass getEditedCls()
Specified by:
getEditedCls in interface OWLTableModel

getEditedProperty

RDFProperty getEditedProperty()

getIcon

public Icon getIcon(RDFResource resource)
Specified by:
getIcon in interface SymbolTableModel

getPredicate

public RDFProperty getPredicate(int row)
Specified by:
getPredicate in interface SymbolTableModel

getRDFResource

public RDFResource getRDFResource(int row)
Specified by:
getRDFResource in interface SymbolTableModel

getRowCount

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

getSubject

public RDFResource getSubject()
Specified by:
getSubject in interface SymbolTableModel

getSymbolColumnIndex

public int getSymbolColumnIndex()
Specified by:
getSymbolColumnIndex in interface SymbolTableModel

getValueAt

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

getValues

Collection getValues()

insertRow

private void insertRow(RDFSClass cls)

isAddEnabledAt

public boolean isAddEnabledAt(int rowIndex)
Specified by:
isAddEnabledAt in interface OWLTableModel

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Specified by:
isCellEditable in interface TableModel

isDeleteEnabledFor

public boolean isDeleteEnabledFor(RDFSClass cls)
Specified by:
isDeleteEnabledFor in interface OWLTableModel

isEditable

public boolean isEditable()
Specified by:
isEditable in interface OWLTableModel

isInherited

boolean isInherited(RDFSClass cls)

refill

void refill()

removeEmptyRow

public void removeEmptyRow()
Specified by:
removeEmptyRow in interface OWLTableModel

removeSuperclasses

private void removeSuperclasses(Collection clses,
                                RDFSClass aClass)

setCls

public void setCls(OWLNamedClass cls)
Specified by:
setCls in interface OWLTableModel

setValueAt

public void setValueAt(Object value,
                       int rowIndex,
                       int columnIndex)
Specified by:
setValueAt in interface TableModel