com.lowagie.tools.plugins.treeview

Class AnalyzePDF

public class AnalyzePDF extends Thread implements TreeModel, ICommonAnalyzer

Field Summary
DefaultMutableTreeNodefilenode
intnumberofpages
intpagecount
ArrayListpageInh
ProgressDialogprogressdialog
PdfReaderreader
DefaultMutableTreeNoderoot
VectortreeModelListeners
Constructor Summary
AnalyzePDF(String infile, ProgressDialog blubb)
Method Summary
voidaddTreeModelListener(TreeModelListener l)
protected voidfireTreeNodesChanged(TreeModelEvent e)
protected voidfireTreeNodesInserted(TreeModelEvent e)
protected voidfireTreeNodesRemoved(TreeModelEvent e)
protected voidfireTreeStructureChanged(TreeModelEvent e)
ObjectgetChild(Object parent, int index)
Returns the child of parent at index index in the parent's child array.
intgetChildCount(Object parent)
Returns the number of children of parent.
intgetIndexOfChild(Object parent, Object child)
Returns the index of child in parent.
intgetPagecount()
ObjectgetRoot()
Returns the root of the tree.
TableModelgetXReftable()
booleanisLeaf(Object node)
Returns true if node is a leaf.
voiditerateObjects(PdfObject pdfobj, PdfReader pdfreader, DefaultMutableTreeNode node)
Recursive investigate PDF Objecttree (other than pagetree objects!)
protected voiditerateOutlines(PdfDictionary outlines, PdfReader pdfreader, DefaultMutableTreeNode node)
protected voiditeratePages(PdfDictionary page, PdfReader pdfreader, DefaultMutableTreeNode node)
Walk down the Pagetree
voidremoveTreeModelListener(TreeModelListener l)
voidrun()
When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread.
voidupdatecount()
voidvalueForPathChanged(TreePath path, Object newValue)
Messaged when the user has altered the value for the item identified by path to newValue.

Field Detail

filenode

DefaultMutableTreeNode filenode

numberofpages

int numberofpages

pagecount

int pagecount

pageInh

ArrayList pageInh

progressdialog

ProgressDialog progressdialog

reader

PdfReader reader

root

DefaultMutableTreeNode root

treeModelListeners

private transient Vector treeModelListeners

Constructor Detail

AnalyzePDF

public AnalyzePDF(String infile, ProgressDialog blubb)

Method Detail

addTreeModelListener

public void addTreeModelListener(TreeModelListener l)

fireTreeNodesChanged

protected void fireTreeNodesChanged(TreeModelEvent e)

fireTreeNodesInserted

protected void fireTreeNodesInserted(TreeModelEvent e)

fireTreeNodesRemoved

protected void fireTreeNodesRemoved(TreeModelEvent e)

fireTreeStructureChanged

protected void fireTreeStructureChanged(TreeModelEvent e)

getChild

public Object getChild(Object parent, int index)
Returns the child of parent at index index in the parent's child array.

Parameters: parent a node in the tree, obtained from this data source index int

Returns: the child of parent at index index

getChildCount

public int getChildCount(Object parent)
Returns the number of children of parent.

Parameters: parent a node in the tree, obtained from this data source

Returns: the number of children of the node parent

getIndexOfChild

public int getIndexOfChild(Object parent, Object child)
Returns the index of child in parent.

Parameters: parent a note in the tree, obtained from this data source child the node we are interested in

Returns: the index of the child in the parent, or -1 if either child or parent are null

getPagecount

public int getPagecount()

getRoot

public Object getRoot()
Returns the root of the tree.

Returns: the root of the tree

getXReftable

public TableModel getXReftable()

isLeaf

public boolean isLeaf(Object node)
Returns true if node is a leaf.

Parameters: node a node in the tree, obtained from this data source

Returns: true if node is a leaf

iterateObjects

public void iterateObjects(PdfObject pdfobj, PdfReader pdfreader, DefaultMutableTreeNode node)
Recursive investigate PDF Objecttree (other than pagetree objects!)

Parameters: pdfobj PdfObject pdfreader PdfReader node DefaultMutableTreeNode

iterateOutlines

protected void iterateOutlines(PdfDictionary outlines, PdfReader pdfreader, DefaultMutableTreeNode node)

iteratePages

protected void iteratePages(PdfDictionary page, PdfReader pdfreader, DefaultMutableTreeNode node)
Walk down the Pagetree

Parameters: page PdfDictionary pdfreader PdfReader node DefaultMutableTreeNode

removeTreeModelListener

public void removeTreeModelListener(TreeModelListener l)

run

public void run()
When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread.

updatecount

public void updatecount()

valueForPathChanged

public void valueForPathChanged(TreePath path, Object newValue)
Messaged when the user has altered the value for the item identified by path to newValue.

Parameters: path path to the node that the user has altered newValue the new value from the TreeCellEditor