Save This Page
Home » iText-src-2.1.3 » com.lowagie » text » [javadoc | source]
com.lowagie.text
public interface: SplitCharacter [javadoc | source]

All Known Implementing Classes:
    DefaultSplitCharacter

Interface for customizing the split character.
Method from com.lowagie.text.SplitCharacter Summary:
isSplitCharacter
Method from com.lowagie.text.SplitCharacter Detail:
 public 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 <= ' ' || c == '-') {
    return true;
    }
    if (c < 0x2e80)
    return false;
    return ((c >= 0x2e80 && c < 0xd7a0)
    || (c >= 0xf900 && c < 0xfb00)
    || (c >= 0xfe30 && c < 0xfe50)
    || (c >= 0xff61 && c < 0xffa0));
    }