com.levigo.jadice.document.creator
Class CompositePageSegment

java.lang.Object
  extended by com.levigo.jadice.document.AbstractPageSegment
      extended by com.levigo.jadice.document.creator.CompositePageSegment
All Implemented Interfaces:
com.levigo.jadice.document.internal.model.RenderRoot, MetadataProvider, PageSegment, PermissionsProvider<PageSegment>, PropertiesProvider, Identifiable

public class CompositePageSegment
extends AbstractPageSegment


Nested Class Summary
 
Nested classes/interfaces inherited from class com.levigo.jadice.document.AbstractPageSegment
AbstractPageSegment.CacheableRendering
 
Field Summary
 
Fields inherited from class com.levigo.jadice.document.AbstractPageSegment
CACHE_KEY_CONTENTS, format, id
 
Constructor Summary
CompositePageSegment(Rectangle2D bounds)
           
 
Method Summary
 void addPageSegment(PageSegment segment, AffineTransform tx)
          Place the given PageSegment into the composition using the given transform.
 void addPageSegment(PageSegment segment, AffineTransform tx, Shape clipPath)
          Place the given PageSegment into the composition using the given transform.
protected  AbstractPageSegment.CacheableRendering doCreateCacheableRendering()
           
 Rectangle2D getBounds()
          Returns the raw size and position of the PageSegment in base units.
 Metadata getMetadata()
          Return the exposed meta-data or null if no meta-data is available.
 Dimension2D getSize()
          Returns the raw size/dimensions of the PageSegment in base units.
 boolean isAuxiliary()
          Return whether this PageSegment is in some way "auxiliary".
 boolean isOpaqe()
          Set whether this page segment is opaque (all white) regardless of whether the whole bounds are taken up by component segments or not.
 void setOpaqe(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.
 void setSource(PageSegmentSource source)
           
 
Methods inherited from class com.levigo.jadice.document.AbstractPageSegment
createPageSegmentEvent, createRendering, fireModified, fireModified, fireModified, getCachedRendering, getId, getPage, getPermissions, getProperties, getResolution, getSource, isInitialized, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompositePageSegment

public CompositePageSegment(Rectangle2D bounds)
Method Detail

getMetadata

public Metadata getMetadata()
Description copied from interface: MetadataProvider
Return the exposed meta-data or null if no meta-data is available. An object being a MetadataProvider is not required to provide a non-null meta-data.

Specified by:
getMetadata in interface MetadataProvider
Overrides:
getMetadata in class AbstractPageSegment
Returns:
the metadata document or null

getBounds

public Rectangle2D getBounds()
Description copied from interface: PageSegment
Returns the raw size and position of the PageSegment in base units. Position is measured in relation to the Page's coordinate system's origin point (0,0).

Specified by:
getBounds in interface com.levigo.jadice.document.internal.model.RenderRoot
Specified by:
getBounds in interface PageSegment
Overrides:
getBounds in class AbstractPageSegment
Returns:
the raw size and position

getSize

public Dimension2D getSize()
Description copied from interface: PageSegment
Returns the raw size/dimensions of the PageSegment in base units.

Specified by:
getSize in interface PageSegment
Overrides:
getSize in class AbstractPageSegment
Returns:
the PageSegment's raw size

setSource

public void setSource(PageSegmentSource source)
Overrides:
setSource in class AbstractPageSegment

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.

doCreateCacheableRendering

protected AbstractPageSegment.CacheableRendering doCreateCacheableRendering()
                                                                     throws JadiceException
Overrides:
doCreateCacheableRendering in class AbstractPageSegment
Throws:
JadiceException

isOpaqe

public boolean isOpaqe()
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

setOpaqe

public void setOpaqe(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.

Parameters:
clearBackground -


Copyright © 2017 levigo holding gmbh. All rights reserved.