Class TaskTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- org.opends.guitools.controlpanel.datamodel.SortableTableModel
-
- org.opends.guitools.controlpanel.datamodel.TaskTableModel
-
- All Implemented Interfaces:
Serializable,Comparator<TaskEntry>,TableModel
public class TaskTableModel extends SortableTableModel implements Comparator<TaskEntry>
The table used to display the tasks.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description TaskTableModel()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(TaskEntry desc1, TaskEntry 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.TaskEntryget(int row)Gets the TaskDescriptor in a given row.LinkedHashSet<org.forgerock.i18n.LocalizableMessage>getAllAttributes()Returns the set of attributes ordered.Class<?>getColumnClass(int column)intgetColumnCount()Returns the column count.StringgetColumnName(int col)Set<org.forgerock.i18n.LocalizableMessage>getDisplayedAttributes()Returns the set of attributes ordered.intgetRowCount()Returns the row count.intgetSortColumn()Returns the column index used to sort.ObjectgetValueAt(int row, int column)booleanisSortAscending()Returns whether the sort is ascending or descending.voidsetAttributes(Set<org.forgerock.i18n.LocalizableMessage> attributes)Sets the operations displayed by this table model.voidsetData(Set<TaskEntry> 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, 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<TaskEntry> 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.
-
setAttributes
public void setAttributes(Set<org.forgerock.i18n.LocalizableMessage> attributes)
Sets the operations displayed by this table model.- Parameters:
attributes- the attributes displayed by this table model.
-
getColumnClass
public Class<?> getColumnClass(int column)
- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classAbstractTableModel
-
getColumnName
public String getColumnName(int col)
- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel
-
getValueAt
public Object getValueAt(int row, int column)
- Specified by:
getValueAtin interfaceTableModel
-
getRowCount
public int getRowCount()
Returns the row count.- Specified by:
getRowCountin interfaceTableModel- Returns:
- the row count.
-
getColumnCount
public int getColumnCount()
Returns the column count.- Specified by:
getColumnCountin interfaceTableModel- Returns:
- the column count.
-
get
public TaskEntry get(int row)
Gets the TaskDescriptor in a given row.- Parameters:
row- the row.- Returns:
- the TaskDescriptor in a given row.
-
getDisplayedAttributes
public Set<org.forgerock.i18n.LocalizableMessage> getDisplayedAttributes()
Returns the set of attributes ordered.- Returns:
- the set of attributes ordered.
-
getAllAttributes
public LinkedHashSet<org.forgerock.i18n.LocalizableMessage> getAllAttributes()
Returns the set of attributes ordered.- Returns:
- the set of attributes ordered.
-
compare
public int compare(TaskEntry desc1, TaskEntry desc2)
- Specified by:
comparein interfaceComparator<TaskEntry>
-
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..
-
-