[MOBY-guts] biomoby commit
Paul Gordon
gordonp at dev.open-bio.org
Thu Feb 3 21:42:11 UTC 2011
gordonp
Thu Feb 3 16:42:10 EST 2011
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui
In directory dev.open-bio.org:/tmp/cvs-serv20048/src/main/ca/ucalgary/seahawk/gui
Modified Files:
FileAndTextTransferHandler.java
Log Message:
Added ability to export text selections from Seahawk to the clipboard
moby-live/Java/src/main/ca/ucalgary/seahawk/gui FileAndTextTransferHandler.java,1.11,1.12
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/FileAndTextTransferHandler.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/FileAndTextTransferHandler.java 2010/05/13 16:03:59 1.11
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/FileAndTextTransferHandler.java 2011/02/03 21:42:10 1.12
@@ -246,7 +246,14 @@
protected Transferable createTransferable(JComponent c) {
if(c instanceof MobyContentPane){
- return new SeahawkTransferable((MobyContentPane) c);
+ // Can export Moby data (via hyperlink drag)
+ if(((MobyContentPane) c).isDraggingHyperlink()){
+ return new SeahawkTransferable((MobyContentPane) c);
+ }
+ // or text selection as string
+ else{
+ return new StringSelection(((MobyContentPane) c).getSelectedText());
+ }
}
else{
return null;
More information about the MOBY-guts
mailing list