Package org.opentrafficsim.editor
Class AttributesTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
org.opentrafficsim.editor.AttributesTableModel
- All Implemented Interfaces:
Serializable,TableModel
Model for a
JTable to display the attributes of a XsdTreeNode.
Copyright (c) 2023-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Wouter Schakel
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intIndex of the description column.static final intIndex of the property column.static final intIndex of the use column.static final intIndex of the value column.Fields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
ConstructorsConstructorDescriptionAttributesTableModel(XsdTreeNode node, de.javagl.treetable.JTreeTable treeTable) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidapplyColumnWidth(JTable attributeTable) Apply the column widths to a newly created table.Class<?>getColumnClass(int columnIndex) intgetColumnName(int columnIndex) getNode()Returns the underlying node for which attributes are shown.intgetValueAt(int rowIndex, int columnIndex) booleanisCellEditable(int rowIndex, int columnIndex) voidsetValueAt(Object aValue, int rowIndex, int columnIndex) Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
Field Details
-
PROPERTY_COLUMN
public static final int PROPERTY_COLUMNIndex of the property column. -
VALUE_COLUMN
public static final int VALUE_COLUMNIndex of the value column. -
USE_COLUMN
public static final int USE_COLUMNIndex of the use column. -
DESCRIPTION_COLUMN
public static final int DESCRIPTION_COLUMNIndex of the description column.
-
-
Constructor Details
-
AttributesTableModel
Constructor.- Parameters:
node- node of which the attributes are displayed.treeTable- tree table.
-
-
Method Details
-
getRowCount
public int getRowCount() -
getColumnCount
public int getColumnCount() -
getColumnName
- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel
-
getColumnClass
- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classAbstractTableModel
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex) - Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classAbstractTableModel
-
getValueAt
-
setValueAt
- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classAbstractTableModel
-
getNode
Returns the underlying node for which attributes are shown.- Returns:
- underlying node for which attributes are shown.
-
applyColumnWidth
Apply the column widths to a newly created table.- Parameters:
attributeTable- table.
-