public final class PDOutlineItem extends PDOutlineNode
Constructor and Description |
---|
PDOutlineItem()
Default Constructor.
|
PDOutlineItem(COSDictionary dic)
Constructor for an existing outline item.
|
Modifier and Type | Method and Description |
---|---|
PDPage |
findDestinationPage(PDDocument doc)
This method will attempt to find the page in this PDF document that this outline points to.
|
PDAction |
getAction()
Get the action of this node.
|
PDDestination |
getDestination()
Get the page destination of this node.
|
PDOutlineItem |
getNextSibling() |
PDOutlineItem |
getPreviousSibling()
Return the previous sibling or null if there is no sibling.
|
PDStructureElement |
getStructureElement()
Get the structure element of this node.
|
PDColor |
getTextColor()
Get the RGB text color of this node.
|
String |
getTitle()
Get the title of this node.
|
void |
insertSiblingAfter(PDOutlineItem newSibling)
Insert a single sibling after this node.
|
void |
insertSiblingBefore(PDOutlineItem newSibling)
Insert a single sibling before this node.
|
boolean |
isBold()
A flag telling if the text should be bold.
|
boolean |
isItalic()
A flag telling if the text should be italic.
|
void |
setAction(PDAction action)
Set the action for this node.
|
void |
setBold(boolean bold)
Set the bold property of the text.
|
void |
setDestination(PDDestination dest)
Set the page destination for this node.
|
void |
setDestination(PDPage page)
A convenience method that will create an XYZ destination using only the defaults.
|
void |
setItalic(boolean italic)
Set the italic property of the text.
|
void |
setStructureElement(PDStructureElement structureElement)
Set the structure element for this node.
|
void |
setTextColor(Color textColor)
Set the RGB text color for this node.
|
void |
setTextColor(PDColor textColor)
Set the RGB text color for this node.
|
void |
setTitle(String title)
Set the title for this node.
|
addFirst, addLast, children, closeNode, getFirstChild, getLastChild, getOpenCount, hasChildren, isNodeOpen, openNode
equals, getCOSObject, hashCode
public PDOutlineItem()
public PDOutlineItem(COSDictionary dic)
dic
- The storage dictionary.public void insertSiblingAfter(PDOutlineItem newSibling)
newSibling
- The item to insert.IllegalArgumentException
- if the given sibling node is part of a list
(i.e. if it has a previous or a next sibling)public void insertSiblingBefore(PDOutlineItem newSibling)
newSibling
- The item to insert.IllegalArgumentException
- if the given sibling node is part of a list
(i.e. if it has a previous or a next sibling)public PDOutlineItem getPreviousSibling()
public PDOutlineItem getNextSibling()
public String getTitle()
public void setTitle(String title)
title
- The new title for this node.public PDDestination getDestination() throws IOException
IOException
- If there is an error creating the destination.public void setDestination(PDDestination dest)
dest
- The new page destination for this node.public void setDestination(PDPage page)
page
- The page to refer to.public PDPage findDestinationPage(PDDocument doc) throws IOException
doc
- The document to get the page from.IOException
- If there is an error when trying to find the page.public PDAction getAction()
public void setAction(PDAction action)
action
- The new action for this node.public PDStructureElement getStructureElement()
public void setStructureElement(PDStructureElement structureElement)
structureElement
- The new structure element for this node.public PDColor getTextColor()
public void setTextColor(PDColor textColor)
textColor
- The text color for this node.public void setTextColor(Color textColor)
textColor
- The text color for this node.public boolean isItalic()
public void setItalic(boolean italic)
italic
- The new italic flag.public boolean isBold()
public void setBold(boolean bold)
bold
- The new bold flag.Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.