continue;
}
+ an.setVisible(aa[i].visible);
+
an.setDescription(aa[i].description);
if (aa[i].sequenceRef != null)
Hashtable gatherToThisFrame = new Hashtable();
+ String errorMessage = null;
+
try
{
//UNMARSHALLER SEEMS TO CLOSE JARINPUTSTREAM, MOST ANNOYING
}
while (jarentry != null);
}
+ catch(java.io.FileNotFoundException ex)
+ {
+ ex.printStackTrace();
+ errorMessage = "Couldn't locate Jalview XML file : "+file;
+ System.err.println("Exception whilst loading jalview XML file : " +
+ ex + "\n");
+ }
catch (java.net.UnknownHostException ex)
{
ex.printStackTrace();
- System.err.println("Couldn't locate Jalview XML file : " +
+ errorMessage = "Couldn't locate Jalview XML file : " +file;
+ System.err.println("Exception whilst loading jalview XML file : " +
ex + "\n");
-
- javax.swing.SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "Couldn't locate " + file,
- "URL not found",
- JOptionPane.WARNING_MESSAGE);
- }
- });
}
catch (Exception ex)
{
System.err.println("Exception whilst loading jalview XML file : " +
ex + "\n");
- javax.swing.SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
-
- JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "Error loading " + file,
- "Error loading Jalview file",
- JOptionPane.WARNING_MESSAGE);
- }
- });
}
if (Desktop.instance != null)
(AlignFrame) en.nextElement());
}
+ if(errorMessage!=null)
+ {
+ final String finalErrorMessage = errorMessage;
+ javax.swing.SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ JOptionPane.showInternalMessageDialog(Desktop.desktop,
+ finalErrorMessage,
+ "Error loading Jalview file",
+ JOptionPane.WARNING_MESSAGE);
+ }
+ });
+ }
+
return af;
}
if (an[i].getId() != null
&& annotationIds.containsKey(an[i].getId()))
{
- al.addAnnotation(
+ jalview.datamodel.AlignmentAnnotation jda =
(jalview.datamodel.AlignmentAnnotation) annotationIds.get(an[i].
- getId())
- );
+ getId());
+ if (an[i].hasVisible())
+ jda.visible = an[i].getVisible();
+
+ al.addAnnotation(jda);
continue;
}
for (int aa = 0; aa < ae.length && aa < anot.length; aa++)
{
+ if(ae[aa].getPosition()>=anot.length)
+ continue;
+
anot[ae[aa].getPosition()] = new jalview.datamodel.Annotation(
ae[aa].getDisplayCharacter(),
if (an[i].getSequenceRef() != null)
{
- jaa.createSequenceMapping(
- al.findName(an[i].getSequenceRef()), 1, true
- );
- al.findName(an[i].getSequenceRef()).addAlignmentAnnotation(jaa);
+ if (al.findName(an[i].getSequenceRef()) != null)
+ {
+ jaa.createSequenceMapping(
+ al.findName(an[i].getSequenceRef()), 1, true
+ );
+ al.findName(an[i].getSequenceRef()).addAlignmentAnnotation(jaa);
+ }
}
if (an[i].hasScore())
{
jaa.setScore(an[i].getScore());
}
+
+ if(an[i].hasVisible())
+ jaa.visible = an[i].getVisible();
+
al.addAnnotation(jaa);
}
}
{
if(frames[f] instanceof AppJmol)
{
- if(frames[f].getWidth()==width && frames[f].getHeight()==height)
+ if (frames[f].getX() == x && frames[f].getY() == y
+ && frames[f].getHeight() == height
+ && frames[f].getWidth() == width)
{
comp = frames[f];
break;
String pdbFile = loadPDBFile(file, ids[p].getId());
- jalview.datamodel.SequenceI[] seq = new jalview.datamodel.SequenceI[]
+ jalview.datamodel.SequenceI[] seq = new jalview.datamodel.
+ SequenceI[]
{
- al.getSequenceAt(i)};
+ (jalview.datamodel.SequenceI)
+ seqRefIds.get(JSEQ[i].getId()+"")};
if (comp == null)