Package jadex.commons.gui.jtable
Class StringArrayTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jadex.commons.gui.jtable.StringArrayTableModel
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.table.TableModel
public class StringArrayTableModel extends javax.swing.table.AbstractTableModel
Table model based on a 2D string array.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String[]
columnnames
protected boolean
editable
Flag if editable.protected java.lang.String[][]
stringarray
The string array
-
Constructor Summary
Constructors Constructor Description StringArrayTableModel(java.lang.String[][] stringarray)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getColumnCount()
Overridejava.lang.String
getColumnName(int column)
Overrideint
getRowCount()
Overridejava.lang.Object
getValueAt(int rowindex, int columnindex)
Overrideboolean
isCellEditable(int rowIndex, int columnIndex)
Overridevoid
setColumnNames(java.lang.String[] names)
Sets the column names.void
setEditable(boolean editable)
Sets if editable.-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener, setValueAt
-
-
-
-
Method Detail
-
setColumnNames
public void setColumnNames(java.lang.String[] names)
Sets the column names.- Parameters:
names
- The column names.
-
setEditable
public void setEditable(boolean editable)
Sets if editable.- Parameters:
editable
- True if editable.
-
getColumnName
public java.lang.String getColumnName(int column)
Override- Specified by:
getColumnName
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnName
in classjavax.swing.table.AbstractTableModel
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex)
Override- Specified by:
isCellEditable
in interfacejavax.swing.table.TableModel
- Overrides:
isCellEditable
in classjavax.swing.table.AbstractTableModel
-
getRowCount
public int getRowCount()
Override
-
getColumnCount
public int getColumnCount()
Override
-
getValueAt
public java.lang.Object getValueAt(int rowindex, int columnindex)
Override
-
-