[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Fri Dec 7 20:33:29 UTC 2007


gordonp
Fri Dec  7 15:33:28 EST 2007
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui
In directory dev.open-bio.org:/tmp/cvs-serv2561/src/main/ca/ucalgary/seahawk/gui

Modified Files:
	FileAndTextTransferHandler.java 
Log Message:
Got rid of deprecated call
moby-live/Java/src/main/ca/ucalgary/seahawk/gui FileAndTextTransferHandler.java,1.7,1.8
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/FileAndTextTransferHandler.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/FileAndTextTransferHandler.java	2007/07/28 03:43:24	1.7
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/FileAndTextTransferHandler.java	2007/12/07 20:33:28	1.8
@@ -40,7 +40,7 @@
        fileFlavor = DataFlavor.javaFileListFlavor;
        stringFlavor = DataFlavor.stringFlavor;
     }
-
+   @SuppressWarnings("unchecked") // explicit java.util.List<java.io.File> for t.getTransferData(DataFlavor.javaFileListFlavor)
     public boolean importData(JComponent c, Transferable t) {
         if (!canImport(c, t.getTransferDataFlavors())) {
             System.err.println("Cannot drop data into Seahawk: " + t);
@@ -192,7 +192,7 @@
 
     public String convertToString(Transferable t, boolean get_plain_text) throws Exception{
 	StringBuffer textBuffer = new StringBuffer();
-	Reader reader = get_plain_text ? DataFlavor.plainTextFlavor.getReaderForText(t) :
+	Reader reader = get_plain_text ? DataFlavor.getTextPlainUnicodeFlavor().getReaderForText(t) :
 	    DataFlavor.selectBestTextFlavor(t.getTransferDataFlavors()).getReaderForText(t);
 	char[] buffer = new char[4096];
 	for(int charsRead = reader.read(buffer); charsRead != -1; charsRead = reader.read(buffer)){




More information about the MOBY-guts mailing list