com.lowagie.text.pdf.events

Class IndexEvents

public class IndexEvents extends PdfPageEventHelper

Class for an index.

Author: Michael Niedermair

Nested Class Summary
classIndexEvents.Entry
Class for an index entry.
Field Summary
Comparatorcomparator
Comparator for sorting the index
longindexcounter
indexcounter
Listindexentry
the list for the index entry
Mapindextag
keeps the indextag with the pagenumber
Method Summary
Chunkcreate(String text, String in1, String in2, String in3)
Create an index entry.
Chunkcreate(String text, String in1)
Create an index entry.
Chunkcreate(String text, String in1, String in2)
Create an index entry.
voidcreate(Chunk text, String in1, String in2, String in3)
Create an index entry.
voidcreate(Chunk text, String in1)
Create an index entry.
voidcreate(Chunk text, String in1, String in2)
Create an index entry.
ListgetSortedEntries()
Returns the sorted list with the entries and the collected page numbers.
voidonGenericTag(PdfWriter writer, Document document, Rectangle rect, String text)
All the text that is passed to this event, gets registered in the indexentry.
voidsetComparator(Comparator aComparator)
Set the comparator.

Field Detail

comparator

private Comparator comparator
Comparator for sorting the index

indexcounter

private long indexcounter
indexcounter

indexentry

private List indexentry
the list for the index entry

indextag

private Map indextag
keeps the indextag with the pagenumber

Method Detail

create

public Chunk create(String text, String in1, String in2, String in3)
Create an index entry.

Parameters: text The text for the Chunk. in1 The first level. in2 The second level. in3 The third level.

Returns: Returns the Chunk.

create

public Chunk create(String text, String in1)
Create an index entry.

Parameters: text The text for the Chunk. in1 The first level.

Returns: Returns the Chunk.

create

public Chunk create(String text, String in1, String in2)
Create an index entry.

Parameters: text The text for the Chunk. in1 The first level. in2 The second level.

Returns: Returns the Chunk.

create

public void create(Chunk text, String in1, String in2, String in3)
Create an index entry.

Parameters: text The text. in1 The first level. in2 The second level. in3 The third level.

create

public void create(Chunk text, String in1)
Create an index entry.

Parameters: text The text. in1 The first level.

create

public void create(Chunk text, String in1, String in2)
Create an index entry.

Parameters: text The text. in1 The first level. in2 The second level.

getSortedEntries

public List getSortedEntries()
Returns the sorted list with the entries and the collected page numbers.

Returns: Returns the sorted list with the entries and teh collected page numbers.

onGenericTag

public void onGenericTag(PdfWriter writer, Document document, Rectangle rect, String text)
All the text that is passed to this event, gets registered in the indexentry.

See Also: PdfPageEventHelper

setComparator

public void setComparator(Comparator aComparator)
Set the comparator.

Parameters: aComparator The comparator to set.