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

x33g5p2x  于2022-01-26 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(161)

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

Phrase.size介绍

暂无

代码示例

代码示例来源:origin: org.seasar.tuigwaa/tuigwaa-cms

public static String getStringResult(Object obj){
  
  String ret = null;        
  if(obj instanceof String){
    ret = (String)obj;
  }else if(obj instanceof Chunk){
    Chunk c = (Chunk)obj;
    ret = c.content();
  }else if(obj instanceof Phrase){
    StringBuffer buf = new StringBuffer();
    Phrase p = (Phrase) obj;
    for(int i=0;i<p.size();i++){
      Chunk c = (Chunk)p.get(i);
      buf.append(c.content());
    }
    ret = buf.toString();
  }        
  return ret;
}

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

private static void changeFontSize(Phrase p, float size) {
  for (int k = 0; k < p.size(); ++k)
    ((Chunk)p.get(k)).getFont().setSize(size);
}

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

private static void changeFontSize(Phrase p, float size) {
  for (int k = 0; k < p.size(); ++k)
    ((Chunk)p.get(k)).getFont().setSize(size);
}

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

private static void changeFontSize(Phrase p, float size) {
  for (int k = 0; k < p.size(); ++k)
    ((Chunk)p.get(k)).getFont().setSize(size);
}

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

/**
 * Checks is this <CODE>Phrase</CODE> contains no or 1 empty <CODE>Chunk</CODE>.
 *
 * @return    <CODE>false</CODE> if the <CODE>Phrase</CODE>
 * contains more than one or more non-empty<CODE>Chunk</CODE>s.
 */
public boolean isEmpty() {
  switch(size()) {
    case 0:
      return true;
    case 1:
      Element element = (Element) get(0);
      return element.type() == Element.CHUNK && ((Chunk) element).isEmpty();
    default:
        return false;
  }
}

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

/**
 * Checks is this <CODE>Phrase</CODE> contains no or 1 empty <CODE>Chunk</CODE>.
 *
 * @return    <CODE>false</CODE> if the <CODE>Phrase</CODE>
 * contains more than one or more non-empty<CODE>Chunk</CODE>s.
 */
public boolean isEmpty() {
  switch(size()) {
    case 0:
      return true;
    case 1:
      Element element = (Element) get(0);
      if (element.type() == Element.CHUNK && ((Chunk) element).isEmpty()) {
        return true;
      }
      return false;
      default:
        return false;
  }
}

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

/**
 * Checks is this <CODE>Phrase</CODE> contains no or 1 empty <CODE>Chunk</CODE>.
 *
 * @return    <CODE>false</CODE> if the <CODE>Phrase</CODE>
 * contains more than one or more non-empty<CODE>Chunk</CODE>s.
 */
public boolean isEmpty() {
  switch(size()) {
    case 0:
      return true;
    case 1:
      Element element = (Element) get(0);
      if (element.type() == Element.CHUNK && ((Chunk) element).isEmpty()) {
        return true;
      }
      return false;
      default:
        return false;
  }
}

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

f = font.difference(chunk.getFont());
if (size() > 0 && !chunk.hasAttributes()) {
  try {
    Chunk previous = (Chunk) get(size() - 1);
    if (!previous.hasAttributes()
        && (f == null

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

f = font.difference(chunk.getFont());
if (size() > 0 && !chunk.hasAttributes()) {
  try {
    Chunk previous = (Chunk) get(size() - 1);
    if (!previous.hasAttributes()
        && (f == null

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

f = font.difference(chunk.getFont());
if (size() > 0 && !chunk.hasAttributes()) {
  try {
    Chunk previous = (Chunk) get(size() - 1);
    if (!previous.hasAttributes()
        && (f == null

代码示例来源:origin: com.github.bengolder/pdf-rtf

for(int i = 0; i < phrase.size(); i++) {
  Element chunk = (Element) phrase.get(i);
  if(chunk instanceof Chunk) {

代码示例来源:origin: org.jboss.itext/itext-rtf

for(int i = 0; i < phrase.size(); i++) {
  Element chunk = (Element) phrase.get(i);
  if(chunk instanceof Chunk) {

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

app.setColorFill(textColor);
app.beginText();
for (int k = 0; k < phrase.size(); ++k) {
  Chunk ck = (Chunk)phrase.get(k);
  BaseFont bf = ck.getFont().getBaseFont();

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

app.setColorFill(textColor);
app.beginText();
for (int k = 0; k < phrase.size(); ++k) {
  Chunk ck = (Chunk)phrase.get(k);
  BaseFont bf = ck.getFont().getBaseFont();

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

app.setColorFill(textColor);
app.beginText();
for (int k = 0; k < phrase.size(); ++k) {
  Chunk ck = (Chunk)phrase.get(k);
  BaseFont bf = ck.getFont().getBaseFont();

相关文章