This a single bead in a thread in a PDF document.
Method from org.apache.pdfbox.pdmodel.interactive.pagenavigation.PDThreadBead Detail: |
public void appendBead(PDThreadBead append) {
PDThreadBead nextBead = getNextBead();
nextBead.setPreviousBead( append );
append.setNextBead( nextBead );
setNextBead( append );
append.setPreviousBead( this );
}
Append a bead after this bead. This will correctly set the next/previous beads in the
linked list. |
public COSBase getCOSObject() {
return bead;
}
Convert this standard java object to a COS object. |
public COSDictionary getDictionary() {
return bead;
}
This will get the underlying dictionary that this object wraps. |
public PDThreadBead getNextBead() {
return new PDThreadBead( (COSDictionary) bead.getDictionaryObject( "N" ) );
}
This will get the next bead. If this bead is the last bead in the list then this
will return the first bead. |
public PDPage getPage() {
PDPage page = null;
COSDictionary dic = (COSDictionary)bead.getDictionaryObject( "P" );
if( dic != null )
{
page = new PDPage( dic );
}
return page;
}
Get the page that this bead is part of. |
public PDThreadBead getPreviousBead() {
return new PDThreadBead( (COSDictionary) bead.getDictionaryObject( "V" ) );
}
This will get the previous bead. If this bead is the first bead in the list then this
will return the last bead. |
public PDRectangle getRectangle() {
PDRectangle rect = null;
COSArray array = (COSArray)bead.getDictionaryObject( COSName.R );
if( array != null )
{
rect = new PDRectangle( array );
}
return rect;
}
The rectangle on the page that this bead is part of. |
public PDThread getThread() {
PDThread retval = null;
COSDictionary dic = (COSDictionary)bead.getDictionaryObject( "T" );
if( dic != null )
{
retval = new PDThread( dic );
}
return retval;
}
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. |
protected void setNextBead(PDThreadBead next) {
bead.setItem( "N", next );
}
Set the next bead in the thread. |
public void setPage(PDPage page) {
bead.setItem( "P", 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. |
protected void setPreviousBead(PDThreadBead previous) {
bead.setItem( "V", previous );
}
Set the previous bead in the thread. |
public void setRectangle(PDRectangle rect) {
bead.setItem( COSName.R, rect );
}
Set the rectangle on the page that this bead covers. |
public void setThread(PDThread thread) {
bead.setItem( "T", 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. |