public class StringArrayTableModel
extends javax.swing.table.AbstractTableModel
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
columnnames |
protected boolean |
editable
Flag if editable.
|
protected java.lang.String[][] |
stringarray
The string array
|
Constructor and Description |
---|
StringArrayTableModel(java.lang.String[][] stringarray) |
Modifier and Type | Method and Description |
---|---|
int |
getColumnCount()
Override
|
java.lang.String |
getColumnName(int column)
Override
|
int |
getRowCount()
Override
|
java.lang.Object |
getValueAt(int rowindex,
int columnindex)
Override
|
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Override
|
void |
setColumnNames(java.lang.String[] names)
Sets the column names.
|
void |
setEditable(boolean editable)
Sets if editable.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener, setValueAt
protected java.lang.String[][] stringarray
protected java.lang.String[] columnnames
protected boolean editable
public StringArrayTableModel(java.lang.String[][] stringarray)
public void setColumnNames(java.lang.String[] names)
names
- The column names.public void setEditable(boolean editable)
editable
- True if editable.public java.lang.String getColumnName(int column)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
public int getRowCount()
public int getColumnCount()
public java.lang.Object getValueAt(int rowindex, int columnindex)