Class DatabaseMonitoringTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- org.opends.guitools.controlpanel.datamodel.SortableTableModel
-
- org.opends.guitools.controlpanel.datamodel.DatabaseMonitoringTableModel
-
- All Implemented Interfaces:
Serializable,Comparator<BackendDescriptor>,TableModel
public class DatabaseMonitoringTableModel extends SortableTableModel implements Comparator<BackendDescriptor>
The table model used to display all the database monitoring information.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description DatabaseMonitoringTableModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(BackendDescriptor desc1, BackendDescriptor desc2)voidforceDataStructureChange()Updates the table model contents, sorts its contents depending on the sort options set by the user and updates the column structure.voidforceResort()Updates the table model contents and sorts its contents depending on the sort options set by the user.Collection<String>getAttributes()Returns the fields displayed by this table model.intgetColumnCount()StringgetColumnName(int col)intgetRowCount()intgetSortColumn()Returns the column index used to sort.ObjectgetValueAt(int row, int col)booleanisSortAscending()Returns whether the sort is ascending or descending.voidsetAttributes(Set<String> fields)Sets the fields displayed by this table model.voidsetData(Set<BackendDescriptor> newData)Sets the data for this table model.voidsetSortAscending(boolean sortAscending)Sets whether to sort ascending of descending.voidsetSortColumn(int sortColumn)Sets the column index used to sort.-
Methods inherited from class org.opends.guitools.controlpanel.datamodel.SortableTableModel
getHeader, getHeader
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
setData
public void setData(Set<BackendDescriptor> newData)
Sets the data for this table model.- Parameters:
newData- the data for this table model.
-
forceResort
public void forceResort()
Updates the table model contents and sorts its contents depending on the sort options set by the user.- Specified by:
forceResortin classSortableTableModel
-
forceDataStructureChange
public void forceDataStructureChange()
Updates the table model contents, sorts its contents depending on the sort options set by the user and updates the column structure.
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCountin interfaceTableModel
-
getRowCount
public int getRowCount()
- Specified by:
getRowCountin interfaceTableModel
-
getValueAt
public Object getValueAt(int row, int col)
- Specified by:
getValueAtin interfaceTableModel
-
getColumnName
public String getColumnName(int col)
- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel
-
compare
public int compare(BackendDescriptor desc1, BackendDescriptor desc2)
- Specified by:
comparein interfaceComparator<BackendDescriptor>
-
isSortAscending
public boolean isSortAscending()
Returns whether the sort is ascending or descending.- Specified by:
isSortAscendingin classSortableTableModel- Returns:
trueif the sort is ascending andfalseotherwise.
-
setSortAscending
public void setSortAscending(boolean sortAscending)
Sets whether to sort ascending of descending.- Specified by:
setSortAscendingin classSortableTableModel- Parameters:
sortAscending- whether to sort ascending or descending.
-
getSortColumn
public int getSortColumn()
Returns the column index used to sort.- Specified by:
getSortColumnin classSortableTableModel- Returns:
- the column index used to sort.
-
setSortColumn
public void setSortColumn(int sortColumn)
Sets the column index used to sort.- Specified by:
setSortColumnin classSortableTableModel- Parameters:
sortColumn- column index used to sort..
-
getAttributes
public Collection<String> getAttributes()
Returns the fields displayed by this table model.- Returns:
- the fields displayed by this table model.
-
-