com.levigo.jadice.document.creator
Class AbstractCompositePageSegment

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

public abstract class AbstractCompositePageSegment
extends AbstractMutablePageSegment


Nested Class Summary
protected  class AbstractCompositePageSegment.TransformedElement
           
 
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
AbstractCompositePageSegment()
           
 
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()
           
protected  void fireModified()
          Fire a notification about a general change to the page segment.
 Metadata getMetadata()
          Return the exposed meta-data or null if no meta-data is available.
protected  List<AbstractCompositePageSegment.TransformedElement> getSegments()
          Warning: Just for internal use.
 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.AbstractMutablePageSegment
addPageSegmentListener, createPageSegmentEvent, fireModified, fireModified, removePageSegmentListener
 
Methods inherited from class com.levigo.jadice.document.AbstractPageSegment
createRendering, getBounds, getCachedRendering, getId, getPermissions, getProperties, getResolution, getSize, getSource, isInitialized, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.levigo.jadice.document.PageSegment
getBounds, getSize, getSource
 
Methods inherited from interface com.levigo.jadice.document.util.PropertiesProvider
getProperties
 
Methods inherited from interface com.levigo.jadice.document.PermissionsProvider
getPermissions
 
Methods inherited from interface com.levigo.util.base.Identifiable
getId
 
Methods inherited from interface com.levigo.jadice.document.internal.model.RenderRoot
createRendering, getBounds, isInitialized
 

Constructor Detail

AbstractCompositePageSegment

public AbstractCompositePageSegment()
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

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.
Throws:
IllegalArgumentException - if segment or tx is null.

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 -

fireModified

protected void fireModified()
Description copied from class: AbstractMutablePageSegment
Fire a notification about a general change to the page segment. Please consider firing a more specialized one, indicating the actual damage region.

Overrides:
fireModified in class AbstractMutablePageSegment

getSegments

protected List<AbstractCompositePageSegment.TransformedElement> getSegments()
Warning: Just for internal use. As the returned segments represent the actual segments, changes may lead to inconsistencies.

Returns:


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.