public class IdentifyTableModel extends javax.swing.table.AbstractTableModel implements ModifiedInformer
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
columnNames |
protected java.lang.Object[][] |
data |
protected boolean[] |
delMark |
protected java.lang.Object[] |
fieldInis |
protected java.lang.String[] |
fieldNames |
protected int[] |
fieldTypes |
protected Identifier[] |
identifier |
protected int |
lastModifiedRow |
protected java.util.Locale |
locale |
protected java.lang.String |
order |
protected java.lang.Object[][] |
oriData |
Constructor and Description |
---|
IdentifyTableModel() |
IdentifyTableModel(java.lang.String[] columnNames,
Identifier[] identifier,
java.lang.Object[][] data) |
Modifier and Type | Method and Description |
---|---|
java.lang.Class<?> |
getColumnClass(int columnIndex) |
int |
getColumnCount()
Returns the number of columns - 1
|
java.lang.String |
getColumnName(int col)
Returns the column name of the specified column.
|
Identifier |
getIdentifier(int row)
Returns the identifier of the specified row
|
int |
getLastModifiedRow()
Returns the index of the last modified row in the grid.
|
int |
getRowCount()
Returns the number of rows - 1
|
protected java.lang.String |
getTranslation(java.lang.String resourceKey)
Returns a text in the corresponding language according to the locale
specific resource bundle of the package.
|
java.lang.Object |
getValueAt(int row,
int col)
Returns the cell object.
|
boolean |
isCellEditable(int row,
int col)
Returns true if the cell is editable.
|
boolean |
isInputAccepted(TableAdministration dta)
Returns true if input is accepted.
|
boolean |
isMarkedForDeletion(int row) |
boolean |
isModified()
Indicates whether the component's value differs from its initial value.
|
boolean |
isRowModified(int row)
Returns true if the row was modified by the user.
|
boolean |
isToDelete(int row)
Returns true if row is marked for deletion by user.
|
void |
markForDeletion(int row)
Marks the row for being deleted with next OK button press.
|
void |
setColumnName(int col,
java.lang.String columnName)
Sets the column name of the specified column.
|
void |
setValueAt(java.lang.Object value,
int row,
int col)
Sets a cell's value.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
protected java.util.Locale locale
protected java.lang.String[] columnNames
protected java.lang.String[] fieldNames
protected java.lang.Object[] fieldInis
protected int[] fieldTypes
protected java.lang.Object[][] data
protected java.lang.Object[][] oriData
protected Identifier[] identifier
protected boolean[] delMark
protected java.lang.String order
protected int lastModifiedRow
public IdentifyTableModel()
public IdentifyTableModel(java.lang.String[] columnNames, Identifier[] identifier, java.lang.Object[][] data)
public Identifier getIdentifier(int row)
row
- the regarded rowpublic void markForDeletion(int row)
row
- the row to be deletedprotected java.lang.String getTranslation(java.lang.String resourceKey)
resourceKey
- the key of the resource to retrievepublic boolean isInputAccepted(TableAdministration dta)
public boolean isModified()
ModifiedInformer
isModified
in interface ModifiedInformer
public boolean isRowModified(int row)
row
- the regarded rowpublic boolean isToDelete(int row)
row
- the row to checkpublic int getLastModifiedRow()
public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
public int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
public java.lang.String getColumnName(int col)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
col
- the column indexpublic void setColumnName(int col, java.lang.String columnName)
col
- the column indexcolumnName
- the new column namepublic java.lang.Object getValueAt(int row, int col)
getValueAt
in interface javax.swing.table.TableModel
row
- the row indexcol
- the column indexpublic java.lang.Class<?> getColumnClass(int columnIndex)
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
public boolean isCellEditable(int row, int col)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
row
- the row indexcol
- the column indexpublic boolean isMarkedForDeletion(int row)
public void setValueAt(java.lang.Object value, int row, int col)
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
value
- the new value of the cellrow
- the row indexcol
- the column indexCopyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de