Class SerializableBookmark
Bookmark
intended to be used on the server side.
When sending the wrapper message from client to server, all client side bookmarks are serialized as instances of
this class and added to a SerializableBookmarkList
. Use it in your server operation
implementation to e.g. persist bookmarks in a third party system.
Use it in your DocumentDataProvider
to attach a persisted bookmark while loading a
document. The bookmark will be added automatically on the client side.
For further details and code examples take a look at https://webtoolkit.jadice.com/showcase.
It differs from the client side Bookmark
by replacing the Page
with a page index
and by omitting the Document
completely. This is necessary as the document and pages are
available on the server only after loading the document. The bookmarks have to be attached before
loading the document in order to send them to the client via document property.
-
Constructor Summary
ConstructorsConstructorDescriptionfor GWT onlySerializableBookmark
(Integer pageIndex) Constructs a serializable bookmark that belongs to a specific page.SerializableBookmark
(Integer pageIndex, Point2D panPoint, Float zoomfactor, BaseRenderSettings.Rotation rotation) Constructs a serializable bookmark that belongs to a specific page and that stores optional render parameters. -
Method Summary
Modifier and TypeMethodDescriptionReturns the page index of the page the correspondingBookmark
belongs toReturns the pan point that was stored when creating the correspondingBookmark
on the client sideReturns the rotation that was stored when creating the correspondingBookmark
on the client sideReturns the zoomfactor that was stored when creating the correspondingBookmark
on the client sidevoid
setPageIndex
(Integer pageIndex) Sets the page indexvoid
setPanPoint
(Point2D panPoint) Sets the pan pointvoid
setRotation
(BaseRenderSettings.Rotation rotation) Sets the rotationvoid
setZoomfactor
(Float zoomfactor) Sets the zoomfactor
-
Constructor Details
-
SerializableBookmark
public SerializableBookmark()for GWT only -
SerializableBookmark
Constructs a serializable bookmark that belongs to a specific page.May only be called on the server side in
DocumentDataProvider
s.- Parameters:
pageIndex
- the index of the page the bookmark shall be placed on.
-
-
Method Details
-
getZoomfactor
Returns the zoomfactor that was stored when creating the correspondingBookmark
on the client side- Returns:
- the zoomfactor of the corresponding
Bookmark
or null if none was set
-
setZoomfactor
Sets the zoomfactor- Parameters:
zoomfactor
- the zoomfactor
-
getRotation
Returns the rotation that was stored when creating the correspondingBookmark
on the client side- Returns:
- the rotation of the corresponding
Bookmark
or null if none was set
-
getPanPoint
Returns the pan point that was stored when creating the correspondingBookmark
on the client side- Returns:
- the pan point
-
setPanPoint
Sets the pan point- Parameters:
panPoint
- the pan point
-
getPageIndex
Returns the page index of the page the correspondingBookmark
belongs to- Returns:
- the page index of the corresponding
Bookmark
-
setPageIndex
Sets the page index- Parameters:
pageIndex
- the page index
-