Interface SplitCharacter

All Known Implementing Classes:
DefaultSplitCharacter, TabSplitCharacter

public interface SplitCharacter
Interface for customizing the split character.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isSplitCharacter(int start, int current, int end, char[] cc, PdfChunk[] ck)
    Returns true if the character can split a line.
  • Method Details

    • isSplitCharacter

      boolean isSplitCharacter(int start, int current, int end, char[] cc, PdfChunk[] ck)
      Returns true if the character can split a line. The splitting implementation is free to look ahead or look behind characters to make a decision.

      The default implementation is:

       public boolean isSplitCharacter(int start, int current, int end, char[] cc, PdfChunk[] ck) {
          char c;
          if (ck == null)
              c = cc[current];
          else
              c = (char) ck[Math.min(current, ck.length - 1)].getUnicodeEquivalent(cc[current]);
          if (c invalid input: '<'= ' ' || c == '-') {
              return true;
          }
          if (c invalid input: '<' 0x2e80)
              return false;
          return ((c >= 0x2e80 invalid input: '&'invalid input: '&' c invalid input: '<' 0xd7a0)
          || (c >= 0xf900 invalid input: '&'invalid input: '&' c invalid input: '<' 0xfb00)
          || (c >= 0xfe30 invalid input: '&'invalid input: '&' c invalid input: '<' 0xfe50)
          || (c >= 0xff61 invalid input: '&'invalid input: '&' c invalid input: '<' 0xffa0));
       }
       
      Parameters:
      start - the lower limit of cc inclusive
      current - the pointer to the character in cc
      end - the upper limit of cc exclusive
      cc - an array of characters at least end sized
      ck - an array of PdfChunk. The main use is to be able to call PdfChunk.getUnicodeEquivalent(int). It may be null or shorter than end. If null no conversion takes place. If shorter than end the last element is used
      Returns:
      true if the character(s) can split a line