public class PageSegmentEvent extends AbstractPageEvent implements Cloneable
Page
,
AbstractPageSegment
Modifier and Type | Class and Description |
---|---|
static class |
PageSegmentEvent.Type
The type is used to describe page segment (modify) events more in detail.
|
Constructor and Description |
---|
PageSegmentEvent(Document document,
Page page,
PageSegment segment,
DocumentLayer layer)
Constructor
|
PageSegmentEvent(Document document,
Page page,
PageSegment segment,
DocumentLayer layer,
PageSegmentEvent.Type type)
Constructor
|
PageSegmentEvent(Document document,
PageSegmentEvent event)
Clones a page segment event but changing the associated document reference.
|
PageSegmentEvent(Page page,
PageSegment segment,
DocumentLayer layer)
Constructor
|
Modifier and Type | Method and Description |
---|---|
PageSegmentEvent |
clone() |
Rectangle2D |
getDamage()
Returns the damage region for this event.
|
Document |
getDocument()
Returns a reference of the document container which holds the page and the event concerning
page segment or
null if not available at the creation time of this event. |
DocumentLayer |
getLayer()
Returns the document layer in which the changed page segment resides if available otherwise
null |
PageSegment |
getPageSegment()
Returns the changed page segment
|
PageSegmentEvent.Type |
getType()
Returns the type of this event
|
void |
setDamage(Rectangle2D damage)
Sets a damage area for this event.
|
void |
setLayer(DocumentLayer layer)
Sets the document layer in which the changed page segment resides.
|
protected void |
setPageSegment(PageSegment pageSegment)
Sets the changed page segment
|
void |
setType(PageSegmentEvent.Type type) |
getPage, setPage
setDocument
public PageSegmentEvent(Document document, Page page, PageSegment segment, DocumentLayer layer)
Creates a page segment event
document
- the concerned document if available, otherwise null
page
- which causes the the page segment changesegment
- the concerned page segmentlayer
- the document layer in which the page segment resides if available otherwise
null
public PageSegmentEvent(Document document, Page page, PageSegment segment, DocumentLayer layer, PageSegmentEvent.Type type)
Creates a page segment event
document
- the concerned document if available, otherwise null
page
- which causes the the page segment changesegment
- the concerned page segmentlayer
- the document layer in which the page segment resides if available otherwise
null
type
- The type of this page segment eventPageSegmentEvent.Type.CONTENT
,
PageSegmentEvent.Type.SIZE
public PageSegmentEvent(Page page, PageSegment segment, DocumentLayer layer)
Creates a page segment event
page
- which causes the the page segment changesegment
- the concerned page segmentlayer
- the document layer in which the page segment resides if available otherwise
null
public PageSegmentEvent(Document document, PageSegmentEvent event)
document
- the new document referenceevent
- the event to be clonedpublic PageSegment getPageSegment()
protected void setPageSegment(PageSegment pageSegment)
public DocumentLayer getLayer()
null
null
public void setLayer(DocumentLayer layer)
public Document getDocument()
null
if not available at the creation time of this event.getDocument
in class AbstractPageEvent
null
if not known at the creation
time of this event.AbstractDocumentEvent.getDocument()
public void setDamage(Rectangle2D damage)
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.
damage
- the a damage region within the pagesegment area to be updated. The damage should
be given in document base units.NullPointerException
- if damage is null
public Rectangle2D getDamage()
setDamage(Rectangle2D)
public PageSegmentEvent.Type getType()
public void setType(PageSegmentEvent.Type type)
type
- the type to setpublic PageSegmentEvent clone()
Copyright © 2024 levigo holding gmbh. All rights reserved.