Bug 228450 - Improve UX allowing mouse click over blank area of Tree elements to select them
Improve UX allowing mouse click over blank area of Tree elements to select them
Status: REOPENED
Product: platform
Classification: Unclassified
Component: Explorer
7.3
PC Linux
: P4 with 3 votes (vote)
: TBD
Assigned To: Jan Peska
issues@platform
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-10 15:50 UTC by brunoborges
Modified: 2013-05-30 14:03 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
clicks over tree itens (13.96 KB, image/png)
2013-04-10 15:50 UTC, brunoborges
Details
Trivial patch (1.00 KB, patch)
2013-04-24 02:07 UTC, _ tboudreau
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description brunoborges 2013-04-10 15:50:08 UTC
Created attachment 133431 [details]
clicks over tree itens

For example, when I'm working on the Projects tree view, a selected item is highlighted fully, covering the whole width of the view.

But to select another item in the tree view, it only works when I click on the text of the item, not on the "line" of the item.

On the attached image, I have marked 4 points of click and their behaviour:

(yellow) selects the item "Issue Trackers"
(green) selects the item "Hudson Builders"
(blue) does NOT select the item "Cloud"
(red) does NOT select the item "Servers"
Comment 1 Jaroslav Tulach 2013-04-15 06:16:45 UTC
Unless Standa knows an easy way to achieve this in standard Swing, we'll assume this is standard Swing behavior that we just accept in explorer.
Comment 2 brunoborges 2013-04-15 06:24:06 UTC
So I assume that the status should not be "FIXED", as this is not going to be fixed at all.
Comment 3 brunoborges 2013-04-15 06:29:03 UTC
Accordin to this article, it is possible to achieve the "correct" behaviour:

http://tuxicity.se/java/jtree/swing/2009/09/06/select-whole-row-in-jtree.html
Comment 4 Stanislav Aubrecht 2013-04-23 10:10:09 UTC
That's how Swing works. Please file a bug against JDK if you want it fixed.
Comment 5 brunoborges 2013-04-23 21:11:40 UTC
Don't see this as Swing bug, but as a poor UX of NetBeans. This might be the default Swing behaviour, but Swing offers a way to improve the user experience, as presented in the referenced article.

Sorry if saying that "correct behaviour" led to a misunderstanding of this issue.

On a sidenote, I doubt Swing team will change the default behaviour. 

But NetBeans could definitely improve its UX.
Comment 6 _ tboudreau 2013-04-24 02:07:47 UTC
Created attachment 133733 [details]
Trivial patch

Claiming "this is standard Swing behavior" isn't really an excuse - there are already plenty of places where explorer trees customize that behavior (right click outside the tree, continuation tooltips, double-click behavior, the timer that makes all single clicks not result in a rename operation).

In fact, the attached patch adds its behavior to existing code which makes double-clicking already behave the way Bruno is suggesting - this just adds it for single clicks.
Comment 7 Stanislav Aubrecht 2013-04-24 09:03:39 UTC
The patch might be trivial but it doesn't address all full-row select issues - it doesn't initiate dnd when clicked outside the cell area, doesn't expand on double-click, doesn't show popup menu etc.
It has also unwanted side-effect that clicking expansion icon selects the tree row.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo