public class ElementTableModel
extends javax.swing.table.AbstractTableModel
| Constructor and Description |
|---|
ElementTableModel(java.lang.String elementName,
java.lang.String[] attrNames)
Constructs an Element Table Model.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String[] |
getAttributeNames()
Gets the names of the attributes.
|
java.lang.String |
getAttributeValue(java.lang.String attrName)
Gets the value of the attribute.
|
java.lang.Class |
getColumnClass(int columnIndex)
Returns the most specific superclass for all the cell values
in the column.
|
int |
getColumnCount()
Returns the number of columns in the model.
|
java.lang.String |
getColumnName(int columnIndex)
Returns the name of the specified column.
|
java.lang.String |
getElementName()
Gets the name of the element.
|
int |
getRowCount()
Returns the number of rows in the model.
|
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Returns the value of the specified table cell.
|
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Determines if the specified table cell is editable.
|
void |
setAttribute(java.lang.String attrName,
java.lang.String attrValue)
Sets the value of the attribute.
|
void |
setValueAt(java.lang.Object newValue,
int rowIndex,
int columnIndex)
Sets the value of the specified table cell.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListenerpublic ElementTableModel(java.lang.String elementName,
java.lang.String[] attrNames)
elementName - Name of the element.attrNames - Names of the attributes of the element.public java.lang.String getElementName()
public java.lang.String[] getAttributeNames()
public java.lang.String getAttributeValue(java.lang.String attrName)
attrName - Name of the attribute.public void setAttribute(java.lang.String attrName,
java.lang.String attrValue)
attrName - Name of the attribute.attrValue - Value for the attribute.public int getRowCount()
public int getColumnCount()
public java.lang.String getColumnName(int columnIndex)
getColumnName in interface javax.swing.table.TableModelgetColumnName in class javax.swing.table.AbstractTableModelcolumnIndex - Index of the column.public java.lang.Class getColumnClass(int columnIndex)
getColumnClass in interface javax.swing.table.TableModelgetColumnClass in class javax.swing.table.AbstractTableModelcolumnIndex - Index of the column.public boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface javax.swing.table.TableModelisCellEditable in class javax.swing.table.AbstractTableModelrowIndex - Index of the row.columnIndex - Index of the column.public java.lang.Object getValueAt(int rowIndex,
int columnIndex)
rowIndex - Index of the row.columnIndex - Index of the column.public void setValueAt(java.lang.Object newValue,
int rowIndex,
int columnIndex)
setValueAt in interface javax.swing.table.TableModelsetValueAt in class javax.swing.table.AbstractTableModelnewValue - New value for the table cell.rowIndex - Index of the row.columnIndex - Index of the column.