public class Bookmark extends DefaultOutlineNode
This implementation of a bookmark will save some meta information like the current pan point, page rotation and layout to restore the view when navigating to a bookmark.
Constructor and Description |
---|
Bookmark(Document document,
Page page,
String description,
QuadrantRotation rotation,
float zoom,
Point2D pan,
PageView.Layout pageLayout)
Creates a new Bookmark.
|
Modifier and Type | Method and Description |
---|---|
Document |
getDocument()
Returns the
Document for this bookmark. |
Page |
getPage()
Returns the
Page for this bookmark. |
PageView.Layout |
getPageLayout()
Returns the
PageView.Layout for this bookmark. |
Point2D |
getPan()
Returns the pan point for this bookmark.
|
QuadrantRotation |
getRotation()
Returns the page rotation for this bookmark.
|
float |
getZoom()
Returns the zoom factor for this bookmark.
|
String |
toString() |
addPropertyChangeListener, ensureWriteLocked, getChildren, getDescription, getInstructionChain, getOutline, getParent, getProperties, removePropertyChangeListener, setDescription, setInstructionChain, setInstructionChain
public Bookmark(Document document, Page page, String description, QuadrantRotation rotation, float zoom, Point2D pan, PageView.Layout pageLayout)
BookmarkStore.createBookmark(Document, Page, String, com.levigo.jadice.swing.pageview.PageView)
.page
- the page for the bookmarkdescription
- the description of the bookmark to be recognized by the userrotation
- the current rotation value of the page when the bookmark was createdzoom
- the current zoom factor of the page when the bookmark was createdpan
- the current position of the page when the bookmark was createdpageLayout
- the page PageView.Layout
public String toString()
toString
in class DefaultOutlineNode
public Point2D getPan()
Internally, the pan point will be retrieved from an existing PanInstruction
. If there is
no such instruction, this method returns null.
PanInstruction
present in the instruction
chainpublic QuadrantRotation getRotation()
Internally, the rotation will be retrieved from an existing RotateInstruction
. If there
is no such instruction, this method returns null.
RotateInstruction
present in the instruction
chain.public float getZoom()
Internally, the zoom factor will be retrieved from an existing ZoomInstruction
. If there
is no such instruction, this method returns 0f.
ZoomInstruction
present in the instruction
chainpublic Page getPage()
Page
for this bookmark.
Internally, the Page
will be retrieved from an existing PageByWeakRefInstruction
or PageByIndexInstruction
. If there are no such instructions, this method returns null.
Page
or null, if there is no PageByWeakRefInstruction
or
PageByIndexInstruction
present in the instruction chainpublic Document getDocument()
Document
for this bookmark.
Internally, the Document
will be retrieved from an existing
DocumentByWeakRefInstruction
. If there is no such instruction, this method returns null.
Document
or null, if there is no DocumentByWeakRefInstruction
present
in the instruction chain.public PageView.Layout getPageLayout()
PageView.Layout
for this bookmark.
Internally, the PageView.Layout
will be retrieved from an existing
ChangePageLayoutInstruction
. If there is no such instruction, this method returns null.
PageView.Layout
or null, if there is no ChangePageLayoutInstruction
present in
the instruction chain.Copyright © 2024 levigo holding gmbh. All rights reserved.