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

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

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

Phrase.get介绍

[英]Gets all the chunks in this element.
[中]获取此元素中的所有块。

代码示例

代码示例来源: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.bengolder/pdf-rtf

Element chunk = (Element) phrase.get(i);
if(chunk instanceof Chunk) {
  ((Chunk) chunk).setFont(phraseFont.difference(((Chunk) chunk).getFont()));

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

Element chunk = (Element) phrase.get(i);
if(chunk instanceof Chunk) {
  ((Chunk) chunk).setFont(phraseFont.difference(((Chunk) chunk).getFont()));

代码示例来源: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

Chunk previous = (Chunk) get(size() - 1);
if (!previous.hasAttributes()
    && (f == null

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

Chunk previous = (Chunk) get(size() - 1);
if (!previous.hasAttributes()
    && (f == null

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

Chunk previous = (Chunk) get(size() - 1);
if (!previous.hasAttributes()
    && (f == null

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

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

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

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

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

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

相关文章