public abstract class AbstractIndexTableModel extends SortableTableModel implements Comparator<AbstractIndexDescriptor>
Modifier and Type | Field and Description |
---|---|
protected boolean |
sortAscending
Whether the sorting is ascending or descending.
|
protected int |
sortColumn
The sort column of the table.
|
listenerList
Constructor and Description |
---|
AbstractIndexTableModel() |
Modifier and Type | Method and Description |
---|---|
protected int |
compareNames(AbstractIndexDescriptor i1,
AbstractIndexDescriptor i2)
Compares the names of the two indexes.
|
protected int |
compareRebuildRequired(AbstractIndexDescriptor i1,
AbstractIndexDescriptor i2)
Compares the rebuild messages for the two indexes.
|
void |
forceResort()
Updates the table model contents and sorts its contents depending on the
sort options set by the user.
|
int |
getColumnCount() |
String |
getColumnName(int col) |
protected abstract String[] |
getColumnNames()
Returns the column names of the table.
|
AbstractIndexDescriptor |
getIndexAt(int row)
Returns the index in the specified row.
|
protected abstract String[] |
getLine(AbstractIndexDescriptor index)
Returns the different cell values for a given index in a String array.
|
protected LocalizableMessage |
getRebuildRequiredString(AbstractIndexDescriptor index)
Returns the message to be displayed in the cell if an index must be
rebuilt.
|
int |
getRowCount() |
int |
getSortColumn()
Returns the column index used to sort.
|
Object |
getValueAt(int row,
int col) |
boolean |
isSortAscending()
Returns whether the sort is ascending or descending.
|
void |
setData(Set<AbstractIndexDescriptor> newData,
ControlPanelInfo info)
Sets the data for this table model.
|
void |
setSortAscending(boolean sortAscending)
Sets whether to sort ascending of descending.
|
void |
setSortColumn(int sortColumn)
Sets the column index used to sort.
|
getHeader, getHeader
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compare, equals
protected int sortColumn
protected boolean sortAscending
public AbstractIndexTableModel()
public void setData(Set<AbstractIndexDescriptor> newData, ControlPanelInfo info)
newData
- the data for this table model.info
- the control panel info.public void forceResort()
forceResort
in class SortableTableModel
public int getColumnCount()
getColumnCount
in interface TableModel
public int getRowCount()
getRowCount
in interface TableModel
public Object getValueAt(int row, int col)
getValueAt
in interface TableModel
public String getColumnName(int col)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
public boolean isSortAscending()
isSortAscending
in class SortableTableModel
true
if the sort is ascending and false
otherwise.public void setSortAscending(boolean sortAscending)
setSortAscending
in class SortableTableModel
sortAscending
- whether to sort ascending or descending.public int getSortColumn()
getSortColumn
in class SortableTableModel
public void setSortColumn(int sortColumn)
setSortColumn
in class SortableTableModel
sortColumn
- column index used to sort..public AbstractIndexDescriptor getIndexAt(int row)
row
- the row.protected LocalizableMessage getRebuildRequiredString(AbstractIndexDescriptor index)
index
- the index to be analyzed.protected int compareNames(AbstractIndexDescriptor i1, AbstractIndexDescriptor i2)
i1
- the first index.i2
- the second index.protected int compareRebuildRequired(AbstractIndexDescriptor i1, AbstractIndexDescriptor i2)
i1
- the first index.i2
- the second index.protected abstract String[] getColumnNames()
protected abstract String[] getLine(AbstractIndexDescriptor index)
index
- the index.Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.