g2.setRenderingHint(SVGHints.KEY_DRAW_STRING_TYPE,
SVGHints.VALUE_DRAW_STRING_TYPE_VECTOR);
}
+ if (av.getWrapAlignment())
+ {
+ printWrapped(aDimension.getWidth(), aDimension.getHeight(), 0,
+ g1, g2);
+ }
+ else
+ {
printUnwrapped(aDimension.getWidth(), aDimension.getHeight(), 0,
g1, g2);
+ }
String titleSvgData = g1.getSVGDocument();
String alignSvgData = g2.getSVGDocument();
exportData.getStartEndPostions(),
av.getColumnSelection());
}
- String htmlData = getHtml(titleSvgData, alignSvgData, jsonData);
+ String htmlData = getHtml(titleSvgData, alignSvgData, jsonData,
+ av.getWrapAlignment());
FileOutputStream out = new FileOutputStream(fileX);
out.write(htmlData.getBytes());
out.flush();
return Printable.PAGE_EXISTS;
}
+ public int printWrapped(int pwidth, int pheight, int pi, Graphics... pg)
+ throws PrinterException
+ {
+ return ap.printWrappedAlignment(pg[1], pwidth, pheight, pi);
+ }
+
private String getHtml(String titleSvg, String alignmentSvg,
- String jsonData)
+ String jsonData, boolean wrapped)
{
StringBuilder htmlSvg = new StringBuilder();
htmlSvg.append("<html>\n");
+ ".facebox_hide { z-index:-100; }\n"
+ ".facebox_overlayBG { background-color: #000; z-index: 99; }");
}
-
htmlSvg.append("</style>");
+ if (!wrapped)
+ {
htmlSvg.append("<div class=\"main-container\" \n>");
htmlSvg.append("<div class=\"titlex\">\n");
htmlSvg.append("<div class=\"sub-category-container\"> \n");
+ "subCatContainer.scrollTop($(this).scrollTop());\n});\n");
htmlSvg.append("</script>\n");
+ }
+ else
+ {
+ htmlSvg.append("<div>\n")
+ .append(alignmentSvg).append("</div>");
+ htmlSvg.append("<script language=\"JavaScript\" type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js\"></script>\n"
+ + "<script language=\"JavaScript\" type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js\"></script>\n");
+
+ }
// javascript for launching file in Jalview