com.levigo.jadice.document
Interface Page

All Superinterfaces:
PropertiesProvider
All Known Implementing Classes:
AbstractPage, BasicPage

public interface Page
extends PropertiesProvider

Represents a page of a Document.


Field Summary
static String PROPERTY_PREFIX_USER_PROPERTY
          A property name prefix used for bridged property changes from user properties.
 
Method Summary
 void add(DocumentLayer layer, PageSegment pageSegment)
          Adds given page segment at given DocumentLayer.
 void addPageListener(PageListener listener)
          Register a PageListener.
 DocumentLayer getDocumentLayer(PageSegment segment)
          Retrieve the DocumentLayer for a given AbstractPageSegment
 Set<DocumentLayer> getLayers()
          Return the DocumentLayers for which this page has a page segment.
 long getModCount()
          Get the number of page modifications since its creation.
 PageSegment getPageSegment(DocumentLayer layer)
          Retrieve the ModelElement at a given DocumentLayer
 Collection<PageSegment> getPageSegments()
          Return the PageSegments this page holds.
 Map<DocumentLayer,PageSegment> getSegmentMap()
          Return the map of DocumentLayers to PageSegments.
 Dimension2D getSize()
          Get the raw size of the page in base units.
 void remove(DocumentLayer layer)
          Removes the page segment in the given DocumentLayer.
 void removePageListener(PageListener listener)
          Deregister a PageListener.
 
Methods inherited from interface com.levigo.jadice.document.util.PropertiesProvider
getProperties
 

Field Detail

PROPERTY_PREFIX_USER_PROPERTY

static final String PROPERTY_PREFIX_USER_PROPERTY
A property name prefix used for bridged property changes from user properties.

See Also:
Constant Field Values
Method Detail

getPageSegment

PageSegment getPageSegment(DocumentLayer layer)
Retrieve the ModelElement at a given DocumentLayer

Parameters:
layer - the layer for which to extract the page segment.
Returns:
a ModelElement or null if there is no page segment at the specified layer.

getDocumentLayer

DocumentLayer getDocumentLayer(PageSegment segment)
Retrieve the DocumentLayer for a given AbstractPageSegment

Parameters:
segment - the page segment for which to extract the layer.
Returns:
a DocumentLayer or null if there is no layer for the specified page segment.

add

void add(DocumentLayer layer,
         PageSegment pageSegment)
Adds given page segment at given DocumentLayer. For implementations with a "live" map returned from getSegmentMap() this is a convenience method for getSegmentMap().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

void remove(DocumentLayer layer)
Removes the page segment in the given DocumentLayer. For implementations with a "live" map returned from getSegmentMap() this is a convenience method for getSegmentMap().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

long getModCount()
Get the number of page modifications since its creation. A modification occurs when a PageSegment is added to or removed from a Page.

Returns:
number of page modifications

getLayers

Set<DocumentLayer> getLayers()
Return the DocumentLayers for which this page has a page segment. This is a convenience method for getSegmentMap().keySet().

Returns:
the DocumentLayers in an unordered set.

getPageSegments

Collection<PageSegment> getPageSegments()
Return the PageSegments this page holds. This is a convenience method for getSegmentMap().values().

Returns:
the PageSegments in an unordered set.

addPageListener

void addPageListener(PageListener listener)
Register a PageListener.

Parameters:
listener - the listener to register

removePageListener

void removePageListener(PageListener listener)
Deregister a PageListener.

Parameters:
listener - the listener to remove

getSegmentMap

Map<DocumentLayer,PageSegment> getSegmentMap()
Return the map of DocumentLayers to PageSegments. Depending on the implementation of this interface, the returned map may be "live" or read-only.

Returns:
the map of DocumentLayers to PageSegments.


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.