org.pdfbox.pdmodel.interactive.pagenavigation
Class PDThreadBead
java.lang.Object
org.pdfbox.pdmodel.interactive.pagenavigation.PDThreadBead
- COSObjectable
public class PDThreadBead
extends java.lang.Object
This a single bead in a thread in a PDF document.
PDThreadBead
public PDThreadBead()
Default constructor.
PDThreadBead
public PDThreadBead(COSDictionary b)
Constructor that is used for a preexisting dictionary.
b
- The underlying dictionary.
appendBead
public void appendBead(PDThreadBead append)
Append a bead after this bead. This will correctly set the next/previous beads in the
linked list.
append
- The bead to insert.
getCOSObject
public COSBase getCOSObject()
Convert this standard java object to a COS object.
- getCOSObject in interface COSObjectable
- The cos object that matches this Java object.
getDictionary
public COSDictionary getDictionary()
This will get the underlying dictionary that this object wraps.
- The underlying info dictionary.
getNextBead
public PDThreadBead getNextBead()
This will get the next bead. If this bead is the last bead in the list then this
will return the first bead.
- The next bead in the list or the first bead if this is the last bead.
getPage
public PDPage getPage()
Get the page that this bead is part of.
- The page that this bead is part of.
getPreviousBead
public PDThreadBead getPreviousBead()
This will get the previous bead. If this bead is the first bead in the list then this
will return the last bead.
- The previous bead in the list or the last bead if this is the first bead.
getRectangle
public PDRectangle getRectangle()
The rectangle on the page that this bead is part of.
- The part of the page that this bead covers.
getThread
public PDThread getThread()
This will get the thread that this bead is part of. This is only required
for the first bead in a thread, so other beads 'may' return null.
- The thread that this bead is part of.
setNextBead
protected void setNextBead(PDThreadBead next)
Set the next bead in the thread.
setPage
public void setPage(PDPage page)
Set the page that this bead is part of. This is a required property and must be
set when creating a new bead. The PDPage object also has a list of beads in the natural
reading order. It is recommended that you add this object to that list as well.
page
- The page that this bead is on.
setPreviousBead
protected void setPreviousBead(PDThreadBead previous)
Set the previous bead in the thread.
previous
- The previous bead.
setRectangle
public void setRectangle(PDRectangle rect)
Set the rectangle on the page that this bead covers.
rect
- The portion of the page that this bead covers.
setThread
public void setThread(PDThread thread)
Set the thread that this bead is part of. This is only required for the
first bead in a thread. Note: This property is set for you by the PDThread.setFirstBead() method.
thread
- The thread that this bead is part of.