Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 372889 - Swing: Clicks in a tree does only work on displayed texts
Summary: Swing: Clicks in a tree does only work on displayed texts
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Scout (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-29 13:17 EST by Bruno Koeferli CLA
Modified: 2021-08-19 11:10 EDT (History)
1 user (show)

See Also:
ivan.motsch: indigo+
ivan.motsch: juno+


Attachments
Patch implementing the PROPOSED SOLUTION (6.78 KB, patch)
2012-02-29 13:17 EST, Bruno Koeferli CLA
ivan.motsch: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bruno Koeferli CLA 2012-02-29 13:17:09 EST
Created attachment 211825 [details]
Patch implementing the PROPOSED SOLUTION

Build Identifier: 3.7.2

PROBLEM DESCRIPTION:
Clicks in a tree (f.e. right click to get context menu) does only work on displayed texts and not in the empty area on the left or right side of a node/leaf.

EVALUATION:
In SwingScoutTree the node will be get by JTree's getPathForLocation(int x, int y) which only returns a node if the mouse pointer exactly resides over it.

PROPOSED SOLUTION:
Implementing a custom getPathForLocation(int x, int y) method which also returns a node if the mouse pointer resides in the empty area on the left or right side of a node/leaf.

Reproducible: Always
Comment 1 Ivan Motsch CLA 2012-03-02 07:31:43 EST
Applied patch with minor modifications, Thanks!
Comment 2 Ivan Motsch CLA 2012-03-28 02:51:29 EDT
backported to 3.7
Comment 3 Matthias Zimmermann CLA 2013-07-08 17:36:41 EDT
Bugfixes shipped on Scout 3.7 branch