Package com.levigo.jadice.document
Interface Page
- All Superinterfaces:
PropertiesProvider
,Serializable
Represents a page of a
Document
.-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
A property name prefix used for bridged property changes from user properties. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(DocumentLayer layer, PageSegment pageSegment) Adds given page segment at givenDocumentLayer
.void
addPageListener
(PageListener listener) Register aPageListener
.getDocumentLayer
(PageSegment segment) Deprecated.Deprecated.long
Deprecated.getPageSegment
(DocumentLayer layer) Retrieve thePresentationElement
at a givenDocumentLayer
Return thePageSegment
s this page holds.Deprecated.getSize()
Get the raw size of the page in base units.void
remove
(DocumentLayer layer) Deprecated.void
removePageListener
(PageListener listener) Deregister aPageListener
.Methods inherited from interface com.levigo.jadice.document.util.PropertiesProvider
getProperties
-
Field Details
-
PROPERTY_PREFIX_USER_PROPERTY
A property name prefix used for bridged property changes from user properties.- See Also:
-
-
Method Details
-
getPageSegment
Retrieve thePresentationElement
at a givenDocumentLayer
- Parameters:
layer
- the layer for which to extract the page segment.- Returns:
- a
PresentationElement
ornull
if there is no page segment at the specified layer.
-
getDocumentLayer
Deprecated.Retrieve theDocumentLayer
for a givenAbstractPageSegment
- Parameters:
segment
- the page segment for which to extract the layer.- Returns:
- a
DocumentLayer
ornull
if there is no layer for the specified page segment.
-
add
Adds given page segment at givenDocumentLayer
. For implementations with a "live" map returned fromgetSegmentMap()
this is a convenience method forgetSegmentMap().put(DocumentLayer,PageSegment)
.- Parameters:
layer
- the layer at which to add the segment.pageSegment
- the page segment to add- Throws:
UnsupportedOperationException
- for read-only implementations of this interface
-
remove
Deprecated.Removes the page segment in the givenDocumentLayer
. For implementations with a "live" map returned fromgetSegmentMap()
this is a convenience method forgetSegmentMap().remove(DocumentLayer)
.- Parameters:
layer
- the layer at which to add the segment.- Throws:
UnsupportedOperationException
- for read-only implementations of this interface
-
getSize
Dimension2D getSize()Get the raw size of the page in base units.- Returns:
- Dimension the raw size
-
getModCount
Deprecated.Get the number of page modifications since its creation. A modification occurs when aPageSegment
isadded
to orremoved
from a Page.- Returns:
- number of page modifications
-
getLayers
Deprecated.Return theDocumentLayer
s for which this page has a page segment. This is a convenience method forgetSegmentMap().keySet()
.- Returns:
- the DocumentLayers in an unordered set.
-
getPageSegments
Collection<PageSegment> getPageSegments()Return thePageSegment
s this page holds. This is a convenience method forgetSegmentMap().values()
.- Returns:
- the PageSegments in an unordered set.
-
addPageListener
Register aPageListener
.- Parameters:
listener
- the listener to register
-
removePageListener
Deregister aPageListener
.- Parameters:
listener
- the listener to remove
-
getSegmentMap
Deprecated.Return the map ofDocumentLayer
s toPageSegment
s. Depending on the implementation of this interface, the returned map may be "live" or read-only.- Returns:
- the map of
DocumentLayer
s toPageSegment
s.
-