示例#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
 public void addColumn(String title, String hint, int flag, String dbSpec) {
   mColumns.add(new Column(title, hint, dbSpec, flag));
   csvField(Util.stripHtml(title));
 }