Bookmark Class Documentation
classBookmarkNamespace:com::datalogics::PDFL
Detailed Description
A bookmark on a page of a PDF document. Each bookmark has a title that appears on screen, and an action that specifies what happens when a user clicks on the bookmark.
The typical action for a user-created bookmark is to move to another location in the current document, although any action (see Action) can be specified.
Member Function Documentation
DisposeChildren
voidDisposeChildren()Returns:
void[static initializer]
static void[static initializer]()addChild
voidaddChild(Bookmarkchild)Parameters
child: Bookmarkthe bookmark being added.
Returns:
voidAdd an existing bookmark to be the child bookmark of a parent.
addNextSibling
voidaddNextSibling(BookmarkNewRightSibling)Parameters
NewRightSibling: BookmarkThe bookmark to become the new right sibling.
Returns:
voidAdd a bookmark to a tree as the next (right) sibling.
addPreviousSibling
voidaddPreviousSibling(BookmarkNewLeftSibling)Parameters
NewLeftSibling: BookmarkThe bookmark to become the new left sibling.
Returns:
voidAdd a bookmark to a tree as the previous (left) sibling.
addSubtree
voidaddSubtree(Bookmarksubtree, Stringtitle)Parameters
subtree: BookmarkThe bookmark subtree to add.
title: Stringthe title of the newly added subtree.
Returns:
voidAdd a copy of a subtree as the new last child of a parent bookmark, and gives the subtree an initial title.
createNewChild
Parameters
page: PageThe PDF page of the new child bookmark.
title: StringThe initial title of the new child bookmark.
Returns:
The newly created child bookmark.(Deprecated, function may be removed in the future, use single-parameter CreateNewChild() method instead) Create a bookmark and add to a parent as the last child bookmark, and give the new bookmark an initial title.
createNewChild
BookmarkcreateNewChild(Stringtitle)Parameters
title: StringThe initial text of the new child bookmark.
Returns:
The newly created child bookmark.Create a new bookmark and add to a parent as the last child bookmark, using supplied string as the initial text.
createNewSibling
BookmarkcreateNewSibling(Stringtitle)Parameters
title: StringThe initial text for the new right sibling.
Returns:
The newly created sibling bookmark.Create a new bookmark in a tree as the next (right) sibling, using supplied string as the initial text.
delete
synchronized voiddelete(Booleandisposing)Parameters
disposing: Boolean
Returns:
synchronized voiddelete
synchronized voiddelete()Returns:
synchronized voiddestroy
voiddestroy()Returns:
voidRemoves a bookmark subtree from the bookmark tree containing it.
equals
booleanequals(Objectrhs)Parameters
rhs: Object
Returns:
booleanfinalize
voidfinalize()Returns:
voidfindDescendentBookmark
BookmarkfindDescendentBookmark(Stringtitle)Parameters
title: StringThe title of the bookmark for which to search.
Returns:
The bookmark within this bookmark's tree that has the supplied title. Returns NULL if there is no bookmark with the supplied title.Find bookmark by its title within the subtree of which this bookmark is the root, searching within the entire subtree.
findDescendentBookmark
BookmarkfindDescendentBookmark(Stringtitle, intmaxDepth)Parameters
title: StringThe title of the bookmark for which to search.
maxDepth: intIf supplied, declares the number of levels below this bookmark to search. (If omitted, the entire subtree is searched.)
Returns:
The bookmark within this bookmark's tree that has the supplied title. Returns NULL if there is no bookmark with the supplied title.Find bookmark by its title within the subtree of which this bookmark is the root, searching within the subtree to a depth determined by maxDepth (e.g., 0 = this bookmark only and not any of its children, 1 = search one level below this bookmark level, etc.)
getAction
ActiongetAction()Returns:
The action of the bookmark.Get the Action for a bookmark.
getColor
ColorgetColor()Returns:
the color, or null if no color was specifiedGet the color of the bookmark.
getCount
intgetCount()Returns:
the number of open bookmarks.Get the number of open bookmarks in the subtree under this bookmark.
getFirstChild
BookmarkgetFirstChild()Returns:
The first child of Bookmark, or null if Bookmark has no children.Gets a bookmark's first child.
getFlags
java.util.EnumSet< BookmarkFlags >getFlags()Returns:
the flagsGet the flags for the bookmark.
getIndent
intgetIndent()Returns:
the indentation level of the bookmark.Get the indentation level of a bookmark in its containing tree.
getLastChild
BookmarkgetLastChild()Returns:
The last child of Bookmark, or null if Bookmark has no children.Gets a bookmark's last child.
getNext
BookmarkgetNext()Returns:
The Bookmark object's next (right) sibling. It returns null if Bookmark has no next sibling (that is, it is its parent's last child).Gets a bookmark's next (right) sibling.
getOpen
booleangetOpen()Returns:
true if the bookmark is open.Is the bookmark open?
getPDFDict
PDFDictgetPDFDict()Returns:
The dictionary associated with the bookmark.Get the dictionary associated with the bookmark.
getParent
BookmarkgetParent()Returns:
The Bookmark object's parent. It returns null if Bookmark has no parent (that is, it is the root of the tree).Gets a bookmark's parent.
getPrevious
BookmarkgetPrevious()Returns:
The Bookmark object's previous (left) sibling. It returns null if Bookmark has no previous sibling (that is, it is its parent's first child).Gets a bookmark's previous (left) sibling.
getTitle
StringgetTitle()Returns:
StringThe title of the bookmark.
getViewDestination
ViewDestinationgetViewDestination()Returns:
the view destinationIf this bookmark has a GoTo action, then return the destination of the action, else return null.
hasChildren
booleanhasChildren()Returns:
true if the bookmark has children.Does the bookmark have children?
isOpen
booleanisOpen()Returns:
true if the bookmark is open.Is the bookmark open?
sameTypeEquals
booleansameTypeEquals(Bookmarkarg0)Parameters
arg0: Bookmark
Returns:
booleansetAction
voidsetAction(Actionaction)Parameters
action: ActionThe action to set for the bookmark.
Returns:
voidSet the Action for a bookmark.
setColor
voidsetColor(Colorbookmarkcolor)Parameters
bookmarkcolor: Color
Returns:
voidSet the color of the bookmark.
setFlags
voidsetFlags(java.util.EnumSet< BookmarkFlags >arg0)Parameters
arg0: java.util.EnumSet< BookmarkFlags >
Returns:
voidSet the flags for the bookmark to the parameter values.
setOpen
voidsetOpen(booleanopenvalue)Parameters
openvalue: boolean
Returns:
voidSet if the bookmark is open or closed.
setTitle
voidsetTitle(Stringtitle)Parameters
title: String
Returns:
voidThe title of the bookmark.
toString
StringtoString()Returns:
Stringunlink
voidunlink()Returns:
voidUnlinks the bookmark from the bookmark tree that contains it and adjusts the tree appropriately.