Results 1 to 2 of 2

Thread: Anyway to use GuardedActionCommandExecutor on JTree?

Hybrid View

  1. #1
    Join Date
    Dec 2008
    Posts
    1

    Default 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. #2
    Join Date
    Feb 2006
    Posts
    118

    Default

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

    Quote 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •