com.lowagie.text.pdf

Class BidiLine

public class BidiLine extends Object

Does all the line bidirectional processing with PdfChunk assembly.

Author: Paulo Soares (psoares@consiste.pt)

Field Summary
protected intarabicOptions
protected ArrayListchunks
protected intcurrentChar
protected PdfChunk[]detailChunks
protected int[]indexChars
protected intindexChunk
protected intindexChunkChar
protected static IntHashtablemirrorChars
protected byte[]orderLevels
protected intpieceSize
protected intrunDirection
protected booleanshortStore
protected intstoredCurrentChar
protected PdfChunk[]storedDetailChunks
protected int[]storedIndexChars
protected intstoredIndexChunk
protected intstoredIndexChunkChar
protected byte[]storedOrderLevels
protected intstoredRunDirection
protected char[]storedText
protected intstoredTotalTextLength
protected char[]text
protected inttotalTextLength
Constructor Summary
BidiLine()
Creates new BidiLine
BidiLine(BidiLine org)
Method Summary
voidaddChunk(PdfChunk chunk)
voidaddChunks(ArrayList chunks)
voidaddPiece(char c, PdfChunk chunk)
voidclearChunks()
ArrayListcreateArrayOfPdfChunks(int startIdx, int endIdx)
ArrayListcreateArrayOfPdfChunks(int startIdx, int endIdx, PdfChunk extraPdfChunk)
voiddoArabicShapping()
voidflip(int start, int end)
booleangetParagraph(int runDirection)
floatgetWidth(int startIdx, int lastIdx)
Gets the width of a range of characters.
int[]getWord(int startIdx, int idx)
booleanisEmpty()
static booleanisWS(char c)
voidmirrorGlyphs()
PdfLineprocessLine(float leftX, float width, int alignment, int runDirection, int arabicOptions)
voidreorder(int start, int end)
voidrestore()
voidsave()
inttrimLeft(int startIdx, int endIdx)
inttrimLeftEx(int startIdx, int endIdx)
inttrimRight(int startIdx, int endIdx)
inttrimRightEx(int startIdx, int endIdx)

Field Detail

arabicOptions

protected int arabicOptions

chunks

protected ArrayList chunks

currentChar

protected int currentChar

detailChunks

protected PdfChunk[] detailChunks

indexChars

protected int[] indexChars

indexChunk

protected int indexChunk

indexChunkChar

protected int indexChunkChar

mirrorChars

protected static final IntHashtable mirrorChars

orderLevels

protected byte[] orderLevels

pieceSize

protected int pieceSize

runDirection

protected int runDirection

shortStore

protected boolean shortStore

storedCurrentChar

protected int storedCurrentChar

storedDetailChunks

protected PdfChunk[] storedDetailChunks

storedIndexChars

protected int[] storedIndexChars

storedIndexChunk

protected int storedIndexChunk

storedIndexChunkChar

protected int storedIndexChunkChar

storedOrderLevels

protected byte[] storedOrderLevels

storedRunDirection

protected int storedRunDirection

storedText

protected char[] storedText

storedTotalTextLength

protected int storedTotalTextLength

text

protected char[] text

totalTextLength

protected int totalTextLength

Constructor Detail

BidiLine

public BidiLine()
Creates new BidiLine

BidiLine

public BidiLine(BidiLine org)

Method Detail

addChunk

public void addChunk(PdfChunk chunk)

addChunks

public void addChunks(ArrayList chunks)

addPiece

public void addPiece(char c, PdfChunk chunk)

clearChunks

public void clearChunks()

createArrayOfPdfChunks

public ArrayList createArrayOfPdfChunks(int startIdx, int endIdx)

createArrayOfPdfChunks

public ArrayList createArrayOfPdfChunks(int startIdx, int endIdx, PdfChunk extraPdfChunk)

doArabicShapping

public void doArabicShapping()

flip

public void flip(int start, int end)

getParagraph

public boolean getParagraph(int runDirection)

getWidth

public float getWidth(int startIdx, int lastIdx)
Gets the width of a range of characters.

Parameters: startIdx the first index to calculate lastIdx the last inclusive index to calculate

Returns: the sum of all widths

getWord

public int[] getWord(int startIdx, int idx)

isEmpty

public boolean isEmpty()

isWS

public static boolean isWS(char c)

mirrorGlyphs

public void mirrorGlyphs()

processLine

public PdfLine processLine(float leftX, float width, int alignment, int runDirection, int arabicOptions)

reorder

public void reorder(int start, int end)

restore

public void restore()

save

public void save()

trimLeft

public int trimLeft(int startIdx, int endIdx)

trimLeftEx

public int trimLeftEx(int startIdx, int endIdx)

trimRight

public int trimRight(int startIdx, int endIdx)

trimRightEx

public int trimRightEx(int startIdx, int endIdx)