com.lowagie.text.ZapfDingbatsList.add()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(73)

本文整理了Java中com.lowagie.text.ZapfDingbatsList.add()方法的一些代码示例,展示了ZapfDingbatsList.add()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZapfDingbatsList.add()方法的具体详情如下:
包路径:com.lowagie.text.ZapfDingbatsList
类名称:ZapfDingbatsList
方法名:add

ZapfDingbatsList.add介绍

[英]Adds an Object to the List.
[中]将Object添加到List

代码示例

代码示例来源:origin: fr.opensagres.xdocreport.itext-gae/itext-gae

/**
   * Adds an <CODE>Object</CODE> to the <CODE>List</CODE>.
   *
   * @param    o    the object to add.
   * @return true if adding the object succeeded
   */
  public boolean add(Object o) {
    if (o instanceof ListItem) {
      ListItem item = (ListItem) o;
      Chunk chunk = new Chunk(preSymbol, symbol.getFont());
      chunk.append(String.valueOf((char)zn));
      chunk.append(postSymbol);
      item.setListSymbol(chunk);
      item.setIndentationLeft(symbolIndent, autoindent);
      item.setIndentationRight(0);
      list.add(item);
    } else if (o instanceof List) {
      List nested = (List) o;
      nested.setIndentationLeft(nested.getIndentationLeft() + symbolIndent);
      first--;
      return list.add(nested);
    } else if (o instanceof String) {
      return this.add(new ListItem((String) o));
    }
    return false;
  }
}

代码示例来源:origin: com.github.librepdf/openpdf

/**
   * Adds an <CODE>Object</CODE> to the <CODE>List</CODE>.
   *
   * @param    o    the object to add.
   * @return true if adding the object succeeded
   */
  public boolean add(Object o) {
    if (o instanceof ListItem) {
      ListItem item = (ListItem) o;
      Chunk chunk = new Chunk(preSymbol, symbol.getFont());
      chunk.append(String.valueOf((char)zn));
      chunk.append(postSymbol);
      item.setListSymbol(chunk);
      item.setIndentationLeft(symbolIndent, autoindent);
      item.setIndentationRight(0);
      list.add(item);
    } else if (o instanceof List) {
      List nested = (List) o;
      nested.setIndentationLeft(nested.getIndentationLeft() + symbolIndent);
      first--;
      return list.add(nested);
    } else if (o instanceof String) {
      return this.add(new ListItem((String) o));
    }
    return false;
  }
}

代码示例来源:origin: es.gob.afirma/afirma-crypto-pdf-itext

/**
   * Adds an <CODE>Object</CODE> to the <CODE>List</CODE>.
   *
   * @param    o    the object to add.
   * @return true if adding the object succeeded
   */
  public boolean add(Object o) {
    if (o instanceof ListItem) {
      ListItem item = (ListItem) o;
      Chunk chunk = new Chunk(preSymbol, symbol.getFont());
      chunk.append(String.valueOf((char)zn));
      chunk.append(postSymbol);
      item.setListSymbol(chunk);
      item.setIndentationLeft(symbolIndent, autoindent);
      item.setIndentationRight(0);
      list.add(item);
    } else if (o instanceof List) {
      List nested = (List) o;
      nested.setIndentationLeft(nested.getIndentationLeft() + symbolIndent);
      first--;
      return list.add(nested);
    } else if (o instanceof String) {
      return this.add(new ListItem((String) o));
    }
    return false;
  }
}

相关文章

ZapfDingbatsList类方法