Class ConnectionHandlerTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- org.opends.guitools.controlpanel.datamodel.SortableTableModel
-
- org.opends.guitools.controlpanel.datamodel.ConnectionHandlerTableModel
-
- All Implemented Interfaces:
Serializable,Comparator<ConnectionHandlerDescriptor>,TableModel
public class ConnectionHandlerTableModel extends SortableTableModel implements Comparator<ConnectionHandlerDescriptor>
The table model used by the table that displays the connection handlers.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description ConnectionHandlerTableModel()Constructor for this table model.ConnectionHandlerTableModel(boolean wrapHeader)Constructor for this table model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(ConnectionHandlerDescriptor desc1, ConnectionHandlerDescriptor desc2)Comparable implementation.voidforceResort()Updates the table model contents and sorts its contents depending on the sort options set by the user.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.voidsetData(Set<ConnectionHandlerDescriptor> 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
-
-
-
-
Constructor Detail
-
ConnectionHandlerTableModel
public ConnectionHandlerTableModel()
Constructor for this table model.
-
ConnectionHandlerTableModel
public ConnectionHandlerTableModel(boolean wrapHeader)
Constructor for this table model.- Parameters:
wrapHeader- whether to wrap the headers or not. monitoring information or not.
-
-
Method Detail
-
setData
public void setData(Set<ConnectionHandlerDescriptor> 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
-
compare
public int compare(ConnectionHandlerDescriptor desc1, ConnectionHandlerDescriptor desc2)
Comparable implementation.- Specified by:
comparein interfaceComparator<ConnectionHandlerDescriptor>- Parameters:
desc1- the first listener descriptor to compare.desc2- the second listener descriptor to compare.- Returns:
- 1 if according to the sorting options set by the user the first listener descriptor must be put before the second descriptor, 0 if they are equivalent in terms of sorting and -1 if the second descriptor must be put before the first descriptor.
-
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
-
isSortAscending
public boolean isSortAscending()
Description copied from class:SortableTableModelReturns whether the sort is ascending or descending.- Specified by:
isSortAscendingin classSortableTableModel- Returns:
trueif the sort is ascending andfalseotherwise.
-
setSortAscending
public void setSortAscending(boolean sortAscending)
Description copied from class:SortableTableModelSets whether to sort ascending of descending.- Specified by:
setSortAscendingin classSortableTableModel- Parameters:
sortAscending- whether to sort ascending or descending.
-
getSortColumn
public int getSortColumn()
Description copied from class:SortableTableModelReturns the column index used to sort.- Specified by:
getSortColumnin classSortableTableModel- Returns:
- the column index used to sort.
-
setSortColumn
public void setSortColumn(int sortColumn)
Description copied from class:SortableTableModelSets the column index used to sort.- Specified by:
setSortColumnin classSortableTableModel- Parameters:
sortColumn- column index used to sort..
-
-