- }
- }
- else
- {
- // TODO do this sort once only in calculate()?
- // char[][] ca = new char[profile[0].length][];
- char[] ca = new char[profile[0].length];
- float[] vl = new float[profile[0].length];
- for (int c = 0; c < ca.length; c++)
- {
- ca[c] = (char) c;
- // ca[c] = new char[]
- // { (char) c };
- vl[c] = profile[0][c];
- }
- QuickSort.sort(vl, ca);
- for (int p = 0, c = ca.length - 1; profile[0][ca[c]] > 0; c--)
- {
- final char residue = ca[c];
- if (residue != '-')
- {
- float tval = profile[0][residue] * 100f / normalisedBy;
- mouseOver
- .append((((p == 0) ? "" : "; ")))
- .append(residue)
- .append(" ")
- .append(((fmt != null) ? fmt.form(tval)
- : ((int) tval))).append("%");
- p++;
- }