Announcement Announcement Module
Collapse
No announcement yet.
Anyway to use GuardedActionCommandExecutor on JTree? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Anyway to use GuardedActionCommandExecutor on JTree?

    Hi all,

    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?

    thanks

  • #2
    You had all the elements you need to solve this right here in your post:

    Originally posted by mxc4 View Post
    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?
    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.

    Comment

    Working...
    X