public class ArrayTableModel
extends javax.swing.table.AbstractTableModel
| Constructor | Description |
|---|---|
ArrayTableModel(boolean[] array) |
Constructor ArrayTableModel
|
ArrayTableModel(boolean[][] array) |
Constructor ArrayTableModel
|
ArrayTableModel(double[] array) |
Constructor ArrayTableModel
|
ArrayTableModel(double[][] array) |
Constructor ArrayTableModel
|
ArrayTableModel(int[] array) |
Constructor ArrayTableModel
|
ArrayTableModel(int[][] array) |
Constructor ArrayTableModel
|
ArrayTableModel(java.lang.String[] array) |
Constructor ArrayTableModel
|
ArrayTableModel(java.lang.String[][] array) |
Constructor ArrayTableModel
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
getColumnCount() |
Gets the number of columns.
|
java.lang.String |
getColumnName(int column) |
Gets the name of the specified column.
|
int |
getRowCount() |
Gets the number of rows.
|
java.lang.Object |
getValueAt(int row,
int column) |
Gets the value at the given cell.
|
boolean |
isCellEditable(int row,
int col) |
Determines whether the given cell is editable.
|
boolean |
isTransposed() |
Returns true of the table's row and column values are interchanged.
|
void |
setArray(java.lang.Object arrayObj) |
Allows changing the array with minimal changes
|
boolean |
setColumnLock(int columnIndex,
boolean locked) |
Sets the column's lock flag.
|
boolean |
setColumnLocks(boolean[] locked) |
Sets the lock flag for multiple columns.
|
boolean |
setColumnNames(java.lang.String[] names) |
Sets columns names.
|
void |
setEditable(boolean editable) |
Sets the editable property.
|
void |
setFirstColIndex(int index) |
Sets the first column's index.
|
void |
setFirstRowIndex(int index) |
Sets the first row's index.
|
void |
setRowNumberVisible(boolean vis) |
Sets the display row number flag.
|
void |
setTransposed(boolean transposed) |
Sets the transposed property for the array.
|
void |
setValueAt(java.lang.Object value,
int row,
int col) |
Sets the value at the given cell.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListenerpublic ArrayTableModel(int[] array)
array - public ArrayTableModel(int[][] array)
array - public ArrayTableModel(double[] array)
array - public ArrayTableModel(double[][] array)
array - public ArrayTableModel(java.lang.String[] array)
array - public ArrayTableModel(java.lang.String[][] array)
array - public ArrayTableModel(boolean[] array)
array - public ArrayTableModel(boolean[][] array)
array - public void setArray(java.lang.Object arrayObj)
arrayObj - public boolean setColumnLock(int columnIndex,
boolean locked)
column - intlocked - booleanpublic boolean setColumnLocks(boolean[] locked)
locked - boolean arraypublic void setFirstRowIndex(int index)
index - public void setFirstColIndex(int index)
index - public void setRowNumberVisible(boolean vis)
vis - true<\code> if table display row numberpublic void setTransposed(boolean transposed)
transposed - public boolean isTransposed()
public void setEditable(boolean editable)
editable - true allows editing of the cell values that are not locked.public int getColumnCount()
public boolean setColumnNames(java.lang.String[] names)
names - public java.lang.String getColumnName(int column)
getColumnName in class javax.swing.table.AbstractTableModelcolumn - the column indexpublic int getRowCount()
public java.lang.Object getValueAt(int row,
int column)
row - the row indexcolumn - the column indexpublic void setValueAt(java.lang.Object value,
int row,
int col)
setValueAt in class javax.swing.table.AbstractTableModelvalue - the valuerow - the row indexcol - the column indexpublic boolean isCellEditable(int row,
int col)
isCellEditable in class javax.swing.table.AbstractTableModelrow - the row indexcol - the column index