Dont add group if seqs not found
[jalview.git] / src / jalview / io / HTMLOutput.java
index beb8829..32d8a1f 100755 (executable)
@@ -1,6 +1,6 @@
 /*\r
  * Jalview - A Sequence Alignment Editor and Viewer\r
- * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
+ * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
  *\r
  * This program is free software; you can redistribute it and/or\r
  * modify it under the terms of the GNU General Public License\r
@@ -32,11 +32,13 @@ public class HTMLOutput
   FeatureRenderer fr;\r
   Color color;\r
 \r
-  public HTMLOutput(AlignViewport av, SequenceRenderer sr, FeatureRenderer fr)\r
+  public HTMLOutput(AlignViewport av, SequenceRenderer sr, FeatureRenderer fr1)\r
   {\r
     this.av = av;\r
     this.sr = sr;\r
-    this.fr = fr;\r
+\r
+    fr = new FeatureRenderer(av);\r
+    fr.transferSettings(fr1);\r
 \r
     JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache.\r
         getProperty(\r
@@ -250,28 +252,7 @@ public class HTMLOutput
 \r
           if (color.getRGB() < -1)\r
           {\r
-            r = Integer.toHexString(color.getRed());\r
-\r
-            if (r.length() < 2)\r
-            {\r
-              r = "0" + r;\r
-            }\r
-\r
-            g = Integer.toHexString(color.getGreen());\r
-\r
-            if (g.length() < 2)\r
-            {\r
-              g = "0" + g;\r
-            }\r
-\r
-            b = Integer.toHexString(color.getBlue());\r
-\r
-            if (b.length() < 2)\r
-            {\r
-              b = "0" + b;\r
-            }\r
-\r
-            out.println("<td bgcolor=\"#" + r + g + b + "\">" +\r
+            out.println("<td bgcolor=\"#" + jalview.util.Format.getHexString(color) + "\">" +\r
                         seq.getCharAt(res) + "</td>");\r
           }\r
           else\r