ElegantJ PDF Library Java API Specification v1.1

com.elegantj.pdf
Class Outlines

java.lang.Object
  extended bycom.elegantj.pdf.PDFObject
      extended bycom.elegantj.pdf.Outlines

public class Outlines
extends PDFObject

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


Field Summary
protected  Outlines parent
          For subentries, this points to it's parent outline
 
Constructor Summary
protected Outlines(PDF pdf)
          Constructs a PDF Outline object.
  Outlines(PDF pdf, java.lang.String title, Page dest)
          Constructs a PDF Outline object.
  Outlines(PDF pdf, java.lang.String title, Page dest, int x, int y, int w, int h)
          Constructs a PDF Outline object.
 
Method Summary
 void add(Outlines outline)
          This adds an already existing outline to this one Note: the outline must have been added to the PDF document before calling this method.
 Outlines add(java.lang.String title, Page dest)
          This method creates an outline, and attaches it to this one.
 Outlines add(java.lang.String title, Page dest, int x, int y, int w, int h)
          This method creates an outline, and attaches it to this one
protected  int descendants()
          Method which returns the total number of descendants below this one
 java.util.Enumeration elements()
          Method which returns all outlines directly below this one
protected  int getIndex(Outlines outline)
          This method is called by children to find their position in this outlines tree
protected  int getLast()
          Method which returns the last index in this outline
protected  Outlines getNode(int i)
          Method which returns the outline at a specified position.
 
Methods inherited from class com.elegantj.pdf.PDFObject
getPDFObjectID, getPDFObjectRefStr, getPDFObjectType, setPDFObjectID, setPDFObjectType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

protected Outlines parent
For subentries, this points to it's parent outline

Constructor Detail

Outlines

protected Outlines(PDF pdf)
Constructs a PDF Outline object. This method is used internally only

Parameters:
pdf - The PDF object

Outlines

public Outlines(PDF pdf,
                java.lang.String title,
                Page dest)
Constructs a PDF Outline object. When selected, the whole page is displayed

Parameters:
title - Title of the outline
dest - The destination page

Outlines

public Outlines(PDF pdf,
                java.lang.String title,
                Page dest,
                int x,
                int y,
                int w,
                int h)
Constructs a PDF Outline object. When selected, the specified region is displayed

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
Method Detail

add

public Outlines add(java.lang.String title,
                    Page dest)
This method creates an outline, and attaches it to this one.

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

add

public Outlines add(java.lang.String title,
                    Page dest,
                    int x,
                    int y,
                    int w,
                    int h)
This method creates an outline, and attaches it to this one

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:
Outlines object created, for creating sub-outlines

add

public void add(Outlines outline)
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.


getIndex

protected int getIndex(Outlines outline)
This method is called by children to find their position in this outlines tree

Parameters:
outline - The outlines to search for
Returns:
index within Vector

getLast

protected int getLast()
Method which returns the last index in this outline

Returns:
The last index in outline

getNode

protected Outlines getNode(int i)
Method which returns the outline at a specified position.

Parameters:
i - index
Returns:
the node at index i

elements

public java.util.Enumeration elements()
Method which returns all outlines directly below this one

Returns:
Enumeration of child elements

descendants

protected int descendants()
Method which returns the total number of descendants below this one

Returns:
the number of descendants below this one

ElegantJ PDF Library Java API Specification v1.1

For any feedback, suggestion, or query, please revert back to support@elegantjpdf.com

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjpdf.com
All Rights Reserved.