\r
public class HTMLOutput\r
{\r
- SequenceRenderer sr = new SequenceRenderer(null);\r
+\r
\r
public HTMLOutput(AlignViewport av)\r
{\r
+ SequenceRenderer sr = new SequenceRenderer(av);\r
Color color;\r
JFileChooser chooser = new JFileChooser(jalview.bin.Cache.LAST_DIRECTORY);\r
chooser.setDialogTitle("Save as HTML");\r
out.println("<HTML>");\r
out.println("<style type=\"text/css\">");\r
out.println("<!--");\r
- out.println("td {font-family: \"Courier New\", Courier, mono;; font-size: medium; text-align: center; }");\r
+ out.print("td {font-family: \""+av.getFont().getFamily()+"\", \""+av.getFont().getName()+ "\", mono; "\r
+ +"font-size: "+av.getFont().getSize()+"px; ");\r
+\r
+\r
+ if (av.getFont().getStyle() == Font.BOLD)\r
+ out.print("font-weight: BOLD; ");\r
+\r
+ if (av.getFont().getStyle() == Font.ITALIC)\r
+ out.print("font-style: italic; ");\r
+\r
+ out.println("text-align: center; }");\r
+\r
out.println("-->");\r
out.println("</style>");\r
out.println("<BODY>");\r
else\r
cs = av.getGlobalColourScheme();\r
\r
+\r
color = sr.getResidueBoxColour(cs, seq, res);\r
\r
if(color.getRGB()<-1)\r
\r
jalview.util.BrowserLauncher.openURL( choice );\r
}\r
- catch(Exception ex){}\r
+ catch(Exception ex){ex.printStackTrace();}\r
}\r
}\r
\r