Class PageSegmentEvent

    • Constructor Detail

      • PageSegmentEvent

        public PageSegmentEvent​(Document document,
                                Page page,
                                PageSegment segment,
                                DocumentLayer layer)
        Constructor

        Creates a page segment event

        Parameters:
        document - the concerned document if available, otherwise null
        page - which causes the the page segment change
        segment - the concerned page segment
        layer - the document layer in which the page segment resides if available otherwise null
      • PageSegmentEvent

        public PageSegmentEvent​(Page page,
                                PageSegment segment,
                                DocumentLayer layer)
        Constructor

        Creates a page segment event

        Parameters:
        page - which causes the the page segment change
        segment - the concerned page segment
        layer - the document layer in which the page segment resides if available otherwise null
      • PageSegmentEvent

        public PageSegmentEvent​(Document document,
                                PageSegmentEvent event)
        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 reference
        event - the event to be cloned
    • Method Detail

      • getPageSegment

        public PageSegment getPageSegment()
        Returns the changed page segment
        Returns:
        page segment
      • setPageSegment

        protected void setPageSegment​(PageSegment pageSegment)
        Sets the changed page segment
      • getLayer

        public DocumentLayer getLayer()
        Returns the document layer in which the changed page segment resides if available otherwise null
        Returns:
        the relevant document layer or null
      • setLayer

        public void setLayer​(DocumentLayer layer)
        Sets the document layer in which the changed page segment resides.
      • getDocument

        public 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.
        Overrides:
        getDocument in class AbstractPageEvent
        Returns:
        the document the document container or null if not known at the creation time of this event.
        See Also:
        AbstractDocumentEvent.getDocument()
      • setDamage

        public void setDamage​(Rectangle2D damage)
        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 is null