public class PGroupModel extends PAbstractSortingTableModel
listenerList
Constructor and Description |
---|
PGroupModel(String sharingType,
POwnershipPanel parent)
Constructs an
PGroupModel with the specified sharing type key. |
Modifier and Type | Method and Description |
---|---|
protected void |
formatTable(JTable table)
Customizing the table according to derived class needs.
|
Class |
getColumnClass(int columnIndex)
Returns objects class with respect to
columnIndex . |
int |
getColumnCount()
Returns the number of columns in the model.
|
String |
getColumnName(int col)
Returns the name of the column at
col . |
protected Object |
getValueForColumn(Object element,
int columnIndex)
Returns the cell value from the passed row data structure
at
columnIndex . |
void |
setData(ArrayList l)
Setting of data to the model.
|
protected void |
sortOnColumn(int sortColumn)
This will sort the data structure on the passed column index
sortColumn and fire the model to update the view. |
getLastClickedColumn, getRowAt, getRowCount, getSelectedData, getSelectedDataArray, getTable, getValueAt, setAscending, setData, sortOnColumnOfRange
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
public PGroupModel(String sharingType, POwnershipPanel parent)
PGroupModel
with the specified sharing type key.sharingType
- the sharing type key.parent
- POwnershipPanel the owner ship panel.protected Object getValueForColumn(Object element, int columnIndex)
columnIndex
.getValueForColumn
in class PAbstractSortingTableModel
element
- Object the row objectcolumnIndex
- int the column whose value is to be queriedpublic String getColumnName(int col)
col
. This is used
to initialize the table's column header name. Note: this name does
not need to be unique; two columns in a table can have the same name.getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
col
- the index of the columnpublic int getColumnCount()
JTable
uses this method to determine how many columns it
should create and display by default.public Class getColumnClass(int columnIndex)
columnIndex
.getColumnClass
in interface TableModel
getColumnClass
in class AbstractTableModel
columnIndex
- the column being queriedpublic void setData(ArrayList l)
l
- ArrayList the groupsprotected void formatTable(JTable table)
formatTable
in class PAbstractSortingTableModel
table
- JTable
Subclasses should override this, but also call super.formatTable(table)protected void sortOnColumn(int sortColumn)
sortColumn
and fire the model to update the view.
Subclasses should override this, but also call
super.sortOnColumn(sortColumn) for simple sorringsortOnColumn
in class PAbstractSortingTableModel
sortColumn
- int the column index on which sorting should happen.Copyright © 2003, 2023, Oracle and/or its affiliates.