Package com.levigo.jadice.document
Class PageSegmentEvent
java.lang.Object
com.levigo.jadice.document.AbstractDocumentEvent
com.levigo.jadice.document.AbstractPageEvent
com.levigo.jadice.document.PageSegmentEvent
- Direct Known Subclasses:
AnnotationPageSegmentEvent,AnnotationPageSegmentEvent
An event of this type will indicate the addition, the removal or the modification of page
segments within a page.
- Since:
- 4.3
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe type is used to describe page segment (modify) events more in detail. -
Constructor Summary
ConstructorsConstructorDescriptionPageSegmentEvent(Document document, Page page, PageSegment segment, DocumentLayer layer) ConstructorPageSegmentEvent(Document document, Page page, PageSegment segment, DocumentLayer layer, PageSegmentEvent.Type type) ConstructorPageSegmentEvent(Document document, PageSegmentEvent event) Clones a page segment event but changing the associated document reference.PageSegmentEvent(Page page, PageSegment segment, DocumentLayer layer) Constructor -
Method Summary
Modifier and TypeMethodDescriptionReturns the damage region for this event.Returns a reference of the document container which holds the page and the event concerning page segment ornullif not available at the creation time of this event.getLayer()Returns the document layer in which the changed page segment resides if available otherwisenullReturns the changed page segmentgetType()Returns the type of this eventvoidsetDamage(Rectangle2D damage) Sets a damage area for this event.voidsetLayer(DocumentLayer layer) Sets the document layer in which the changed page segment resides.protected voidsetPageSegment(PageSegment pageSegment) Sets the changed page segmentvoidsetType(PageSegmentEvent.Type type) Methods inherited from class com.levigo.jadice.document.AbstractPageEvent
getPage, setPageMethods inherited from class com.levigo.jadice.document.AbstractDocumentEvent
setDocument
-
Constructor Details
-
PageSegmentEvent
ConstructorCreates a page segment event
- Parameters:
document- the concerned document if available, otherwisenullpage- which causes the the page segment changesegment- the concerned page segmentlayer- the document layer in which the page segment resides if available otherwisenull
-
PageSegmentEvent
public PageSegmentEvent(Document document, Page page, PageSegment segment, DocumentLayer layer, PageSegmentEvent.Type type) ConstructorCreates a page segment event
- Parameters:
document- the concerned document if available, otherwisenullpage- which causes the the page segment changesegment- the concerned page segmentlayer- the document layer in which the page segment resides if available otherwisenulltype- The type of this page segment event- See Also:
-
PageSegmentEvent
ConstructorCreates a page segment event
- Parameters:
page- which causes the the page segment changesegment- the concerned page segmentlayer- the document layer in which the page segment resides if available otherwisenull
-
PageSegmentEvent
Clones a page segment event but changing the associated document reference. For future use and for a correct propagation of page segment events for multi document pages.- Parameters:
document- the new document referenceevent- the event to be cloned
-
-
Method Details
-
getPageSegment
Returns the changed page segment- Returns:
- page segment
-
setPageSegment
Sets the changed page segment- Parameters:
pageSegment-
-
getLayer
Returns the document layer in which the changed page segment resides if available otherwisenull- Returns:
- the relevant document layer or
null
-
setLayer
Sets the document layer in which the changed page segment resides.- Parameters:
layer-
-
getDocument
Returns a reference of the document container which holds the page and the event concerning page segment ornullif not available at the creation time of this event.- Overrides:
getDocumentin classAbstractPageEvent- Returns:
- the document the document container or
nullif not known at the creation time of this event. - See Also:
-
setDamage
Sets a damage area for this event.Use this method if the origin of this event causes a dirty area, which means a damage region within the pagesegment area, which should be updated.
- Parameters:
damage- the a damage region within the pagesegment area to be updated. The damage should be given in document base units.- Throws:
NullPointerException- if damage isnull
-
getDamage
Returns the damage region for this event.- Returns:
- the damage in document base units.
- See Also:
-
getType
Returns the type of this event- Returns:
- the type
-
setType
- Parameters:
type- the type to set
-