Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347802 - Selected tree node not visible with many rows
Summary: Selected tree node not visible with many rows
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Scout (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-31 10:49 EDT by Matthias Zimmermann CLA
Modified: 2021-08-19 11:20 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Zimmermann CLA 2011-05-31 10:49:18 EDT
PROBLEM DESCRIPTION:
- Assume a table page with a large number of rows (such that not all rows can be displayed at the same time, i.e. the table on the right side has scrollbars). [Screenshot 1]
- When you scroll down and double-click on a row [Screenshot 2], the node is expanded and selected.
- However, the selected node in the tree is not visible, because the tree does not scroll automatically. [Screenshot 3]
- The user has to scroll manually to find the selected tree node. [Screenshot 4]

When double-clicking on a row in an outlines table, the tree should scroll automatically to the selected node.

EVALUATION:
There is an existing property on AbstractTree (getConfiguredScrollable) which, when activated, causes the tree to automatically scroll to the selected node (regardless of how the node is selected, programmatically or by mouse or keyboard event). Unfortunately, this behaviour has two drawbacks: (1.) The auto-scroll mechanism is not only applied when double-clicking on a table page row, but also when navigating in the tree. When the user clicks in the tree, the targeted node is usually already visible, there is no reason to move the position. "Jumping" nodes are irritating to the user. (2.) The selected node is moved in both dimensions (vertically and horizontally). When the tree is wider than the available space, the resulting horizontal positioning does not look good. [Screenshot 5]

getConfiguredScrollable=true does too much and is therefore not a suitable solution for the problem described above.

PROPOSED SOLUTION:
- Add a new method to ITree that scrolls the tree to a specified node. This does not necessarily have to be the selected node (so that the method has a more general purpose).
- The new method should scroll the tree only vertically. The horizontal position should not be changed. (The "best" position depends on the GUI / Look&Feel and cannot be calculated in Scout code.)
- AbstractPageWithNode and AbstractPageWithTable call the new method, when the user double-clicks on a row.
- Introduce a special config.ini property to activate the new behaviour. Like that, existing projects are not influenced by the change until they intentionally activate it.
Comment 1 Matthias Zimmermann CLA 2011-05-31 10:49:47 EDT
fixed on 4.5.11, #100433
Comment 2 Matthias Zimmermann CLA 2011-06-28 09:15:45 EDT
shipped with eclipse scout 3.7.0