public abstract class Matrix2D<T> extends Object implements TableModel
Modifier and Type | Class and Description |
---|---|
static class |
Matrix2D.Deserializer<T>
Deserializes the parameter
|
static class |
Matrix2D.Serializer
Serializes the parameter
|
Constructor and Description |
---|
Matrix2D(Class<T> entryClass)
Creates a new instance
|
Matrix2D(Matrix2D<T> other)
Creates a copy
|
Modifier and Type | Method and Description |
---|---|
void |
addColumn()
Adds a new column
|
void |
addRow()
Adds a new row
|
void |
addTableModelListener(TableModelListener l) |
protected abstract T |
createNewEntry()
Creates a new entry
|
Class<?> |
getColumnClass(int columnIndex) |
int |
getColumnCount() |
String |
getColumnName(int columnIndex) |
Class<T> |
getEntryClass() |
int |
getRowCount() |
Object |
getValueAt(int rowIndex,
int columnIndex) |
boolean |
isCellEditable(int rowIndex,
int columnIndex) |
void |
removeColumn(int columnIndex)
Removes a column
|
void |
removeRow(int rowIndex)
Removes a row
|
void |
removeTableModelListener(TableModelListener l) |
void |
setValueAt(Object aValue,
int rowIndex,
int columnIndex) |
String |
toString() |
public Matrix2D(Class<T> entryClass)
entryClass
- the type of the entriespublic int getRowCount()
getRowCount
in interface TableModel
public int getColumnCount()
getColumnCount
in interface TableModel
public String getColumnName(int columnIndex)
getColumnName
in interface TableModel
public Class<?> getColumnClass(int columnIndex)
getColumnClass
in interface TableModel
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface TableModel
public Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface TableModel
public void setValueAt(Object aValue, int rowIndex, int columnIndex)
setValueAt
in interface TableModel
public void addTableModelListener(TableModelListener l)
addTableModelListener
in interface TableModel
public void removeTableModelListener(TableModelListener l)
removeTableModelListener
in interface TableModel
protected abstract T createNewEntry()
public void addRow()
public void removeRow(int rowIndex)
rowIndex
- the row indexpublic void addColumn()
public void removeColumn(int columnIndex)
columnIndex
- the column indexCopyright © 2020–2022 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.