X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FStructureFrequency.java;h=dc0212e9f255e20f47519d000c1ac4050921eb35;hb=d14dc9ab689ddef65d7440facdc7b0dd512438ad;hp=6816547f78b02a87953deba1dbcd517c21df505b;hpb=8d2724b83aca38ef75d68787cc5939d950467e63;p=jalview.git diff --git a/src/jalview/analysis/StructureFrequency.java b/src/jalview/analysis/StructureFrequency.java index 6816547..dc0212e 100644 --- a/src/jalview/analysis/StructureFrequency.java +++ b/src/jalview/analysis/StructureFrequency.java @@ -1,22 +1,23 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1) + * 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.analysis; import java.util.*; @@ -346,18 +347,19 @@ public class StructureFrequency // initialised properly return; } - String fmtstr="%3.1f"; - int precision=2; - while (nseq>100) { + String fmtstr = "%3.1f"; + int precision = 2; + while (nseq > 100) + { precision++; - nseq/=10; + nseq /= 10; } - if (precision>2) + if (precision > 2) { - fmtstr = "%"+(2+precision)+"."+precision+"f"; + fmtstr = "%" + (2 + precision) + "." + precision + "f"; } Format fmt = new Format(fmtstr); - + for (int i = iStart; i < width; i++) { Hashtable hci; @@ -434,7 +436,8 @@ public class StructureFrequency tval = (vl[c] * 100f / profile[1][ignoreGapsInConsensusCalculation ? 1 : 0]); mouseOver += ((p == 0) ? "" : "; ") + (char) ((int[]) ca[c])[0] - + (char) ((int[]) ca[c])[1] + " " + fmt.form(tval) + "%"; + + (char) ((int[]) ca[c])[1] + " " + fmt.form(tval) + + "%"; p++; }