X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FHTMLOutput.java;h=8406f3d27c381891d0d312f5798c06bfb872900b;hb=cd5b2de469fb4c09242955cb4b74279e2da348d6;hp=f7a0f3fa06e295e2d7ec414ae8aa7a3bdc50bae1;hpb=3caa3405a5822c7248bab517b8d1a7776e0dc210;p=jalview.git
diff --git a/src/jalview/io/HTMLOutput.java b/src/jalview/io/HTMLOutput.java
index f7a0f3f..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) 2005 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,32 +253,14 @@ public class HTMLOutput
color = fr.findFeatureColour(color, seq, res);
}
else
+ {
color = Color.white;
+ }
if (color.getRGB() < -1)
{
- r = Integer.toHexString(color.getRed());
-
- if (r.length() < 2)
- {
- r = "0" + r;
- }
-
- g = Integer.toHexString(color.getGreen());
-
- if (g.length() < 2)
- {
- g = "0" + g;
- }
-
- b = Integer.toHexString(color.getBlue());
-
- if (b.length() < 2)
- {
- b = "0" + b;
- }
-
- out.println("" +
+ out.println(" | " +
seq.getCharAt(res) + " | ");
}
else
@@ -281,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("
");
}
@@ -315,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");
}
}