edu.stanford.smi.protegex.owl.ui.components.literaltable
Class LiteralTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
edu.stanford.smi.protegex.owl.ui.components.literaltable.LiteralTableModel
- All Implemented Interfaces:
- Serializable, TableModel
public class LiteralTableModel
- extends AbstractTableModel
A TableModel managing a list of RDFSLiterals which are predicate values of
a given subject/predicate pair. This is used by the corresponding widget.
The TableModel has one row for each literal, and one column for the value
(which is entered as string), and one for the type of each value. The latter
can optionally be switched off, if the predicate has a fixed range.
- 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_VALUE
public static final int COL_VALUE
- See Also:
- Constant Field Values
COL_LANG
public static final int COL_LANG
- See Also:
- Constant Field Values
COL_TYPE
public static final int COL_TYPE
- See Also:
- Constant Field Values
COL_COUNT
public static final int COL_COUNT
- See Also:
- Constant Field Values
LiteralTableModel
public LiteralTableModel(RDFProperty predicate)
getColumnCount
public int getColumnCount()
getColumnClass
public Class getColumnClass(int columnIndex)
- Specified by:
getColumnClass
in interface TableModel
- Overrides:
getColumnClass
in class AbstractTableModel
getColumnName
public String getColumnName(int column)
- Specified by:
getColumnName
in interface TableModel
- Overrides:
getColumnName
in class AbstractTableModel
getEditor
protected PropertyValueEditor getEditor(Object value)
getObject
public Object getObject(int row)
getPredicate
public RDFProperty getPredicate()
getRow
public int getRow(Object value)
getRowCount
public int getRowCount()
getSubject
public RDFResource getSubject()
getValueAt
public Object getValueAt(int rowIndex,
int columnIndex)
isCellEditable
public boolean isCellEditable(int rowIndex,
int columnIndex)
- Specified by:
isCellEditable
in interface TableModel
- Overrides:
isCellEditable
in class AbstractTableModel
isDeleteEnabled
public boolean isDeleteEnabled(int[] selectedRows)
isStringProperty
public boolean isStringProperty()
setSubject
public void setSubject(RDFResource subject)
setValueAt
public void setValueAt(Object aValue,
int rowIndex,
int columnIndex)
- Specified by:
setValueAt
in interface TableModel
- Overrides:
setValueAt
in class AbstractTableModel
setValues
public void setValues(Collection newValues)
updateValues
public void updateValues()
Submit a bug report or feature request
Copyright (c) 1998-2007 Stanford University.