org.foray.pdf.object
Class PDFOutlineParent

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

public abstract class PDFOutlineParent
extends PDFObject
implements org.axsl.pdf.PdfOutlineParent

Abstract superclass for PDFObjects that can be parents of a PDFOutlineItem object. This includes the classes PDFOutline and PDFOutlineItem.


Field Summary
 
Fields inherited from class org.foray.pdf.object.PDFObject
EOL, MSG_EOL, XREF_EOL
 
Constructor Summary
PDFOutlineParent(PDFDocument doc)
          Constructor.
 
Method Summary
 void addChild(PDFOutlineItem child)
          Add a child to this parent.
protected abstract  int count()
          Return the total number of descendants.
 PDFOutlineItem createPdfOutlineItem(String titleText, String internalDestination, Color color, boolean italic, boolean bold)
           
 List<PDFOutlineItem> getChildren()
          Return the children of this parent.
protected  PDFOutlineItem getFirst()
          Return the first child of this parent.
protected  PDFOutlineItem getLast()
          Return the last child of this parent.
 
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
 

Constructor Detail

PDFOutlineParent

public PDFOutlineParent(PDFDocument doc)
Constructor.

Parameters:
doc - The parent PDF document.
Method Detail

addChild

public void addChild(PDFOutlineItem child)
Add a child to this parent.

Parameters:
child - The child to be added.

getChildren

public List<PDFOutlineItem> getChildren()
Return the children of this parent.

Returns:
The children of this parent.

getFirst

protected PDFOutlineItem getFirst()
Return the first child of this parent.

Returns:
The first child of this parent.

getLast

protected PDFOutlineItem getLast()
Return the last child of this parent.

Returns:
The last child of this parent.

count

protected abstract int count()
Return the total number of descendants.

Returns:
The total number of descendants.

createPdfOutlineItem

public PDFOutlineItem createPdfOutlineItem(String titleText,
                                           String internalDestination,
                                           Color color,
                                           boolean italic,
                                           boolean bold)
Specified by:
createPdfOutlineItem in interface org.axsl.pdf.PdfOutlineParent


Copyright © 2017. All rights reserved.