Dec 24th, 2008, 10:50 AM
Anyway to use GuardedActionCommandExecutor on JTree?
I have seen examples with a context-sensitive popup menu on right for a component that extends AbstractObjectTable but what about a context-sensitive menu for a plane old JTree? I can get a popup menu by adding a PopupMenuMouseListener object to the JTree's addMouseListener but how do I create the ValueModel object on the JTree? The ListSelectionModelAdapter class doesn't seem to want to take a TreeSelectionModel object from JTree?
Do I need to extend a richclient specific class to do this? If so what is the class name for use with JTree?
Dec 26th, 2008, 03:27 AM
You had all the elements you need to solve this right here in your post:
Sounds to me like you are looking for a TreeSelectionModelAdapter. If one does not exist (too lazy to check!), make your own, based on what the ListSelectionModelAdapter does. You have (access to) the source, so it should be easy.
Originally Posted by mxc4