Overview | Package | Class | Tree | Deprecated | Index | Help
| Protégé-OWL 3.4 rc2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.stanford.smi.protegex.owl.ui.owltable
Class AbstractOWLTableModel

    java.lang.Object
      javax.swing.table.AbstractTableModel
          edu.stanford.smi.protegex.owl.ui.owltable.AbstractOWLTableModel

All Implemented Interfaces:
  OWLTableModel, SymbolTableModel, Serializable, TableModel

Direct Known Subclasses:
  PropertiesDefinitionTableModel, PropertiesSuperclassesTableModel

    public abstract class AbstractOWLTableModel

extends AbstractTableModel
implements OWLTableModel

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:

- EquivalentClassesTableModel
- RestrictionsTableModel
- SuperclassessTableModel

Author:
  Holger Knublauch
See Also:
  Serialized Form

Field Summary

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.
`void` | `deleteRow(int index)` Deletes the superclass in a given row.
`void` | `displaySemanticError(String message)` Displays an illegal assignment error dialog, e.g.
`void` | `dispose()` Clears any dangling listeners.
`RDFSClass` | `getClass(int rowIndex)`
`int` | `getClassRow(RDFSClass superCls)`
`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()`
`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`

Constructor Detail

### AbstractOWLTableModel

    protected AbstractOWLTableModel(int expressionColumn)

Method Detail

### addEmptyRow

    public int addEmptyRow(int rowIndex)

  Called to allow for editing.

  Specified by:
    `addEmptyRow` in interface `OWLTableModel`

### addRows

    protected void addRows()

  This method completely fills the whole table and assumes that the rows list is empty.

### deleteRow

    public void deleteRow(int index)

  Deletes the superclass in a given row. This method does not only change the table contents but also modifies the underlying ontology. The method completely removes the superclass from the ontology if it was an anonymous class.

  Specified by:
    `deleteRow` in interface `OWLTableModel`
  Parameters:
    `index` - the index of the row to delete

### 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()

  Clears any dangling listeners.

  Specified by:
    `dispose` in interface `OWLTableModel`

### getColumnClass

    public Class getColumnClass(int columnIndex)

  Specified by:
    `getColumnClass` in interface `TableModel`
  Overrides:
    `getColumnClass` in class `AbstractTableModel`

### getColumnCount

    public int getColumnCount()

  Specified by:
    `getColumnCount` in interface `TableModel`

### getColumnName

    public String getColumnName(int column)

  Specified by:
    `getColumnName` in interface `TableModel`
  Overrides:
    `getColumnName` in class `AbstractTableModel`

### getClass

    public RDFSClass getClass(int rowIndex)

  Specified by:
    `getClass` in interface `OWLTableModel`

### getClassRow

    public int getClassRow(RDFSClass superCls)

  Specified by:
    `getClassRow` in interface `OWLTableModel`

### getEditedCls

    public OWLNamedClass getEditedCls()

  Specified by:
    `getEditedCls` in interface `OWLTableModel`

### getRDFResource

    public RDFResource getRDFResource(int row)

  Specified by:
    `getRDFResource` in interface `SymbolTableModel`

### getSubject

    public RDFResource getSubject()

  Specified by:
    `getSubject` in interface `SymbolTableModel`

### getSymbolColumnIndex

    public int getSymbolColumnIndex()

  Specified by:
    `getSymbolColumnIndex` in interface `SymbolTableModel`

### getIcon

    public Icon getIcon(RDFResource resource)

  Specified by:
    `getIcon` in interface `SymbolTableModel`

### isAddEnabledAt

    public boolean isAddEnabledAt(int rowIndex)

  Specified by:
    `isAddEnabledAt` in interface `OWLTableModel`

### isEditable

    public boolean isEditable()

  Specified by:
    `isEditable` in interface `OWLTableModel`

### getInsertRowIndex

    protected abstract int getInsertRowIndex(edu.stanford.smi.protege.model.Cls cls)

### getRowCount

    public int getRowCount()

  Specified by:
    `getRowCount` in interface `TableModel`

### getValueAt

    public Object getValueAt(int rowIndex,
                             int columnIndex)

  Specified by:
    `getValueAt` in interface `TableModel`

### insertRow

    protected void insertRow(edu.stanford.smi.protege.model.Cls cls)

### isCellEditable

    public boolean isCellEditable(int rowIndex,
                                  int columnIndex)

  Specified by:
    `isCellEditable` in interface `TableModel`
  Overrides:
    `isCellEditable` in class `AbstractTableModel`

### isSuitable

    protected abstract boolean isSuitable(edu.stanford.smi.protege.model.Cls cls)

  Checks whether a given superclass shall be displayed or not.

  Parameters:
    `cls` - the superclass to test
  Returns:
    true if the cls shall be listed in this table

### refill

    public void refill()

### removeEmptyRow

    public void removeEmptyRow()

  Specified by:
    `removeEmptyRow` in interface `OWLTableModel`

### setCls

    public void setCls(OWLNamedClass newCls)

  Specified by:
    `setCls` in interface `OWLTableModel`

### setValueAt

    public void setValueAt(Object value,
                           int rowIndex,
                           int columnIndex)

  Specified by:
    `setValueAt` in interface `TableModel`
  Overrides:
    `setValueAt` in class `AbstractTableModel`

### setValueAt

    protected abstract void setValueAt(int rowIndex,
                                       OWLModel owlModel,
                                       String parsableText)
                                throws Exception

  Throws:
    `Exception`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Protégé-OWL 3.4 rc2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug report or feature request
Copyright (c) 1998-2009 Stanford University.