This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 11928 - add selection mode control to TreeView
Summary: add selection mode control to TreeView
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P1 blocker (vote)
Assignee: Petr Nejedly
URL:
Keywords: API, UI
Depends on:
Blocks: 19875
  Show dependency tree
 
Reported: 2001-05-04 07:10 UTC by Rochelle Raccah
Modified: 2008-12-22 22:58 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
a proposed implementation (1.54 KB, patch)
2002-04-11 18:53 UTC, Jiri Rechtacek
Details | Diff
a binary patch (96.26 KB, application/octet-stream)
2002-04-20 19:05 UTC, Jiri Rechtacek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rochelle Raccah 2001-05-04 07:10:20 UTC
Allow control of the selection mode (choices in swing are SINGLE_TREE_SELECTION,
CONTIGUOUS_TREE_SELECTION, DISCONTIGUOUS_TREE_SELECTION) from the TreeView APIs.
Comment 1 Jan Chalupa 2001-05-06 08:14:23 UTC
Target milestone -> 3.3
Comment 2 Jan Chalupa 2001-11-27 13:04:19 UTC
Target milestone -> 3.3.1.
Comment 3 Rochelle Raccah 2002-01-08 19:44:39 UTC
I did bring this up on nbdev and this bug was filed as a result =). 
See
<http://www.netbeans.org/servlets/ReadMsg?msgId=79269&listName=nbdev>
Comment 4 Rochelle Raccah 2002-01-10 17:48:37 UTC
Once this is implemented, the DataObject editor in the core should be
cleaned up to use this solution.
Comment 5 David Simonek 2002-02-05 14:18:11 UTC
This should be easy and straighforward API change, remember
modification of DataObject (consult wiht Petr Hamernik if needed).
Comment 6 Jiri Rechtacek 2002-04-11 16:15:12 UTC
x
Comment 7 Jiri Rechtacek 2002-04-11 18:53:11 UTC
Created attachment 5377 [details]
a proposed implementation
Comment 8 Jiri Rechtacek 2002-04-11 18:59:21 UTC
I attached a simple patch. I played with it and it worked for me,
JTree dial lowed multiple selection if I set SINGLE_TREE_SELECTION
e.g. I was not sure if I understand demand correctly. If yes then a
proposed patch solved it enough. Rochelle, could you look on the
patch? Thank you
Comment 9 Rochelle Raccah 2002-04-11 19:18:53 UTC
I guess our paths crossed =).  I don't understand what you mean "
JTree dial lowed multiple selection if I set SINGLE_TREE_SELECTION". 
I assume there's a typo there, but I'm unsure about the intent of the
statement.  Can you clarify?
Comment 10 Jiri Rechtacek 2002-04-12 07:36:44 UTC
Yes, you are right, it was typo. I thought the JTree *disallowed*
multiple selection if I set SINGLE_TREE_SELECTION. (my spell checker
made this replace :-)
I wanted say: adding these two methods reach the TreeView behavior
which is asked IMHO. Question for you should be: Is the last statement
truthful? Sorry for my bad english.
Comment 11 Rochelle Raccah 2002-04-16 06:45:48 UTC
Yes, JTree behavior was the goal.  I didn't try the patch, but your
description sounds like it is working correctly.  The only other
comment I have is to mention the default in the javadoc.
Comment 12 Jaroslav Tulach 2002-04-18 06:38:15 UTC
Probably those new methods should be final. What happens when one
calls ExplorerManager.setSelectedNodes (new Node[2]) - will the JTree
properly veto the selection?
Comment 13 Rochelle Raccah 2002-04-18 06:49:38 UTC
What happens in that case if the JTree is configured for single
selection via a java subclass of TreeView which allows access to the
JTree?  This should behave in the same way.
Comment 14 Jiri Rechtacek 2002-04-20 19:05:54 UTC
Created attachment 5500 [details]
a binary patch
Comment 15 Jiri Rechtacek 2002-04-24 10:09:23 UTC
the methods are added, implemented in main trunk
Comment 16 Rochelle Raccah 2003-07-09 23:39:11 UTC
There are 3 outstanding parts:
1) javadoc lists the choices without TreeSelectionModel as a prefix
which means a user who reads it literally will have broken code
2) javadoc still doesn't list the default as I requested
3) DataObjectTreeView has not been cleaned up (see
SingleSelectionBeanTreeView in
core/src/org/netbeans/beaninfo/editors/DataObjectTreeView.java)
Comment 17 Jiri Rechtacek 2004-04-23 10:45:21 UTC
Assigned to new owner.
Comment 18 _ alexlamsl 2005-12-01 00:50:02 UTC
Just curious - what is the progress with this issue in NB5 so far?
Comment 19 Petr Nejedly 2005-12-01 12:01:17 UTC
The proposal was implemented, all Rochelle's complains were resolved over the
time, so I can close this as fixed.
Thanks to everybody involved.