Community
Participate
Working Groups
The Tree widget flicks when we redraw it with the Tree.redraw() method on the Windows platform. One of the possible solutions is redrawing of the Tree with the double-buffering (using the BitBlt method - http://msdn.microsoft.com/en-gb/library/windows/desktop/dd183370%28v=vs.85%29.aspx)
Daniel, please attach an SWT snippet that shows the problem.
Created attachment 243172 [details] Sample presenting the gaps/cheese issue
Created attachment 243173 [details] Sample presenting the flicking issue during redrawing the entire Tree I've attached two snippets: 1) 'Sample presenting the gaps/cheese issue' -> it is just to show the original issue that we try to fix 2) 'Sample presenting the flicking issue during redrawing the entire Tree' -> the flicking issue that want to fix with this bug. Basically the more complicated Tree to draw (i.e. with images or multi-level structure -> redraw of the tree consumes more time), the flicking issue is better visible Daniel
(In reply to Daniel Rolka from comment #2) > Created attachment 243172 [details] > Sample presenting the gaps/cheese issue This snippet is invalid client code. When the user clicks the same item again, - SWT sends a PaintEvent - the CheeseIssueSimulator fills the whole tree with white - the CheeseIssueSimulator only calls gc.drawText(..) for the selected item => SWT has nothing more to do. Note that listening to Paint events is not the right approach to replace tree drawing. Clients should use the owner draw APIs (bug 81334), which operate on individual TreeItems, and not on the whole Tree like PaintEvents. (In reply to Daniel Rolka from comment #3) > Created attachment 243173 [details] > Sample presenting the flicking issue during redrawing the entire Tree I don't see any flickering when I click items in this tree.
(In reply to Markus Keller from comment #4) > (In reply to Daniel Rolka from comment #3) > > Created attachment 243173 [details] > > Sample presenting the flicking issue during redrawing the entire Tree > > I don't see any flickering when I click items in this tree. Have you tried the sample on Windows? On my Windows 7 I see flicking Daniel
(In reply to Daniel Rolka from comment #5) > (In reply to Markus Keller from comment #4) > > (In reply to Daniel Rolka from comment #3) > > > Created attachment 243173 [details] > > > Sample presenting the flicking issue during redrawing the entire Tree > > > > I don't see any flickering when I click items in this tree. > > Have you tried the sample on Windows? On my Windows 7 I see flicking > > Daniel Just tried on Windows 7 against SWT from RC1. No flickering when clicking on tree items.
Unfortunately I see the flicking clicking on the Tree. It seems we have to consider the hardware in the issue as well Daniel
Which JRE are you using? Are you using 32- or 64-bit SWT?
(In reply to Dani Megert from comment #8) > Which JRE are you using? java version "1.6.0" Java(TM) SE Runtime Environment (build pwa6460sr9ifix-20110211_02(SR9+IZ94423)) IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Windows 7 amd64-64 jvmwa6460sr9-20101 124_69295 (JIT enabled, AOT enabled) J9VM - 20101124_069295 JIT - r9_20101028_17488ifx2 GC - 20101027_AA) JCL - 20110211_02 > Are you using 32- or 64-bit SWT? org.eclipse.swt.win32.win32.x86_64_3.103.0.v20140514-1435.jar Daniel
(In reply to Daniel Rolka from comment #0) > The Tree widget flicks when we redraw it with the Tree.redraw() method on > the Windows platform. > > One of the possible solutions is redrawing of the Tree with the > double-buffering (using the BitBlt method - > http://msdn.microsoft.com/en-gb/library/windows/desktop/dd183370%28v=vs. > 85%29.aspx) I see that the drawing with the double buffering has been already added to the Tree widget. We have to use the style SWT.DOUBLE_BUFFERING for that. However it doesn't solve the issue - I still see the flicking clicking on the SampleOfStylingPreferencesWithCSS.Tree Daniel
(In reply to Daniel Rolka from comment #9) > (In reply to Dani Megert from comment #8) > > Which JRE are you using? > > java version "1.6.0" > Java(TM) SE Runtime Environment (build > pwa6460sr9ifix-20110211_02(SR9+IZ94423)) > IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Windows 7 amd64-64 I tried with the latest version of the IBM JRE 6 (sr16) and it also doesn't flicker. Note that I talk about 'SampleOfStylingPreferencesWithCSS' not the 'CheeseIssueSimulator' which is just wrong client code (see comment 4 for details).
(In reply to Dani Megert from comment #11) > (In reply to Daniel Rolka from comment #9) > > (In reply to Dani Megert from comment #8) > > > Which JRE are you using? > > > > java version "1.6.0" > > Java(TM) SE Runtime Environment (build > > pwa6460sr9ifix-20110211_02(SR9+IZ94423)) > > IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Windows 7 amd64-64 > > I tried with the latest version of the IBM JRE 6 (sr16) and it also doesn't > flicker. I have not seen any additional bugs reports on this so I mark it as invalid.