|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.jadice.document.AbstractDocumentEvent com.levigo.jadice.document.AbstractPageEvent com.levigo.jadice.document.PageSegmentEvent
public class PageSegmentEvent
An event of this type will indicate the addition, the removal or the modification of page segments within a page.
Page
,
AbstractPageSegment
Nested Class Summary | |
---|---|
static class |
PageSegmentEvent.Type
The type is used to describe page segment (modify) events more in detail. |
Constructor Summary | |
---|---|
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 |
Method Summary | |
---|---|
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)
|
Methods inherited from class com.levigo.jadice.document.AbstractPageEvent |
---|
getPage, setPage |
Methods inherited from class com.levigo.jadice.document.AbstractDocumentEvent |
---|
setDocument |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 clonedMethod Detail |
---|
public PageSegment getPageSegment()
protected void setPageSegment(PageSegment pageSegment)
pageSegment
- public DocumentLayer getLayer()
null
null
public void setLayer(DocumentLayer layer)
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()
clone
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |