Пример #1
0
  public void addData(String hint, String text, DocNode node, int flag) {
    String plainText = node == null ? Util.stripHtml(text) : node.getText();
    csvField(plainText);
    dbField(mColIdx, plainText);

    if (mColIdx == 0) {
      mRow = new TableRow();
      mBody.add(mRow);
      if (mNextRowStyle != null) {
        mRow.setStyle(mNextRowStyle);
        mNextRowStyle = null;
      }
      if (mNextRowId != null) {
        mRow.setId(mNextRowId);
        mNextRowId = null;
      }
    }
    TableCell cell = new TableCell(hint, text, node);
    mRow.add(cell);
    Column c = mColumns.get(mColIdx);
    if (0 != (c.flag & FLAG_ALIGN_RIGHT)) {
      cell.addStyle("right");
    }
    mColIdx = (mColIdx + 1) % mColumns.size();
    if (mColIdx == 0) {
      csvEOL();
      dbEOL();
    }
    mEmpty = false;
  }
Пример #2
0
 @Override
 public void render(Renderer r) throws IOException {
   r.print("<tr");
   if (mId != null) {
     r.print(" id=\"" + mId + "\"");
   }
   if (mStyle != null) {
     r.print(" class=\"" + mStyle + "\"");
   }
   r.println(">");
   super.render(r);
   r.println("</tr>");
 }
Пример #3
0
  @Override
  public void render(Renderer r) throws IOException {
    String tblCls = mStyles;
    if (0 != (mTableFlags & FLAG_SORT)) {
      tblCls += " tablesorter";
    }
    if (0 != (mTableFlags & FLAG_DND)) {
      tblCls += " tablednd";
    }
    if (0 != (mTableFlags & FLAG_COL_RESIZE)) {
      tblCls += " colResizable";
    }

    r.println("<table class=\"" + tblCls + "\">");
    super.render(r);
    r.println("</table>");
  }
Пример #4
0
 @Override
 public void render(Renderer r) throws IOException {
   r.print("<td");
   if (mStyle != null) {
     r.print(" class=\"");
     r.print(mStyle);
     r.print("\"");
   }
   if (mHint != null) {
     r.print(" title=\"");
     r.print(mHint);
     r.print("\"");
   }
   r.print(">");
   if (mText != null) {
     r.print(mText);
   } else {
     super.render(r);
   }
   r.print("</td>");
 }
Пример #5
0
 public Table(int flag, DocNode parent) {
   this(flag);
   if (parent != null) {
     parent.add(this);
   }
 }
Пример #6
0
 @Override
 public void render(Renderer r) throws IOException {
   r.println("<tbody>");
   super.render(r);
   r.println("</tbody>");
 }