Protégé-OWL 3.3.1

edu.stanford.smi.protegex.owl.ui.components.literaltable
Class LiteralTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by 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

Field Summary
static int COL_COUNT
           
static int COL_LANG
           
static int COL_TYPE
           
static int COL_VALUE
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
LiteralTableModel(RDFProperty predicate)
           
 
Method Summary
 Class getColumnClass(int columnIndex)
           
 int getColumnCount()
           
 String getColumnName(int column)
           
protected  PropertyValueEditor getEditor(Object value)
           
 Object getObject(int row)
           
 RDFProperty getPredicate()
           
 int getRow(Object value)
           
 int getRowCount()
           
 RDFResource getSubject()
           
 Object getValueAt(int rowIndex, int columnIndex)
           
 boolean isCellEditable(int rowIndex, int columnIndex)
           
 boolean isDeleteEnabled(int[] selectedRows)
           
 boolean isStringProperty()
           
 void setSubject(RDFResource subject)
           
 void setValueAt(Object aValue, int rowIndex, int columnIndex)
           
 void setValues(Collection newValues)
           
 void updateValues()
           
 
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
 

Field Detail

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
Constructor Detail

LiteralTableModel

public LiteralTableModel(RDFProperty predicate)
Method Detail

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

Protégé-OWL 3.3.1

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