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
owlModel
private OWLModel owlModel
predicate
private RDFProperty predicate
stringProperty
private Boolean stringProperty
subject
private RDFResource subject
values
private List values
LiteralTableModel
public LiteralTableModel(RDFProperty predicate)
getColumnCount
public int getColumnCount()
getColumnClass
public Class getColumnClass(int columnIndex)
getColumnName
public String getColumnName(int column)
getEditor
protected PropertyValueEditor getEditor(Object value)
getNewValues
private Collection getNewValues(int rowOfChangedValue)
getObject
public Object getObject(int row)
getPredicate
public RDFProperty getPredicate()
getRDFSLiteral
private RDFSLiteral getRDFSLiteral(int rowIndex)
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)
isDeleteEnabled
public boolean isDeleteEnabled(int[] selectedRows)
isStringProperty
public boolean isStringProperty()
isStringPropertyHelper
private boolean isStringPropertyHelper()
setSubject
public void setSubject(RDFResource subject)
setTypeAt
private void setTypeAt(Object aValue,
int rowIndex)
setValueAt
public void setValueAt(Object aValue,
int rowIndex,
int columnIndex)
setLangAt
private void setLangAt(String value,
int rowIndex)
setValues
public void setValues(Collection newValues)
updateValues
public void updateValues()