ix.iview.table
Class PropertyTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
ix.iface.ui.table.AbstractIXTableModel
ix.iview.table.PropertyTableModel
- All Implemented Interfaces:
- java.awt.event.FocusListener, java.io.Serializable, java.util.EventListener, javax.swing.table.TableModel
public class PropertyTableModel
- extends AbstractIXTableModel
- implements java.awt.event.FocusListener
A table model for showing and editing (world-state) constraints on object
properties in refinements.
- See Also:
- Serialized Form
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Methods inherited from class ix.iface.ui.table.AbstractIXTableModel |
addData, addData, addMarkListener, clearData, clearMarks, defaultGetCellValueAt, defaultSetColumnFields, deriveColumnFields, fireTableMarkAdded, fireTableMarkCleared, fireTableMarkedAll, fireTableMarkRemoved, getColumnClass, getColumnCount, getColumnName, getColumnNames, getData, getMarkedObjects, getMarkedRows, getObjectRow, getRowCount, getRowObject, getValueAt, isMarkable, isMarked, isMarkedEmpty, markAll, markRow, removeData, removeMarkListener, replaceData, setColumnClasses, setColumnFields, setColumnNames, setData, unmarkRow |
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 |
REL_DEFAULT
public static Symbol REL_DEFAULT
columns
java.lang.String[] columns
classes
java.lang.Class[] classes
propertyBox
javax.swing.JComboBox propertyBox
objectClass
UIObjectClass objectClass
variable
ItemVar variable
mode
int mode
PROP_COL
public int PROP_COL
VALUE_COL
public int VALUE_COL
SYNTAX_COL
public int SYNTAX_COL
NODE_COL
public int NODE_COL
EFF_COL
public int EFF_COL
propConstrsListeners
java.util.HashSet propConstrsListeners
PropertyTableModel
public PropertyTableModel()
setupPropertyBox
public javax.swing.JComboBox setupPropertyBox()
adjustTable
public void adjustTable(IXTable table)
- Adjust the given table (which should be the table whose model
this is). Adjusts the column sizes of the table and sets good
renderers.
clear
public void clear()
setConstraints
public void setConstraints(ItemVar var,
UIObjectClass oClass,
java.util.HashMap propConstrMap)
setObjectClass
public void setObjectClass(UIObjectClass oClass)
setConstraints
public void setConstraints(java.util.HashMap propConstraints)
setMode
public void setMode(int propMode)
refreshProperties
protected java.util.List refreshProperties()
updatePropertyBox
public void updatePropertyBox()
getCellValueAt
public java.lang.Object getCellValueAt(java.lang.Object baseObject,
int columnIndex)
- Description copied from class:
AbstractIXTableModel
- Gets the object's value for the given column index.
- Specified by:
getCellValueAt
in class AbstractIXTableModel
- Returns:
- an object that can be rendered by the table.
isCellEditable
public boolean isCellEditable(int row,
int col)
- Specified by:
isCellEditable
in interface javax.swing.table.TableModel
- Overrides:
isCellEditable
in class AbstractIXTableModel
setValueAt
public void setValueAt(java.lang.Object val,
int row,
int col)
- Specified by:
setValueAt
in interface javax.swing.table.TableModel
- Overrides:
setValueAt
in class AbstractIXTableModel
noteProperty
public static java.util.HashMap noteProperty(java.util.HashMap propMap,
UIObjectClass oClass,
ObjectProperty prop,
Constraint c)
- Note the given constraint in the given propMap under the given property.
the given propMap should be a property-constraintSet map.
Handles overwrites of old constraints.
- Returns:
- the given HashMap with the constraint added.
noteOldConstraints
public void noteOldConstraints()
focusGained
public void focusGained(java.awt.event.FocusEvent e)
- Specified by:
focusGained
in interface java.awt.event.FocusListener
focusLost
public void focusLost(java.awt.event.FocusEvent e)
- Specified by:
focusLost
in interface java.awt.event.FocusListener
addPropertyConstraintsListener
public void addPropertyConstraintsListener(PropertyConstraintsListener p)