com.lowagie.rups.view.itext

Class FormTree

public class FormTree extends JTree implements TreeSelectionListener, Observer

A JTree visualizing information about the Interactive Form of the PDF file (if any). Normally shows a tree view of the field hierarchy and individual XDP packets.
Field Summary
protected PdfReaderControllercontroller
Nodes in the FormTree correspond with nodes in the main PdfTree.
static longserialVersionUID
A serial version UID.
protected XfaFilexfaFile
If the form is an XFA form, the XML file is stored in this object.
protected XfaTextAreaxfaTextArea
Textview of the XFA file.
protected XfaTreexfaTree
Treeview of the XFA file.
Constructor Summary
FormTree(PdfReaderController controller)
Creates a new FormTree.
Method Summary
XfaTextAreagetXfaTextArea()
XfaTreegetXfaTree()
voidloadFields(TreeNodeFactory factory, FormTreeNode form_node, PdfObjectTreeNode object_node)
Method that can be used recursively to load the fields hierarchy into the tree.
voidloadXfa(TreeNodeFactory factory, XfaTreeNode form_node, PdfObjectTreeNode object_node)
Method that will load the nodes that refer to XFA streams.
voidupdate(Observable observable, Object obj)
Loads the fields of a PDF document into the FormTree.
voidvalueChanged(TreeSelectionEvent evt)

Field Detail

controller

protected PdfReaderController controller
Nodes in the FormTree correspond with nodes in the main PdfTree.

serialVersionUID

private static final long serialVersionUID
A serial version UID.

xfaFile

protected XfaFile xfaFile
If the form is an XFA form, the XML file is stored in this object.

xfaTextArea

protected XfaTextArea xfaTextArea
Textview of the XFA file.

xfaTree

protected XfaTree xfaTree
Treeview of the XFA file.

Constructor Detail

FormTree

public FormTree(PdfReaderController controller)
Creates a new FormTree.

Method Detail

getXfaTextArea

public XfaTextArea getXfaTextArea()

getXfaTree

public XfaTree getXfaTree()

loadFields

private void loadFields(TreeNodeFactory factory, FormTreeNode form_node, PdfObjectTreeNode object_node)
Method that can be used recursively to load the fields hierarchy into the tree.

Parameters: factory a factory that can produce new PDF object nodes form_node the parent node in the form tree object_node the object node that will be used to create a child node

loadXfa

private void loadXfa(TreeNodeFactory factory, XfaTreeNode form_node, PdfObjectTreeNode object_node)
Method that will load the nodes that refer to XFA streams.

Parameters: form_node the parent node in the form tree object_node the object node that will be used to create a child node

update

public void update(Observable observable, Object obj)
Loads the fields of a PDF document into the FormTree.

Parameters: observable the observable object obj the object

valueChanged

public void valueChanged(TreeSelectionEvent evt)

See Also: javax.swing.event.TreeSelectionListener#valueChanged(javax.swing.event.TreeSelectionEvent)