示例#1
0
 public static void printInlineImage(PrintWriter writer, String uri, String alt) {
   writer.print("<a href=\"");
   writer.print(HTMLUtil.encodePath(uri));
   writer.print("\">");
   writer.print("<img src=\"");
   writer.print(HTMLUtil.encodePath(uri));
   writer.print("\" alt=\"");
   writer.print(HTMLUtil.escapeHTML(alt));
   writer.print("\" />");
   writer.print("</a>");
   writer.println();
 }
示例#2
0
 public static void printHTMLHead(PrintWriter writer, String encoding, String title) {
   writer.print("<?xml version=\"1.0\" encoding=\"");
   writer.print(encoding);
   writer.println("\"?>");
   writer.println(
       "<html lang=\"ja\" xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:svg=\"http://www.w3.org/2000/svg\"");
   writer.println(
       " xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\" xml:lang=\"ja\">");
   writer.println("<head>");
   writer.print("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=");
   writer.print(encoding);
   writer.print("\" />");
   writer.println("<title>");
   writer.println(HTMLUtil.escapeHTML(title));
   writer.println("</title>");
   writer.println("<style type=\"text/css\">");
   writer.println(".m{color: #fff; background-color: gray}");
   writer.println("img.textAreaImage{border:solid; border-color: gray; border-width: 1px;}");
   writer.println("</style>");
   writer.println("</head>");
 }