X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FAlignmentView.java;h=efb7c4ac1553193ea364dc4e1982abcbfb94cbc0;hb=bda12c8fbbfeb46d9754e37084f7cb2ded35476d;hp=c5019d1aec59e94643326637f47377798c8a572d;hpb=b2f9a8d7bce642ff4011bc6d49e02bb0569fbb11;p=jalview.git diff --git a/src/jalview/datamodel/AlignmentView.java b/src/jalview/datamodel/AlignmentView.java index c5019d1..efb7c4a 100644 --- a/src/jalview/datamodel/AlignmentView.java +++ b/src/jalview/datamodel/AlignmentView.java @@ -1,23 +1,26 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1) + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) * Copyright (C) 2014 The Jalview Authors * * This file is part of Jalview. * * Jalview is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. * * Jalview is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along with Jalview. If not, see . + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . * The Jalview Authors are detailed in the 'AUTHORS' file. */ package jalview.datamodel; +import jalview.util.MessageManager; import jalview.util.ShiftList; import java.io.PrintStream; @@ -46,9 +49,11 @@ public class AlignmentView */ private Vector scGroups; - private boolean isNa=false; + private boolean isNa = false; + /** * false if the view concerns peptides + * * @return */ public boolean isNa() @@ -237,8 +242,7 @@ public class AlignmentView { if (!seqcigararray.isSeqCigarArray()) { - throw new Error( - "Implementation Error - can only make an alignment view from a CigarArray of sequences."); + throw new Error(MessageManager.getString("error.implementation_error_can_only_make_alignmnet_from_cigararray")); } // contigs = seqcigararray.applyDeletions(); contigs = seqcigararray.getDeletedRegions(); @@ -648,7 +652,7 @@ public class AlignmentView { if (sequences == null || width <= 0) { - throw new Error("empty view cannot be updated."); + throw new Error(MessageManager.getString("error.empty_view_cannot_be_updated")); } if (nvismsa == null) { @@ -678,11 +682,7 @@ public class AlignmentView j++; if (mseq.length != sequences.length) { - throw new Error( - "Mismatch between number of sequences in block " - + j + " (" + mseq.length - + ") and the original view (" - + sequences.length + ")"); + throw new Error(MessageManager.formatMessage("error.mismatch_between_number_of_sequences_in_block", new String[]{Integer.valueOf(j).toString(),Integer.valueOf(mseq.length).toString(),Integer.valueOf(sequences.length).toString() })); } swidth = mseq[0].getLength(); // JBPNote: could ensure padded // here. @@ -835,7 +835,7 @@ public class AlignmentView else { // place gaps. - throw new Error("Padding not yet implemented."); + throw new Error(MessageManager.getString("error.padding_not_yet_implemented")); } } } @@ -848,9 +848,7 @@ public class AlignmentView { if (nvismsa.length != 1) { - throw new Error( - "Mismatch between visible blocks to update and number of contigs in view (contigs=0,blocks=" - + nvismsa.length); + throw new Error(MessageManager.formatMessage("error.mismatch_between_visible_blocks_to_update_and_number_of_contigs_in_view", new String[]{Integer.valueOf(nvismsa.length).toString()})); } if (nvismsa[0] != null) {