public class PDOutlineItem extends PDOutlineNode
node
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()
Return the next sibling or null if there is no next sibling.
|
PDOutlineNode |
getParent()
Get the parent of this object.
|
PDOutlineItem |
getPreviousSibling()
Return the previous sibling or null if there is no sibling.
|
PDStructureElement |
getStructureElement()
Get the structure element of this node.
|
PDColorState |
getTextColor()
Get the text color of this node.
|
String |
getTitle()
Get the title of this node.
|
void |
insertSiblingAfter(PDOutlineItem item)
Insert a sibling after 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.
|
protected void |
setNextSibling(PDOutlineNode outlineNode)
Set the next sibling, this will be maintained by this class.
|
protected void |
setPreviousSibling(PDOutlineNode outlineNode)
Set the previous sibling, this will be maintained by this class.
|
void |
setStructuredElement(PDStructureElement structureElement)
Set the structure element for this node.
|
void |
setTextColor(Color textColor)
Set the text color for this node.
|
void |
setTextColor(PDColorState textColor)
Set the text color for this node.
|
void |
setTitle(String title)
Set the title for this node.
|
appendChild, closeNode, getCOSDictionary, getCOSObject, getFirstChild, getLastChild, getOpenCount, isNodeOpen, openNode, setFirstChild, setLastChild, setOpenCount, setParent, updateParentOpenCount
public PDOutlineItem()
public PDOutlineItem(COSDictionary dic)
dic
- The storage dictionary.public void insertSiblingAfter(PDOutlineItem item)
item
- The item to insert.public PDOutlineNode getParent()
getParent
in class PDOutlineNode
public PDOutlineItem getPreviousSibling()
protected void setPreviousSibling(PDOutlineNode outlineNode)
outlineNode
- The new previous sibling.public PDOutlineItem getNextSibling()
protected void setNextSibling(PDOutlineNode outlineNode)
outlineNode
- The new next sibling.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 setStructuredElement(PDStructureElement structureElement)
structureElement
- The new structure element for this node.public PDColorState getTextColor()
public void setTextColor(PDColorState 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-2016 The Apache Software Foundation. All Rights Reserved.