Swing Clipboard things
First post here, so here goes.
I'm working on a GUI to talk to an LDAP server and do some basic editing and searching. At the moment I've got some Cut/Copy/Past functions working really well on the tree. However, the standard keyboard shortcuts are gobbled up by the default Swing datatransfer handlers. I'm using custom classes for things derived off JTree and DefaultMutableTreeNode, rather than the stock classes, and it's all in Java 1.4.
So I figure I've got two solutions, and wondering if anyone has hints on either.
1) Disable the current bindings to Ctrl-X,C,V and let my current cut/copy/paste actions use them. I have no idea how to do this, or even seen it mentioned.
2) Work within the datatransfer framework and use the services provided there. However, I cannot find any good guides on how to do this. The API docs are pretty sparse in this area, and most of the mentions online I've found have to do with shuffling text about, whereas I need to move my TreeNode objects around.
Anyone have any idea?
I'm working on a GUI to talk to an LDAP server and do some basic editing and searching. At the moment I've got some Cut/Copy/Past functions working really well on the tree. However, the standard keyboard shortcuts are gobbled up by the default Swing datatransfer handlers. I'm using custom classes for things derived off JTree and DefaultMutableTreeNode, rather than the stock classes, and it's all in Java 1.4.
So I figure I've got two solutions, and wondering if anyone has hints on either.
1) Disable the current bindings to Ctrl-X,C,V and let my current cut/copy/paste actions use them. I have no idea how to do this, or even seen it mentioned.
2) Work within the datatransfer framework and use the services provided there. However, I cannot find any good guides on how to do this. The API docs are pretty sparse in this area, and most of the mentions online I've found have to do with shuffling text about, whereas I need to move my TreeNode objects around.
Anyone have any idea?
