1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
jules 2007-10-24 18:27:38 +00:00
parent 8dd2db73d2
commit fa5ebd9dca
2 changed files with 23 additions and 4 deletions

View file

@ -409,9 +409,7 @@ void TableHeaderComponent::setSortColumnId (const int columnId, const bool sortF
if (ci != 0)
ci->propertyFlags |= (sortForwards ? sortedForwards : sortedBackwards);
sortChanged = true;
repaint();
triggerAsyncUpdate();
reSortTable();
}
}
@ -433,6 +431,13 @@ bool TableHeaderComponent::isSortedForwards() const throw()
return true;
}
void TableHeaderComponent::reSortTable()
{
sortChanged = true;
repaint();
triggerAsyncUpdate();
}
//==============================================================================
const String TableHeaderComponent::toString() const
{

View file

@ -220,7 +220,11 @@ public:
/** Changes the column which is the sort column.
This can cause an asynchronous callback to the tableSortOrderChanged() method of any registered listeners.
@see getSortColumnId, isSortedForwards
If this method doesn't actually change the column ID, then no re-sort will take place (you can
call reSortTable() to force a re-sort to happen if you've modified the table's contents).
@see getSortColumnId, isSortedForwards, reSortTable
*/
void setSortColumnId (const int columnId, const bool sortForwards);
@ -235,6 +239,16 @@ public:
*/
bool isSortedForwards() const throw();
/** Triggers a re-sort of the table according to the current sort-column.
If you modifiy the table's contents, you can call this to signal that the table needs
to be re-sorted.
(This doesn't do any sorting synchronously - it just asynchronously sends a call to the
tableSortOrderChanged() method of any listeners).
*/
void reSortTable();
//==============================================================================
/** Returns the total width of all the visible columns in the table.
*/