Class AbstractCompositePageSegment

    • Constructor Detail

      • AbstractCompositePageSegment

        public AbstractCompositePageSegment()
    • Method Detail

      • isAuxiliary

        public boolean isAuxiliary()
        Description copied from interface: PageSegment
        Return whether this PageSegment is in some way "auxiliary". Auxiliary page segments contain additions to the main page segment, but rarely represent the main page content in their own right. Currently most page segments are non-auxiliary except for the AnnotationPageSegment.
        Specified by:
        isAuxiliary in interface PageSegment
        Overrides:
        isAuxiliary in class AbstractPageSegment
        Returns:
        true if this page segment is auxiliary, false if it represents "main" page content.
      • addPageSegment

        public void addPageSegment​(PageSegment segment,
                                   AffineTransform tx)
        Place the given PageSegment into the composition using the given transform.
        Parameters:
        segment - the page segment to be placed
        tx - the affine transform to be used
      • addPageSegment

        public void addPageSegment​(PageSegment segment,
                                   AffineTransform tx,
                                   Shape clipPath)
        Place the given PageSegment into the composition using the given transform. Apply the given clip path to the placed page segments to cut away undesired parts. The clip path is interpreted in the coordinate system of the placed page segment, i.e. before the transform is applied.
        Parameters:
        segment - the page segment to be placed
        tx - the affine transform to be used
        clipPath - the clip path to be applied or null if no clipping shall be applied.
        Throws:
        IllegalArgumentException - if segment or tx is null.
      • setCurrentPage

        public void setCurrentPage​(Page page)
        Description copied from interface: com.levigo.jadice.document.internal.PageAwarePageSegment
        Set the context page for this page segment. Typically, only the first call to this method is used by implementations. When page segments are added to further pages, this call may therefore be ignored.
        Specified by:
        setCurrentPage in interface com.levigo.jadice.document.internal.PageAwarePageSegment
      • isOpaque

        public boolean isOpaque()
        Set whether this page segment is opaque (all white) regardless of whether the whole bounds are taken up by component segments or not.
        Returns:
        whether this page segment is opaque
      • setOpaque

        public void setOpaque​(boolean clearBackground)
        Set whether this page segment is opaque (all white) regardless of whether the whole bounds are taken up by component segments or not.
      • getResolution

        public Resolution getResolution()
        Returns the base resolution (7200dpi), independent of the resolutions any of the PageSegments added to this instance may have.
        Specified by:
        getResolution in class AbstractPageSegment
        Returns:
        always the base resolution