|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
com.lowagie.rups.view.icons.IconTreeNode
com.lowagie.rups.view.itext.treenodes.PdfObjectTreeNode
public class PdfObjectTreeNode
Every node in our tree corresponds with a PDF object. This class is the superclass of all tree nodes used.
Field Summary | |
---|---|
protected PdfName |
key
the key if the parent of this node is a dictionary. |
protected int |
number
if the object is indirect, the number of the PDF object. |
protected PdfObject |
object
the PDF object corresponding with this node. |
protected boolean |
recursive
indicates if the object is indirect and recursive. |
private static long |
serialVersionUID
a serial version UID. |
Fields inherited from class com.lowagie.rups.view.icons.IconTreeNode |
---|
icon |
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
Constructor Summary | |
---|---|
protected |
PdfObjectTreeNode(PdfObject object)
Creates a tree node for a PDF object. |
protected |
PdfObjectTreeNode(String icon,
PdfObject object)
Creates a tree node for a PDF object. |
Method Summary | |
---|---|
PdfObjectTreeNode |
getAncestor()
Gets the tree path of an ancestor. |
static String |
getCaption(PdfObject object)
Creates the caption for a PDF object. |
static String |
getDictionaryEntryCaption(PdfDictionary dict,
PdfName key)
Creates the caption for an object that is a dictionary entry. |
static PdfObjectTreeNode |
getInstance(PdfDictionary dict,
PdfName key)
Creates an instance of a tree node for the object corresponding with a key in a dictionary. |
static PdfObjectTreeNode |
getInstance(PdfObject object)
Creates an instance of a tree node for a PDF object. |
static PdfObjectTreeNode |
getInstance(PdfObject object,
int number)
Creates an instance of a tree node for an indirect object. |
int |
getNumber()
Getter for the object number in case the object is indirect. |
PdfObject |
getPdfObject()
Getter for the PDF Object. |
boolean |
isArray()
Tells you if the node contains an array. |
boolean |
isDictionary()
Tells you if the node contains a dictionary. |
boolean |
isDictionaryNode(PdfName key)
Checks if this node is a dictionary item with a specific key. |
boolean |
isIndirect()
Tells you if the object is indirect. |
boolean |
isIndirectReference()
Tells you if the node contains an indirect reference. |
boolean |
isRecursive()
Tells you if the object is a reference to a node higher up in the tree. |
boolean |
isStream()
Tells you if the node contains a stream. |
void |
setRecursive(boolean recursive)
Set this to true if the object is a reference to a node higher up in the tree. |
Methods inherited from class com.lowagie.rups.view.icons.IconTreeNode |
---|
getIcon |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected PdfObject object
protected PdfName key
protected int number
protected boolean recursive
private static final long serialVersionUID
Constructor Detail |
---|
protected PdfObjectTreeNode(PdfObject object)
object
- the PDF object represented by this tree node.protected PdfObjectTreeNode(String icon, PdfObject object)
icon
- the file with the iconobject
- the PDF object represented by this tree node.Method Detail |
---|
public static PdfObjectTreeNode getInstance(PdfObject object)
object
- the PDF object represented by this tree node.
public static PdfObjectTreeNode getInstance(PdfObject object, int number)
object
- the PDF object represented by this tree node.number
- the xref number of the indirect object
public static PdfObjectTreeNode getInstance(PdfDictionary dict, PdfName key)
dict
- the dictionary that is the parent of this tree node.key
- the dictionary key corresponding with the PDF object in this tree node.
public PdfObject getPdfObject()
public int getNumber()
public boolean isIndirectReference()
public boolean isIndirect()
public boolean isArray()
public boolean isDictionaryNode(PdfName key)
key
- the key of the node we're looking forpublic boolean isDictionary()
public boolean isStream()
public void setRecursive(boolean recursive)
recursive
- true if the object is indirect and recursivepublic boolean isRecursive()
public static String getCaption(PdfObject object)
object
- the object for which a caption has to be created.
public static String getDictionaryEntryCaption(PdfDictionary dict, PdfName key)
dict
- a dictionarykey
- a key in the dictionary
public PdfObjectTreeNode getAncestor()
|
Hosted by Hostbasket | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |