X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FAlignment.java;h=c47414223229826273bff0563c30006ef2bd3887;hb=a57e62adb20b8c9be0172f2d5d1e767c3aa528ca;hp=83d2499e238b2124d0ab043a81f0381e962a5d62;hpb=f980095ff022f62822f1522c221957e49a7bbfc7;p=jalview.git diff --git a/src/jalview/datamodel/Alignment.java b/src/jalview/datamodel/Alignment.java index 83d2499..c474142 100755 --- a/src/jalview/datamodel/Alignment.java +++ b/src/jalview/datamodel/Alignment.java @@ -40,6 +40,8 @@ public class Alignment HiddenSequences hiddenSequences = new HiddenSequences(this); + public Hashtable alignmentProperties; + private void initAlignment(SequenceI[] seqs) { int i = 0; @@ -106,6 +108,8 @@ public class Alignment public SequenceI[] getSequencesArray() { + if (sequences==null) + return null; SequenceI[] reply = new SequenceI[sequences.size()]; for (int i = 0; i < sequences.size(); i++) { @@ -458,17 +462,11 @@ public class Alignment return true; } - - /** - * DOCUMENT ME! - * - * @param aa DOCUMENT ME! + /* (non-Javadoc) + * @see jalview.datamodel.AlignmentI#deleteAnnotation(jalview.datamodel.AlignmentAnnotation) */ - public void deleteAnnotation(AlignmentAnnotation aa) + public boolean deleteAnnotation(AlignmentAnnotation aa) { - if(aa.sequenceRef!=null) - aa.sequenceRef.removeAlignmentAnnotation(aa); - int aSize = 1; if (annotations != null) @@ -478,25 +476,32 @@ public class Alignment if (aSize < 1) { - return; + return false; } AlignmentAnnotation[] temp = new AlignmentAnnotation[aSize - 1]; + boolean swap=false; int tIndex = 0; for (int i = 0; i < aSize; i++) { if (annotations[i] == aa) { + swap=true; continue; } - - temp[tIndex] = annotations[i]; - tIndex++; + if (tIndex