コード例 #1
0
 public void writeText(String str, boolean withParagraph) {
   if ("".equals(str)) return;
   SbApp.trace("ExportHtml.writeText(" + TextUtil.truncateString(str, 32) + ")");
   try {
     String s = "<p>" + str + "</p>";
     if (!withParagraph) s = str;
     outStream.write(s, 0, s.length());
     outStream.flush();
   } catch (IOException ex) {
     SbApp.error("ExportHtml.writeText(" + str + ")", ex);
   }
 }
コード例 #2
0
ファイル: TimeEvent.java プロジェクト: kmycode/jstorybook
 public String getTitle(boolean truncate) {
   return title == null ? "" : TextUtil.truncateString(title, 30);
 }