Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 190258 - OutlineView ignores Node.getPreferredAction() on branch nodes
OutlineView ignores Node.getPreferredAction() on branch nodes
Product: platform
Classification: Unclassified
Component: Outline&TreeTable
All All
: P3 (vote)
: 7.0
Assigned To: Martin Entlicher
Depends on:
  Show dependency treegraph
Reported: 2010-09-09 10:20 UTC by edvin
Modified: 2010-10-05 03:13 UTC (History)
0 users

See Also:
Issue Type: DEFECT

Patch to add defaultActionAllowed functionality (1.76 KB, patch)
2010-09-09 10:24 UTC, edvin
Details | Diff
API change with change in node rename gesture. (7.71 KB, patch)
2010-09-13 16:05 UTC, Martin Entlicher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description edvin 2010-09-09 10:20:44 UTC
According to, OutlineView is supposed to honor Node.getPreferredAction() when double clicking a node. This does not work for branch nodes, requiring a context menu entry to fire off the preferred action instead of double click.

This can easily be fixed by introducing a boolean defaultActionAllowed like TreeView does, and checking the boolean state in OutlineViewOutline#editCellAt.

Users are accustomed to double clicking to edit an object even in an Explorer View, ref Windows Explorer, it would be great to have this option for the OutlineView as well!
Comment 1 edvin 2010-09-09 10:24:55 UTC
Created attachment 101960 [details]
Patch to add defaultActionAllowed functionality

The attached patch shows how the functionality could be implemented.
Comment 2 Martin Entlicher 2010-09-13 16:03:25 UTC
This patch is not much consistent with TreeView.setDefaultActionAllowed().
The problem is that setting OutlineView.setDefaultActionAllowed(true) always tries to invoke the default action, but setting OutlineView.setDefaultActionAllowed(false) does not disable the invocation of default action, it's still invoked for leaf nodes that do not support rename.

The main problem seems to be that the rename in the tree column of OutlineView is not triggered in the same way as in the TreeView. In the TreeView rename is initiated by two clicks on the same node, but in the OutlineView you have to double-click the node, which is identical with the default action invocation.
Comment 3 Martin Entlicher 2010-09-13 16:05:35 UTC
Created attachment 102000 [details]
API change with change in node rename gesture.
Comment 4 Martin Entlicher 2010-09-13 16:09:34 UTC
I'm proposing a change in node rename gesture in Outline. Two consecutive clicks are consistent with the rename gesture in trees, the current double-click collides with default action invocation.

Then we're introducing two methods - OutlineView.setDefaultActionAllowed() and OutlineView.isDefaultActionAllowed() that are similar in functionality to TreeView.setDefaultActionAllowed().
Comment 5 edvin 2010-09-13 16:18:01 UTC
I absolutely agree - double clicking to rename has never been a known idiom AFAIK, so changing this makes much sense.
Comment 6 Martin Entlicher 2010-10-04 14:50:46 UTC
Thanks for the review, I'm going to integrate this change later today.
Comment 7 Martin Entlicher 2010-10-04 21:20:21 UTC
Pushed in changeset 3586979ee676
Comment 8 Quality Engineering 2010-10-05 03:13:21 UTC
Integrated into 'main-golden', will be available in build *201010050000* on (upload may still be in progress)
Log: #190258 Control the allowance of default action and invoke rename via two consecutive clicks.

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