Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 286520

Summary: Missing ScrolledComposite.setShowFocusedControl() and default behavior inconsistent with SWT
Product: [RT] RAP Reporter: Robert Enyedi <renyedi>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.2   
Target Milestone: 1.3 M2   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
SWT sample showing default behavior
none
RWT sample - initial state
none
RWT sample - initial state
none
RWT sample - after clicking a tree item
none
SWT sample - initial state
none
SWT sample - after clicking a tree item
none
SWT sample - after clicking a tree item with ScrolledComposite.setShowFocusedControl(true)
none
RWT sample - view containing the tree widget
none
RWT sample - entry point declaring the scrolled composite none

Description Robert Enyedi CLA 2009-08-13 09:47:44 EDT
Created attachment 144387 [details]
SWT sample showing default behavior

Build ID: 20090619-0625

Steps To Reproduce:


More information:
Following the conclusions from another thread (http://dev.eclipse.org/newslists/news.eclipse.technology.rap/msg07269.html) I came to the following findings that apply to RAP 1.2.

The method setShowFocusedControl() in ScrolledComposite is missing whereas it is available in SWT since version 3.4. My problem is that the default behavior in RWT differs from that of SWT: the
Comment 1 Robert Enyedi CLA 2009-08-13 09:49:38 EDT
Created attachment 144388 [details]
RWT sample - initial state
Comment 2 Robert Enyedi CLA 2009-08-13 09:51:37 EDT
Created attachment 144389 [details]
RWT sample - initial state
Comment 3 Robert Enyedi CLA 2009-08-13 09:53:28 EDT
Created attachment 144390 [details]
RWT sample - after clicking a tree item

Notice that the header has disappeared due to automatic scrolling.
Comment 4 Robert Enyedi CLA 2009-08-13 09:55:12 EDT
Created attachment 144391 [details]
SWT sample - initial state
Comment 5 Robert Enyedi CLA 2009-08-13 09:56:00 EDT
Created attachment 144392 [details]
SWT sample - after clicking a tree item

Notice that by default no scrolling happens in the root scrolled composite.
Comment 6 Robert Enyedi CLA 2009-08-13 09:57:15 EDT
Created attachment 144393 [details]
SWT sample - after clicking a tree item with ScrolledComposite.setShowFocusedControl(true)

Notice the similar behavior with https://bugs.eclipse.org/bugs/attachment.cgi?id=144390
Comment 7 Robert Enyedi CLA 2009-08-13 09:58:57 EDT
Created attachment 144395 [details]
RWT sample - view containing the tree widget
Comment 8 Robert Enyedi CLA 2009-08-13 09:59:34 EDT
Created attachment 144396 [details]
RWT sample - entry point declaring the scrolled composite
Comment 9 Robert Enyedi CLA 2009-08-13 10:00:00 EDT
Comment on attachment 144389 [details]
RWT sample - initial state

Duplicate
Comment 10 Robert Enyedi CLA 2009-08-13 10:05:27 EDT
Steps to reproduce (both in RWT and SWT samples):
1. Start the application (initial states shown in scrolledcomposite-RWT-state1.png and scrolledcomposite-SWT-state1.png)
2. Click on a tree item
3. In the RWT sample the root scrolled composite is automatically scrolled so that the header label disappears (scrolledcomposite-RWT-state2.png).
4. Notice that in SWT the root scrolled composite does no scrolling at all (scrolledcomposite-SWT-state2.png). However, if in ScrollTestShell.java you uncomment line 35 (scrolledComposite.setShowFocusedControl(true);), the behavior will match that of RWT (scrolledcomposite-SWT-state3.png). But this is NOT the default behavior.
Comment 11 Ivan Furnadjiev CLA 2009-09-23 10:57:08 EDT
ScrolledComposite#setShowFocusedControl(boolean) is implemented. Now there should be no difference with SWT.