*/
package jalview.io;
+import java.io.File;
+import java.io.IOException;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+import javax.swing.SwingUtilities;
+
import jalview.api.ComplexAlignFile;
import jalview.api.FeatureSettingsModelI;
import jalview.api.FeaturesDisplayedI;
import jalview.util.MessageManager;
import jalview.ws.utils.UrlDownloadClient;
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.StringTokenizer;
-import java.util.Vector;
-
-import javax.swing.SwingUtilities;
-
public class FileLoader implements Runnable
{
String file;
protected AlignFrame _LoadFileWaitTillLoaded()
{
this.run();
+
return alignFrame;
}
.getFeatureColourScheme();
if (viewport != null)
{
- if (proxyColourScheme != null)
- {
- viewport.applyFeaturesStyle(proxyColourScheme);
- }
// append to existing alignment
viewport.addAlignment(al, title);
+ viewport.applyFeaturesStyle(proxyColourScheme);
}
else
{
return tempStructFile.toString();
}
- /**
- *
- * @param file a File, or a String which is a name of a file
- * @return
- * @throws FileNotFoundException
- */
- @SuppressWarnings("unused")
- public static BufferedReader getBuffereReader(Object file) throws FileNotFoundException {
- if (file instanceof String)
- return new BufferedReader(new FileReader((String) file));
-
- byte[] bytes = /** @j2sNative file._bytes || */ null;
- if (bytes != null)
- return new BufferedReader(new InputStreamReader(new ByteArrayInputStream(bytes)));
- return new BufferedReader(new FileReader((File) file));
- }
-
}