git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replaced image
[jalview.git]
/
src
/
jalview
/
io
/
FileLoader.java
diff --git
a/src/jalview/io/FileLoader.java
b/src/jalview/io/FileLoader.java
index
1785e89
..
0fc4aa8
100755
(executable)
--- a/
src/jalview/io/FileLoader.java
+++ b/
src/jalview/io/FileLoader.java
@@
-22,9
+22,9
@@
package jalview.io;
import jalview.gui.AlignFrame;
\r
import jalview.gui.Jalview2XML;
\r
import javax.swing.JOptionPane;
\r
import jalview.gui.AlignFrame;
\r
import jalview.gui.Jalview2XML;
\r
import javax.swing.JOptionPane;
\r
+
\r
+import jalview.gui.*;
\r
import jalview.datamodel.*;
\r
import jalview.datamodel.*;
\r
-import jalview.gui.Desktop;
\r
-import jalview.datamodel.SequenceI;
\r
import java.util.Vector;
\r
import java.util.StringTokenizer;
\r
\r
import java.util.Vector;
\r
import java.util.StringTokenizer;
\r
\r
@@
-33,11
+33,11
@@
public class FileLoader
String file;
\r
String protocol;
\r
String format;
\r
String file;
\r
String protocol;
\r
String format;
\r
- AlignmentI alignment;
\r
+ AlignViewport viewport;
\r
\r
\r
- public void LoadFile(AlignmentI alignment, String file, String protocol, String format)
\r
+ public void LoadFile(AlignViewport viewport, String file, String protocol, String format)
\r
{
\r
{
\r
- this.alignment = alignment;
\r
+ this.viewport = viewport;
\r
LoadFile(file, protocol, format);
\r
}
\r
\r
LoadFile(file, protocol, format);
\r
}
\r
\r
@@
-122,8
+122,12
@@
public class FileLoader
AlignFrame af;
\r
\r
\r
AlignFrame af;
\r
\r
\r
+
\r
public void run()
\r
{
\r
public void run()
\r
{
\r
+ if (Desktop.instance != null)
\r
+ Desktop.instance.startLoading(file);
\r
+
\r
SequenceI[] sequences = null;
\r
\r
if (format.equalsIgnoreCase("Jalview"))
\r
SequenceI[] sequences = null;
\r
\r
if (format.equalsIgnoreCase("Jalview"))
\r
@@
-148,10
+152,12
@@
public class FileLoader
\r
if ( (sequences != null) && (sequences.length > 0))
\r
{
\r
\r
if ( (sequences != null) && (sequences.length > 0))
\r
{
\r
- if(alignment!=null)
\r
+ if(viewport!=null)
\r
{
\r
for(int i=0; i<sequences.length; i++)
\r
{
\r
for(int i=0; i<sequences.length; i++)
\r
- alignment.addSequence(sequences[i]);
\r
+ viewport.getAlignment().addSequence(sequences[i]);
\r
+
\r
+ viewport.firePropertyChange("alignment", null, viewport.getAlignment().getSequences());
\r
}
\r
else
\r
{
\r
}
\r
else
\r
{
\r
@@
-170,10
+176,12
@@
public class FileLoader
{
\r
}
\r
}
\r
{
\r
}
\r
}
\r
-
\r
}
\r
else
\r
{
\r
}
\r
else
\r
{
\r
+ if (Desktop.instance != null)
\r
+ Desktop.instance.stopLoading();
\r
+
\r
JOptionPane.showInternalMessageDialog(Desktop.desktop,
\r
"Couldn't load file " + file +
\r
"\n"
\r
JOptionPane.showInternalMessageDialog(Desktop.desktop,
\r
"Couldn't load file " + file +
\r
"\n"
\r
@@
-187,6
+195,10
@@
public class FileLoader
{
\r
updateRecentlyOpened();
\r
}
\r
{
\r
updateRecentlyOpened();
\r
}
\r
+
\r
+ if (Desktop.instance != null)
\r
+ Desktop.instance.stopLoading();
\r
+
\r
}
\r
}
\r
\r
}
\r
}
\r
\r