Main Page | Namespace List | Class Hierarchy | Class List | Class Members | Related Pages

gnu::jpdf::PDFOutline Class Reference

Inheritance diagram for gnu::jpdf::PDFOutline:

Inheritance graph
[legend]
Collaboration diagram for gnu::jpdf::PDFOutline:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PDFOutline (String title, PDFPage dest)
 PDFOutline (String title, PDFPage dest, int l, int b, int r, int t)
PDFOutline add (String title, PDFPage dest)
PDFOutline add (String title, PDFPage dest, int x, int y, int w, int h)
void add (PDFOutline outline)
void write (OutputStream os) throws IOException
Enumeration elements ()

Protected Member Functions

 PDFOutline ()
int getIndex (PDFOutline outline)
int getLast ()
PDFOutline getNode (int i)
int descendants ()

Protected Attributes

PDFOutline parent

Package Attributes

PDFPage dest
int l
int b
int r
int t
boolean destMode

Static Package Attributes

final boolean FITPAGE = false
final boolean FITRECT = true

Detailed Description

This class manages the documents outlines (also known as bookmarks).

Author:
Peter T Mount http://www.retep.org.uk/pdf/

Eric Z. Beard, ericzbeard@hotmail.com

Author
ezb
Version:
Revision
1.1.1.1
,
Date
2001/10/29 19:51:08


Constructor & Destructor Documentation

gnu::jpdf::PDFOutline::PDFOutline  )  [inline, protected]
 

Constructs a PDF Outline object. This method is used internally only.

gnu::jpdf::PDFOutline::PDFOutline String  title,
PDFPage  dest
[inline]
 

Constructs a PDF Outline object. When selected, the whole page is displayed.

Parameters:
title Title of the outline
dest The destination page

gnu::jpdf::PDFOutline::PDFOutline String  title,
PDFPage  dest,
int  l,
int  b,
int  r,
int  t
[inline]
 

Constructs a PDF Outline object. When selected, the specified region is displayed.

Parameters:
title Title of the outline
dest The destination page
l left coordinate
b bottom coordinate
r right coordinate
t top coordinate


Member Function Documentation

void gnu::jpdf::PDFOutline::add PDFOutline  outline  )  [inline]
 

This adds an already existing outline to this one.

Note: the outline must have been added to the PDF document before calling this method. Normally the other add methods are used.

Parameters:
outline PDFOutline to add

PDFOutline gnu::jpdf::PDFOutline::add String  title,
PDFPage  dest,
int  x,
int  y,
int  w,
int  h
[inline]
 

This method creates an outline, and attaches it to this one. When the outline is selected, the supplied region is displayed.

Note: the coordiates are in Java space. They are converted to User space.

This allows you to have an outline for say a Chapter, then under the chapter, one for each section. You are not really limited on how deep you go, but it's best not to go below say 6 levels, for the reader's sake.

Parameters:
title Title of the outline
dest The destination page
x coordinate of region in Java space
y coordinate of region in Java space
w width of region in Java space
h height of region in Java space
Returns:
PDFOutline object created, for creating sub-outlines

PDFOutline gnu::jpdf::PDFOutline::add String  title,
PDFPage  dest
[inline]
 

This method creates an outline, and attaches it to this one. When the outline is selected, the entire page is displayed.

This allows you to have an outline for say a Chapter, then under the chapter, one for each section. You are not really limited on how deep you go, but it's best not to go below say 6 levels, for the reader's sake.

Parameters:
title Title of the outline
dest The destination page
Returns:
PDFOutline object created, for creating sub-outlines

int gnu::jpdf::PDFOutline::descendants  )  [inline, protected]
 

Returns the total number of descendants below this one.

Returns:
the number of descendants below this one

Enumeration gnu::jpdf::PDFOutline::elements  )  [inline]
 

Returns all outlines directly below this one.

Returns:
Enumeration of child elements

int gnu::jpdf::PDFOutline::getIndex PDFOutline  outline  )  [inline, protected]
 

This is called by children to find their position in this outlines tree.

Parameters:
outline PDFOutline to search for
Returns:
index within Vector

int gnu::jpdf::PDFOutline::getLast  )  [inline, protected]
 

Returns the last index in this outline

Returns:
last index in outline

PDFOutline gnu::jpdf::PDFOutline::getNode int  i  )  [inline, protected]
 

Returns the outline at a specified position.

Parameters:
i index
Returns:
the node at index i

void gnu::jpdf::PDFOutline::write OutputStream  os  )  throws IOException [inline, virtual]
 

Parameters:
os OutputStream to send the object to
Exceptions:
IOException on error

Implements gnu::jpdf::PDFObject.


Member Data Documentation

int gnu::jpdf::PDFOutline::b [package]
 

The region on the destination page

PDFPage gnu::jpdf::PDFOutline::dest [package]
 

The destination page

boolean gnu::jpdf::PDFOutline::destMode [package]
 

How the destination is handled

final boolean gnu::jpdf::PDFOutline::FITPAGE = false [static, package]
 

When jumping to the destination, display the whole page

final boolean gnu::jpdf::PDFOutline::FITRECT = true [static, package]
 

When jumping to the destination, display the specified region

int gnu::jpdf::PDFOutline::l [package]
 

The region on the destination page

PDFOutline gnu::jpdf::PDFOutline::parent [protected]
 

For subentries, this points to it's parent outline

int gnu::jpdf::PDFOutline::r [package]
 

The region on the destination page

int gnu::jpdf::PDFOutline::t [package]
 

The region on the destination page


The documentation for this class was generated from the following file:
Generated on Wed Jan 19 16:58:07 2005 by  doxygen 1.3.9.1