X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FHTMLOutput.java;h=8406f3d27c381891d0d312f5798c06bfb872900b;hb=7e1a8203d671e11bdc3eedf19c808f30f7a7c348;hp=32d8a1f6163357ef7f98bc1ab0095d8ba445ecea;hpb=312a01c56639fe2d5a94a7918e6968955533afc5;p=jalview.git diff --git a/src/jalview/io/HTMLOutput.java b/src/jalview/io/HTMLOutput.java index 32d8a1f..8406f3d 100755 --- a/src/jalview/io/HTMLOutput.java +++ b/src/jalview/io/HTMLOutput.java @@ -1,6 +1,6 @@ /* * Jalview - A Sequence Alignment Editor and Viewer - * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -32,12 +32,12 @@ public class HTMLOutput FeatureRenderer fr; Color color; - public HTMLOutput(AlignViewport av, SequenceRenderer sr, FeatureRenderer fr1) + public HTMLOutput(AlignmentPanel ap, SequenceRenderer sr, FeatureRenderer fr1) { - this.av = av; + this.av = ap.av; this.sr = sr; - fr = new FeatureRenderer(av); + fr = new FeatureRenderer(ap); fr.transferSettings(fr1); JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache. @@ -137,8 +137,7 @@ public class HTMLOutput String id = seq.getDisplayId(av.getShowJVSuffix()); out.println("" + id + - "  "); - + "  "); for (int res = 0; res < seq.getLength(); res++) { @@ -149,10 +148,11 @@ public class HTMLOutput color = fr.findFeatureColour(color, seq, res); } else - color = Color.white; - + { + color = Color.white; + } - if (color.getRGB() < -1) + if (color.getRGB() < -1) { out.println("" + @@ -196,15 +196,18 @@ public class HTMLOutput endRes = al.getWidth(); } - if(av.getScaleAboveWrapped()) + if (av.getScaleAboveWrapped()) { out.println(""); if (av.getScaleLeftWrapped()) + { out.println(" "); + } else + { out.println(" "); - + } for (int i = startRes + 10; i < endRes; i += 10) { @@ -220,25 +223,27 @@ public class HTMLOutput out.println(""); seq = al.getSequenceAt(s); - startPos = seq.findPosition( startRes ); - endPos = seq.findPosition( endRes )-1; + startPos = seq.findPosition(startRes); + endPos = seq.findPosition(endRes) - 1; String id = seq.getDisplayId(av.getShowJVSuffix()); out.println("" + id + - "  "); - + "  "); - if(av.getScaleLeftWrapped()) + if (av.getScaleLeftWrapped()) { - if(startPos > seq.getEnd() || endPos==0) + if (startPos > seq.getEnd() || endPos == 0) + { out.println(" "); + } else + { out.println("" + startPos + - "  "); + "  "); + } } - for (int res = startRes; res < endRes; res++) { if (!jalview.util.Comparison.isGap(seq.getCharAt(res))) @@ -248,11 +253,14 @@ public class HTMLOutput color = fr.findFeatureColour(color, seq, res); } else + { color = Color.white; + } if (color.getRGB() < -1) { - out.println("" + + out.println("" + seq.getCharAt(res) + ""); } else @@ -260,24 +268,22 @@ public class HTMLOutput out.println("" + seq.getCharAt(res) + ""); } - } - if(av.getScaleRightWrapped() && - endRes < startRes + av.getWrappedWidth()) + if (av.getScaleRightWrapped() && + endRes < startRes + av.getWrappedWidth()) { - out.println("" - +"  "); - } - + out.println("" + + "  "); + } - if(av.getScaleRightWrapped() && startPos " + endPos + "  "); } - out.println(""); } @@ -294,88 +300,90 @@ public class HTMLOutput public static String getImageMapHTML() { return new String( - "\n" - +"\n" - +"\n" - +"\n" - +"\n" - +"
\n" - +"\n"); + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "
\n" + + "\n"); } }