com.lowagie.text.pdf

Class BidiLine


public class BidiLine
extends java.lang.Object

Does all the line bidirectional processing with PdfChunk assembly.
Author:
Paulo Soares (psoares@consiste.pt)

Field Summary

protected int
arabicOptions
protected ArrayList
chunks
protected int
currentChar
protected PdfChunk[]
detailChunks
protected int[]
indexChars
protected int
indexChunk
protected int
indexChunkChar
protected static IntHashtable
mirrorChars
protected byte[]
orderLevels
protected int
pieceSize
protected int
runDirection
protected boolean
shortStore
protected int
storedCurrentChar
protected PdfChunk[]
storedDetailChunks
protected int[]
storedIndexChars
protected int
storedIndexChunk
protected int
storedIndexChunkChar
protected byte[]
storedOrderLevels
protected int
storedRunDirection
protected char[]
storedText
protected int
storedTotalTextLength
protected char[]
text
protected int
totalTextLength

Constructor Summary

BidiLine()
Creates new BidiLine
BidiLine(BidiLine org)

Method Summary

void
addChunk(PdfChunk chunk)
void
addChunks(ArrayList chunks)
void
addPiece(char c, PdfChunk chunk)
void
clearChunks()
ArrayList
createArrayOfPdfChunks(int startIdx, int endIdx)
ArrayList
createArrayOfPdfChunks(int startIdx, int endIdx, PdfChunk extraPdfChunk)
void
doArabicShapping()
void
flip(int start, int end)
boolean
getParagraph(int runDirection)
float
getWidth(int startIdx, int lastIdx)
Gets the width of a range of characters.
int[]
getWord(int startIdx, int idx)
boolean
isEmpty()
static boolean
isWS(char c)
void
mirrorGlyphs()
PdfLine
processLine(float width, int alignment, int runDirection, int arabicOptions)
void
reorder(int start, int end)
void
restore()
void
save()
int
trimLeft(int startIdx, int endIdx)
int
trimLeftEx(int startIdx, int endIdx)
int
trimRight(int startIdx, int endIdx)
int
trimRightEx(int startIdx, int endIdx)

Field Details

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 Details

BidiLine

public BidiLine()
Creates new BidiLine

BidiLine

public BidiLine(BidiLine org)

Method Details

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 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)