congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Chunk.isEmpty
Code IndexAdd Tabnine to your IDE (free)

How to use
isEmpty
method
in
com.itextpdf.text.Chunk

Best Java code snippets using com.itextpdf.text.Chunk.isEmpty (Showing top 10 results out of 315)

origin: com.itextpdf/itextpdf

/**
 * Applies the properties of the Anchor to a Chunk.
 * @param chunk            the Chunk (part of the Anchor)
 * @param notGotoOK        if true, this chunk will determine the local destination
 * @param localDestination    true if the chunk is a local goto and the reference a local destination
 * @return    the value of notGotoOK or false, if a previous Chunk was used to determine the local destination
 */
protected boolean applyAnchor(Chunk chunk, boolean notGotoOK, boolean localDestination) {
  if (name != null && notGotoOK && !chunk.isEmpty()) {
    chunk.setLocalDestination(name);
    notGotoOK = false;
  }
  if (localDestination) {
    chunk.setLocalGoto(reference.substring(1));
  }
  else if (reference != null)
    chunk.setAnchor(reference);
  return notGotoOK;
}
origin: com.itextpdf/itextpdf

while (i.hasNext()) {
  chunk = i.next();
  if (name != null && notGotoOK && !chunk.isEmpty()) {
    chunk.setLocalDestination(name);
    notGotoOK = false;
origin: com.itextpdf/itextg

/**
 * Applies the properties of the Anchor to a Chunk.
 * @param chunk            the Chunk (part of the Anchor)
 * @param notGotoOK        if true, this chunk will determine the local destination
 * @param localDestination    true if the chunk is a local goto and the reference a local destination
 * @return    the value of notGotoOK or false, if a previous Chunk was used to determine the local destination
 */
protected boolean applyAnchor(Chunk chunk, boolean notGotoOK, boolean localDestination) {
  if (name != null && notGotoOK && !chunk.isEmpty()) {
    chunk.setLocalDestination(name);
    notGotoOK = false;
  }
  if (localDestination) {
    chunk.setLocalGoto(reference.substring(1));
  }
  else if (reference != null)
    chunk.setAnchor(reference);
  return notGotoOK;
}
origin: com.itextpdf/itextg

while (i.hasNext()) {
  chunk = i.next();
  if (name != null && notGotoOK && !chunk.isEmpty()) {
    chunk.setLocalDestination(name);
    notGotoOK = false;
origin: com.itextpdf/itextpdf

/**
 * 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.
 */
@Override
public boolean isEmpty() {
  switch(size()) {
    case 0:
      return true;
    case 1:
      Element element = get(0);
      if (element.type() == Element.CHUNK && ((Chunk) element).isEmpty()) {
        return true;
      }
      return false;
      default:
        return false;
  }
}
origin: com.itextpdf/itextg

/**
 * 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.
 */
@Override
public boolean isEmpty() {
  switch(size()) {
    case 0:
      return true;
    case 1:
      Element element = get(0);
      if (element.type() == Element.CHUNK && ((Chunk) element).isEmpty()) {
        return true;
      }
      return false;
      default:
        return false;
  }
}
origin: com.itextpdf/itextpdf

  chunk.setFont(font.difference(chunk.getFont()));
if (hyphenation != null && chunk.getHyphenation() == null && !chunk.isEmpty()) {
  chunk.setHyphenation(hyphenation);
origin: com.itextpdf/itextg

  chunk.setFont(font.difference(chunk.getFont()));
if (hyphenation != null && chunk.getHyphenation() == null && !chunk.isEmpty()) {
  chunk.setHyphenation(hyphenation);
origin: com.itextpdf/itextpdf

newChunk.role = chunk.getRole();
newChunk.accessibleAttributes = chunk.getAccessibleAttributes();
if (hyphenation != null && newChunk.getHyphenation() == null && !newChunk.isEmpty()) {
  newChunk.setHyphenation(hyphenation);
origin: com.itextpdf/itextg

newChunk.role = chunk.getRole();
newChunk.accessibleAttributes = chunk.getAccessibleAttributes();
if (hyphenation != null && newChunk.getHyphenation() == null && !newChunk.isEmpty()) {
  newChunk.setHyphenation(hyphenation);
com.itextpdf.textChunkisEmpty

Javadoc

Checks is this Chunk is empty.

Popular methods of Chunk

  • <init>
    Constructs a chunk of text with a certain content and a certain Font.
  • 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
  • createTabspace,
  • createWhitespace,
  • getAccessibleAttribute,
  • getAccessibleAttributes,
  • getAttributes,
  • getHorizontalScaling,
  • getHyphenation,
  • getId,
  • getImage,
  • getRole

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSharedPreferences (Context)
  • onRequestPermissionsResult (Fragment)
  • compareTo (BigDecimal)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • String (java.lang)
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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