org.apache.fop.area
Class BookmarkData
- OffDocumentItem, Resolvable
public class BookmarkData
An instance of this class is either a PDF bookmark-tree and
its child bookmark-items, or a bookmark-item and the child
child bookmark-items under it.
BookmarkData
public BookmarkData()
Create a new bookmark data root object.
This constructor is called by the AreaTreeParser when the
element is read from the XML file
BookmarkData
public BookmarkData(String title,
boolean showChildren,
PageViewport pv,
String idRef)
Create a new bookmark data object.
This constructor is called by the AreaTreeParser when a
element is read from the XML file.
title
- the bookmark's titleshowChildren
- whether to initially display the bookmark's childrenpv
- the target PageViewportidRef
- the target ID
BookmarkData
public BookmarkData(Bookmark bookmark)
Create a new pdf bookmark data object.
This is used by the bookmark-items to create a data object
with a idref. During processing, this idref will be
subsequently resolved to a particular PageViewport.
bookmark
- the fo:bookmark object
BookmarkData
public BookmarkData(BookmarkTree bookmarkTree)
Create a new bookmark data object.
This should only be called by the bookmark-tree item because
it has no idref item that needs to be resolved.
bookmarkTree
- fo:bookmark-tree for this document
addSubData
public void addSubData(BookmarkData sub)
Add a child bookmark data object.
This adds a child bookmark in the bookmark hierarchy.
sub
- the child bookmark data
getBookmarkTitle
public String getBookmarkTitle()
Get the title for this bookmark object.
getCount
public int getCount()
Get the size of child data objects.
- the number of child bookmark data
getIDRef
public String getIDRef()
Get the idref for this bookmark-item
- the idref for the bookmark-item
getPageViewport
public PageViewport getPageViewport()
Get the PageViewport object that this bookmark refers to
- the PageViewport that this bookmark points to
getSubData
public BookmarkData getSubData(int count)
Get the child data object.
isResolved
public boolean isResolved()
Check if this resolvable object has been resolved.
A BookmarkData object is considered resolved once the idrefs for it
and for all of its child bookmark-items have been resolved.
- isResolved in interface Resolvable
- true if this object has been resolved
resolveIDRef
public void resolveIDRef(String id,
List pages)
Resolve this resolvable object.
This resolves the idref of this object and if possible also
resolves id references of child elements that have the same
id reference.
List)
- resolveIDRef in interface Resolvable
- check to make sure it works if multiple bookmark-items
have the same idref
showChildItems
public boolean showChildItems()
Indicator of whether to initially display child bookmarks.
- true to initially display child bookmarks, false otherwise
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.