Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340228 - Add isCached() to TableItem.java
Summary: Add isCached() to TableItem.java
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-16 15:34 EDT by Brad CLA
Modified: 2011-03-24 09:37 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brad CLA 2011-03-16 15:34:31 EDT
In org.eclipse.swt.widgets.TableItem

make the boolean cached available to developers:

Add function to make the private "cached" field accessible to the public. 

public boolean isCached()
{
    return cached;
}


This added function allows developers to know whether it is required to update the contents of a tableItem in a (VIRTUAL) SWT table.

Reason for this feature:

Say you have a virtual list of 500K items, with 100 table items viewed by the user (cached is true). Through some background activity, 500 list items change and their text values must be updated.. but only 1 item has been drawn (and is "cached"). By knowing this, we can just update the "visible" or recently viewed. All other tableitems will be redrawn correctly when the user scrolls through the data, using the virtual mechanism already in place.

I use this in my Tables to "redrawRow(Obect t)" and redrawRows(ArrayList l) so that I can speed up updates to the list. 

Thanks.
Comment 1 Felipe Heidrich CLA 2011-03-24 09:37:33 EDT
see
Table#clear(int)
Table#clear(int,int)
Table#clear(int[])
Table#clearAll()