Bookmark Class Documentation

class Bookmark

Namespace: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.

Referenced by

Member Function Documentation

addChild

void addChild(Bookmark child)

Parameters

child: Bookmark

the bookmark being added.

Returns:

void

Add an existing bookmark to be the child bookmark of a parent.

addNextSibling

void addNextSibling(Bookmark NewRightSibling)

Parameters

NewRightSibling: Bookmark

The bookmark to become the new right sibling.

Returns:

void

Add a bookmark to a tree as the next (right) sibling.

addPreviousSibling

void addPreviousSibling(Bookmark NewLeftSibling)

Parameters

NewLeftSibling: Bookmark

The bookmark to become the new left sibling.

Returns:

void

Add a bookmark to a tree as the previous (left) sibling.

addSubtree

void addSubtree(Bookmark subtree, String title)

Parameters

subtree: Bookmark

The bookmark subtree to add.

title: String

the title of the newly added subtree.

Returns:

void

Add a copy of a subtree as the new last child of a parent bookmark, and gives the subtree an initial title.

createNewChild

Bookmark createNewChild(Page page, String title)

Parameters

page: Page

The PDF page of the new child bookmark.

title: String

The initial title of the new child bookmark.

Returns:

Bookmark

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

Bookmark createNewChild(String title)

Parameters

title: String

The initial text of the new child bookmark.

Returns:

Bookmark

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

Bookmark createNewSibling(String title)

Parameters

title: String

The initial text for the new right sibling.

Returns:

Bookmark

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 void delete(Boolean disposing)

Parameters

disposing: Boolean

Returns:

synchronized void

delete

synchronized void delete()

Returns:

synchronized void

destroy

void destroy()

Returns:

void

Removes a bookmark subtree from the bookmark tree containing it.

equals

boolean equals(Object rhs)

Parameters

rhs: Object

Returns:

boolean

finalize

void finalize()

Returns:

void

findDescendentBookmark

Bookmark findDescendentBookmark(String title)

Parameters

title: String

The title of the bookmark for which to search.

Returns:

Bookmark

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

Bookmark findDescendentBookmark(String title, int maxDepth)

Parameters

title: String

The title of the bookmark for which to search.

maxDepth: int

If supplied, declares the number of levels below this bookmark to search. (If omitted, the entire subtree is searched.)

Returns:

Bookmark

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

Action getAction()

Returns:

Action

The action of the bookmark.

Get the Action for a bookmark.

getColor

Color getColor()

Returns:

Color

the color, or null if no color was specified

Get the color of the bookmark.

getCount

int getCount()

Returns:

int

the number of open bookmarks.

Get the number of open bookmarks in the subtree under this bookmark.

getFirstChild

Bookmark getFirstChild()

Returns:

Bookmark

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:

java.util.EnumSet< BookmarkFlags >

the flags

Get the flags for the bookmark.

getIndent

int getIndent()

Returns:

int

the indentation level of the bookmark.

Get the indentation level of a bookmark in its containing tree.

getLastChild

Bookmark getLastChild()

Returns:

Bookmark

The last child of Bookmark, or null if Bookmark has no children.

Gets a bookmark's last child.

getNext

Bookmark getNext()

Returns:

Bookmark

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

boolean getOpen()

Returns:

boolean

true if the bookmark is open.

Is the bookmark open?

getPDFDict

PDFDict getPDFDict()

Returns:

PDFDict

The dictionary associated with the bookmark.

Get the dictionary associated with the bookmark.

getParent

Bookmark getParent()

Returns:

Bookmark

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

Bookmark getPrevious()

Returns:

Bookmark

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

String getTitle()

Returns:

String

The title of the bookmark.

getViewDestination

ViewDestination getViewDestination()

Returns:

ViewDestination

the view destination

If this bookmark has a GoTo action, then return the destination of the action, else return null.

hasChildren

boolean hasChildren()

Returns:

boolean

true if the bookmark has children.

Does the bookmark have children?

isOpen

boolean isOpen()

Returns:

boolean

true if the bookmark is open.

Is the bookmark open?

setAction

void setAction(Action action)

Parameters

action: Action

The action to set for the bookmark.

Returns:

void

Set the Action for a bookmark.

setColor

void setColor(Color bookmarkcolor)

Parameters

bookmarkcolor: Color

Returns:

void

Set the color of the bookmark.

setFlags

void setFlags(java.util.EnumSet< BookmarkFlags > arg0)

Parameters

arg0: java.util.EnumSet< BookmarkFlags >

Returns:

void

Set the flags for the bookmark to the parameter values.

setOpen

void setOpen(boolean openvalue)

Parameters

openvalue: boolean

Returns:

void

Set if the bookmark is open or closed.

setTitle

void setTitle(String title)

Parameters

title: String

Returns:

void

The title of the bookmark.

toString

String toString()

Returns:

String

A string describing this Bookmark and its properties.

Returns a string representation of this Bookmark. The string includes the title, color, flags, count, indent level, open state, and view destination if available.