|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectpdftron.PDF.Bookmark
public class Bookmark
A %PDF document may optionally display a document outline on the screen, allowing the user to navigate interactively from one part of the document to another. The outline consists of a tree-structured hierarchy of Bookmarks (sometimes called outline items), which serve as a 'visual table of contents' to display the document’s structure to the user. 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 PDF::Action) can be specified. Bookmark is a utility class used to simplify work with %PDF bookmarks (or outlines; see section 8.2.2 'Document Outline' in %PDF Reference Manual for more details).
| Constructor Summary | |
|---|---|
Bookmark()
A constructor. |
|
Bookmark(Obj in_bookmark_dict)
A constructor. |
|
| Method Summary | |
|---|---|
void |
addChild(Bookmark in_bookmark)
Adds the specified Bookmark as the new last child of this Bookmark. |
Bookmark |
addChild(java.lang.String in_title)
Adds a new Bookmark as the new last child of this Bookmark. |
void |
addNext(Bookmark in_bookmark)
Adds the specified Bookmark as the new right sibling to this Bookmark, adjusting the tree containing this Bookmark appropriately. |
Bookmark |
addNext(java.lang.String in_title)
Adds a new Bookmark to the tree containing this Bookmark, as the new right sibling. |
void |
addPrev(Bookmark in_bookmark)
Adds the specified Bookmark as the new left sibling to this Bookmark, adjusting the tree containing this Bookmark appropriately. |
Bookmark |
addPrev(java.lang.String in_title)
Adds a new Bookmark to the tree containing this Bookmark, as the new left sibling. |
static Bookmark |
create(PDFDoc in_doc,
java.lang.String in_title)
Creates a new valid Bookmark with given title in the specified document. |
void |
delete()
Removes the Bookmark's subtree from the bookmark tree containing it. |
boolean |
equals(java.lang.Object b)
Compares two Bookmark objects for equality. |
Bookmark |
find(java.lang.String in_title)
Get the Bookmark specified by the given title string. |
Action |
getAction()
Get the Bookmark's action. |
double[] |
getColor()
Get the Bookmark's RGB color value. |
Bookmark |
getFirstChild()
Returns the Bookmark's first child. |
int |
getFlags()
Get the Bookmark's flags. |
int |
getIndent()
Get the indentation level of the Bookmark in its containing tree. |
Bookmark |
getLastChild()
Returns the Bookmark's last child. |
Bookmark |
getNext()
Returns the Bookmark's next (right) sibling. |
int |
getOpenCount()
Get the number of opened bookmarks in this subtree. |
Bookmark |
getParent()
Returns the Bookmark's parent Bookmark. |
Bookmark |
getPrev()
Returns the Bookmark's previous (left) sibling. |
Obj |
getSDFObj()
Returns the underlying SDF/Cos object. |
java.lang.String |
getTitle()
Get the Bookmark's title string. |
Obj |
getTitleObj()
Get the Bookmark's title string object. |
boolean |
hasChildren()
Indicates whether the Bookmark has children. |
int |
hashCode()
|
boolean |
isOpen()
Indicates whether the Bookmark is open. |
boolean |
isValid()
Indicates whether the Bookmark is valid (non-null). |
void |
removeAction()
Removes the Bookmark’s action. |
void |
setAction(Action in_action)
Set the Bookmark’s action. |
void |
setColor()
Set Bookmark's text to black. |
void |
setColor(double in_r,
double in_g,
double in_b)
Set Bookmark's text to specified color in RGB value |
void |
setFlags(int in_flags)
Set the Bookmark's flags. |
void |
setOpen(boolean in_open)
Open or close the Bookmark. |
void |
setTitle(java.lang.String title)
Set the Bookmark’s title string. |
void |
unlink()
Unlinks this Bookmark from the bookmark tree that contains it, and adjusts the tree appropriately. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Bookmark()
public Bookmark(Obj in_bookmark_dict)
in_bookmark_dict - Pointer to the Cos/SDF object (outline item dictionary).| Method Detail |
|---|
public static Bookmark create(PDFDoc in_doc,
java.lang.String in_title)
throws PDFNetException
in_doc - The document in which a Bookmark is to be created.in_title - The title string value of the new Bookmark.
PDFNetExceptionpublic boolean equals(java.lang.Object b)
equals in class java.lang.Objectb - the b
public int hashCode()
hashCode in class java.lang.Object
public boolean isValid()
throws PDFNetException
PDFNetException
public boolean hasChildren()
throws PDFNetException
PDFNetException
public Bookmark getNext()
throws PDFNetException
PDFNetException
public Bookmark getPrev()
throws PDFNetException
PDFNetException
public Bookmark getFirstChild()
throws PDFNetException
PDFNetException
public Bookmark getLastChild()
throws PDFNetException
PDFNetException
public Bookmark getParent()
throws PDFNetException
PDFNetException
public Bookmark find(java.lang.String in_title)
throws PDFNetException
in_title - The title string value of the Bookmark to find.
PDFNetException
public Bookmark addChild(java.lang.String in_title)
throws PDFNetException
in_title - The title string value of the new Bookmark.
PDFNetException
public void addChild(Bookmark in_bookmark)
throws PDFNetException
in_bookmark - The Bookmark object to be added as a last child of this Bookmark.
PDFNetException
public Bookmark addNext(java.lang.String in_title)
throws PDFNetException
in_title - The title string value of the new Bookmark.
PDFNetException
public void addNext(Bookmark in_bookmark)
throws PDFNetException
in_bookmark - The Bookmark object to be added to this Bookmark.
PDFNetException
public Bookmark addPrev(java.lang.String in_title)
throws PDFNetException
in_title - The title string value of the new Bookmark.
PDFNetException
public void addPrev(Bookmark in_bookmark)
throws PDFNetException
in_bookmark - The Bookmark object to be added to this Bookmark.
PDFNetException
public void delete()
throws PDFNetException
PDFNetException
public void unlink()
throws PDFNetException
PDFNetException
public int getIndent()
throws PDFNetException
PDFNetException
public boolean isOpen()
throws PDFNetException
PDFNetException
public void setOpen(boolean in_open)
throws PDFNetException
in_open - Boolean value that contains the status.
If true, the Bookmark is opened. Otherwise the Bookmark is closed.
PDFNetException
public int getOpenCount()
throws PDFNetException
PDFNetException
public java.lang.String getTitle()
throws PDFNetException
PDFNetException
public Obj getTitleObj()
throws PDFNetException
PDFNetException
public void setTitle(java.lang.String title)
throws PDFNetException
title - The new title string for the bookmark.
PDFNetException
public Action getAction()
throws PDFNetException
PDFNetException
public void setAction(Action in_action)
throws PDFNetException
in_action - The new Action for the Bookmark.
PDFNetException
public void removeAction()
throws PDFNetException
PDFNetException
public int getFlags()
throws PDFNetException
PDFNetException
public void setFlags(int in_flags)
throws PDFNetException
in_flags - The new bookmark flags.
Bit 1 (the least-significant bit) indicates italic font whereas
bit 2 indicates bold font.
Therefore, 0 indicates normal, 1 is italic, 2 is bold, and 3 is bold-italic.
PDFNetException
public double[] getColor()
throws PDFNetException
PDFNetException
public void setColor()
throws PDFNetException
PDFNetException
public void setColor(double in_r,
double in_g,
double in_b)
throws PDFNetException
in_r - the red component in the DeviceRGB color spacein_g - the green component in the DeviceRGB color spacein_b - the blue component in the DeviceRGB color space
PDFNetExceptionpublic Obj getSDFObj()
|
© 2002-2011 PDFTron Systems Inc. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||