org.foray.pdf.object
Class PDFOutlineItem

java.lang.Object
  extended by org.foray.pdf.object.PDFObject
      extended by org.foray.pdf.object.PDFOutlineParent
          extended by org.foray.pdf.object.PDFOutlineItem
All Implemented Interfaces:
org.axsl.pdf.PdfOutlineItem, org.axsl.pdf.PdfOutlineParent

public class PDFOutlineItem
extends PDFOutlineParent
implements org.axsl.pdf.PdfOutlineItem

An Outline Item Dictionary in PDF.


Field Summary
 
Fields inherited from class org.foray.pdf.object.PDFObject
EOL, MSG_EOL, XREF_EOL
 
Constructor Summary
PDFOutlineItem(PDFDocument doc, PDFOutlineParent parent, String title, PDFAction action, Color color, boolean italic, boolean bold)
          Constructor to access an action.
PDFOutlineItem(PDFDocument doc, PDFOutlineParent parent, String title, PDFDestination destination, Color color, boolean italic, boolean bold)
          Constructor to access a named destination.
PDFOutlineItem(PDFDocument doc, PDFOutlineParent parent, String title, String destinationString, Color color, boolean italic, boolean bold)
          Constructor to access a named destination.
 
Method Summary
protected  int count()
          Return the total number of descendants.
protected  long flags()
          Computes the flags (unsigned 32-bit integer), as described in PDF Reference, 3rd Edition, near Table 8.5.
protected  String toPDF()
          Generates the PDF text necessary to represent the object, returning it as a String.
 
Methods inherited from class org.foray.pdf.object.PDFOutlineParent
addChild, createPdfOutlineItem, getChildren, getFirst, getLast
 
Methods inherited from class org.foray.pdf.object.PDFObject
bufferToByteArray, byteArrayToStream, getCharsPerLine, getGeneration, getLogger, getNumber, getPDFDocument, output, pdfID, pdfReference, setNumber, stringToByteArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.axsl.pdf.PdfOutlineParent
createPdfOutlineItem
 

Constructor Detail

PDFOutlineItem

public PDFOutlineItem(PDFDocument doc,
                      PDFOutlineParent parent,
                      String title,
                      String destinationString,
                      Color color,
                      boolean italic,
                      boolean bold)
Constructor to access a named destination.

Parameters:
doc - The parent PDF document.
parent - The parent outline item.
title - The title or text of the outline item.
destinationString - The name of the named destination that should be accessed by this Outline Item.
color - The color of the outline item.
italic - Indicates whether the outline item should be displayed in an italic font.
bold - Indciates whether the outline item should be displayed in a bold font.

PDFOutlineItem

public PDFOutlineItem(PDFDocument doc,
                      PDFOutlineParent parent,
                      String title,
                      PDFDestination destination,
                      Color color,
                      boolean italic,
                      boolean bold)
Constructor to access a named destination.

Parameters:
doc - The parent PDF document.
parent - The parent outline item.
title - The title or text of the outline item.
destination - The PDFDestination instance that should be accessed by this Outline Item.
color - The color of the outline item.
italic - Indicates whether the outline item should be displayed in an italic font.
bold - Indciates whether the outline item should be displayed in a bold font.

PDFOutlineItem

public PDFOutlineItem(PDFDocument doc,
                      PDFOutlineParent parent,
                      String title,
                      PDFAction action,
                      Color color,
                      boolean italic,
                      boolean bold)
Constructor to access an action.

Parameters:
doc - The parent PDF document.
parent - The parent outline item.
title - The title or text of the outline item.
action - The PDFAction instance that should be accessed by this Outline Item.
color - The color of the outline item.
italic - Indicates whether the outline item should be displayed in an italic font.
bold - Indciates whether the outline item should be displayed in a bold font.
Method Detail

count

protected int count()
Description copied from class: PDFOutlineParent
Return the total number of descendants.

Specified by:
count in class PDFOutlineParent
Returns:
The total number of descendants.

flags

protected long flags()
Computes the flags (unsigned 32-bit integer), as described in PDF Reference, 3rd Edition, near Table 8.5.

Returns:
The flags integer.

toPDF

protected String toPDF()
Description copied from class: PDFObject
Generates the PDF text necessary to represent the object, returning it as a String.

Returns:
The PDF text necessary to represent the object.


Copyright © 2017. All rights reserved.