Tabnine Logo
Chunk.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.itextpdf.text.Chunk
constructor

Best Java code snippets using com.itextpdf.text.Chunk.<init> (Showing top 20 results out of 315)

origin: com.itextpdf/itextpdf

/**
 * Sets the listsymbol.
 * <P>
 * This is a shortcut for <CODE>setListSymbol(Chunk symbol)</CODE>.
 *
 * @param    symbol        a <CODE>String</CODE>
 */
public void setListSymbol(final String symbol) {
  this.symbol = new Chunk(symbol);
}
origin: com.itextpdf/itextg

/**
 * Sets the listsymbol.
 * <P>
 * This is a shortcut for <CODE>setListSymbol(Chunk symbol)</CODE>.
 *
 * @param    symbol        a <CODE>String</CODE>
 */
public void setListSymbol(final String symbol) {
  this.symbol = new Chunk(symbol);
}
origin: com.itextpdf/itextpdf

@Deprecated
public static Chunk createTabspace(float spacing) {
  Chunk tabspace = new Chunk(spacing, true);
  return tabspace;
}
origin: com.itextpdf/itextg

@Deprecated
public static Chunk createTabspace(float spacing) {
  Chunk tabspace = new Chunk(spacing, true);
  return tabspace;
}
origin: com.itextpdf/itextg

/**
 * Adds a <CODE>String</CODE> to this <CODE>Phrase</CODE>.
 *
 * @param   s       a string
 * @return  a boolean
 * @since 5.0.1
 */
public boolean add(final String s) {
  if (s == null) {
    return false;
  }
  return super.add(new Chunk(s, font));
}
origin: com.itextpdf/itextpdf

/**
 * Adds a <CODE>String</CODE> to this <CODE>Phrase</CODE>.
 *
 * @param   s       a string
 * @return  a boolean
 * @since 5.0.1
 */
public boolean add(final String s) {
  if (s == null) {
    return false;
  }
  return super.add(new Chunk(s, font));
}
origin: com.itextpdf/itextpdf

public static Chunk createWhitespace(final String content, final boolean preserve) {
  Chunk whitespace = null;
  if (!preserve) {
    whitespace = new Chunk(' ');
    whitespace.setAttribute(WHITESPACE, content);
  } else {
     whitespace = new Chunk(content);
  }
  return whitespace;
}
origin: com.itextpdf/itextg

/**
 * @see com.itextpdf.text.Element#getChunks()
 */
public List<Chunk> getChunks() {
  List<Chunk> list = new ArrayList<Chunk>();
  list.add(new Chunk(this, true));
  return list;
}
origin: com.itextpdf/itextpdf

/**
 * @see com.itextpdf.text.Element#getChunks()
 */
public List<Chunk> getChunks() {
  List<Chunk> list = new ArrayList<Chunk>();
  list.add(new Chunk(this, true));
  return list;
}
origin: com.itextpdf/itextg

public static Chunk createWhitespace(final String content, final boolean preserve) {
  Chunk whitespace = null;
  if (!preserve) {
    whitespace = new Chunk(' ');
    whitespace.setAttribute(WHITESPACE, content);
  } else {
     whitespace = new Chunk(content);
  }
  return whitespace;
}
origin: org.technbolts/gutenberg

private static Element discardNewline(Element sub) {
  if (sub instanceof Chunk) {
    Chunk c = (Chunk) sub;
    String content = c.getContent();
    if (content.endsWith("\n") && content.length() < 2) {
      return new Chunk(" ");
    }
  }
  return sub;
}
origin: org.technbolts/gutenberg

  protected void emitText(ITextContext context, StringBuilder b, Font font) {
    if (b.length() == 0)
      return;
    context.append(new Chunk(b.toString(), font));
  }
}
origin: com.github.hazendaz/displaytag

/**
 * Returns a formatted cell for the given value.
 * @param value cell value
 * @return Cell
 */
private PdfPCell getCell(String value)
{
  PdfPCell cell = new PdfPCell(new Phrase(new Chunk(StringUtils.trimToEmpty(value), this.smallFont)));
  cell.setVerticalAlignment(Element.ALIGN_TOP);
  cell.setLeading(8, 0);
  cell.setPadding(2);
  return cell;
}
origin: org.technbolts/gutenberg

public Chunk symbol(String name, float size, BaseColor fg) {
  String s = fontAwesome.get(name);
  if(s==null)
    throw new IllegalArgumentException("Unrecognized symbol '" + name + "'");
  return new Chunk(s, new Font(baseFont, size, Font.NORMAL, fg));
}
origin: org.technbolts/gutenberg

  @Override
  public void process(int level, Node node, InvocationContext context) {
    TextNode tNode = (TextNode) node;
    context.append(new Chunk(tNode.getText(), context.peekFont()));
  }
}
origin: org.technbolts/gutenberg

  @Override
  public void process(int level, Node node, InvocationContext context) {
    SpecialTextNode tNode = (SpecialTextNode) node;
    context.append(new Chunk(tNode.getText(), context.peekFont()));
  }
}
origin: com.github.hazendaz/displaytag

/**
 * Writes the table caption according to a set style.
 * @param model The table model containing the caption.
 * @throws DocumentException If an error occurrs while decorating the caption.
 */
private void decorateCaption(TableModel model) throws DocumentException
{
  Paragraph caption = new Paragraph(new Chunk(model.getCaption(), this.getCaptionFont()));
  caption.setAlignment(this.getCaptionHorizontalAlignment());
  this.document.add(caption);
}
origin: org.technbolts/gutenberg

  private Chunk connectChunk(Styles styles) {
    return new Chunk(new LineSeparator(0.5f, 95, styles.defaultColor(), Element.ALIGN_CENTER, -.5f));
  }
}
origin: org.technbolts.tzatziki/tzatziki-pdf

protected Paragraph formatTitle(int headerLevel, ITextContext emitterContext, BackgroundExec background) {
  Styles styles = emitterContext.styles();
  Font font = styles.sectionTitleFontForLevel(headerLevel + 1);
  Paragraph p = new Paragraph();
  p.add(new Chunk(background.name(), font));
  p.add(new Chunk(" (", font));
  p.add(new Chunk(background.keyword(), new FontCopier(font).italic().color(styles.getColor(KEYWORD_COLOR).or(BaseColor.LIGHT_GRAY)).get()));
  p.add(new Chunk(")", font));
  return p;
}
origin: org.technbolts/gutenberg

  public Chunk bulletSymbol() {
    if(bulletSymbol==null)
      bulletSymbol = new Chunk("• ", new FontCopier(getSymbolFont()).size(10f).get());
    return bulletSymbol;
  }
}
com.itextpdf.textChunk<init>

Javadoc

Empty constructor.

Popular methods of Chunk

  • setBackground
    Sets the color and the size of the background Chunk.
  • getContent
    Returns the content of this Chunk.
  • getWidthPoint
    Gets the width of the Chunk in points.
  • setGenericTag
    Sets the generic tag Chunk. The text for this tag can be retrieved with PdfPageEvent.
  • getFont
    Gets the font of this Chunk.
  • setFont
    Sets the font of this Chunk.
  • setLocalDestination
    Sets a local destination for this Chunk.
  • setTextRise
    Sets the text displacement relative to the baseline. Positive values rise the text, negative values
  • append
    appends some text to this Chunk.
  • createTabspace
  • createWhitespace
  • getAccessibleAttribute
  • createWhitespace,
  • getAccessibleAttribute,
  • getAccessibleAttributes,
  • getAttributes,
  • getHorizontalScaling,
  • getHyphenation,
  • getId,
  • getImage,
  • getRole

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • putExtra (Intent)
  • onRequestPermissionsResult (Fragment)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now