public class PdfLayerMembership extends PdfObjectWrapper<PdfDictionary> implements IPdfOCG
PdfObjectWrapper
the PdfObject
must be indirect.
Constructor and Description |
---|
PdfLayerMembership(PdfDictionary membershipDictionary)
Creates a new PdfLayerMembership instance by its PdfDictionary, which must be an indirect object.
|
PdfLayerMembership(PdfDocument doc)
Creates a new, empty membership layer.
|
Modifier and Type | Method and Description |
---|---|
void |
addLayer(PdfLayer layer)
Adds a new layer to the current layer membership.
|
protected PdfDocument |
getDocument()
Gets the PdfDocument that owns that layer membership.
|
PdfIndirectReference |
getIndirectReference()
Gets the PdfIndirectReference that represents this layer.
|
Collection<PdfLayer> |
getLayers()
Gets the collection of the layers this layer membership operates with.
|
PdfVisibilityExpression |
getVisibilityExpression()
Gets the visibility expression for content belonging to this optional content membership dictionary.
|
PdfName |
getVisibilityPolicy()
Gets the visibility policy for content belonging to this optional content membership dictionary.
|
protected boolean |
isWrappedObjectMustBeIndirect()
Defines if the object behind this wrapper must be an indirect object in the resultant document.
|
void |
setVisibilityExpression(PdfVisibilityExpression visibilityExpression)
Sets the visibility expression for content belonging to this membership dictionary.
|
void |
setVisibilityPolicy(PdfName visibilityPolicy)
Sets the visibility policy for content belonging to this membership dictionary.
|
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, flush, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPdfObject
public PdfLayerMembership(PdfDocument doc)
doc
- a PdfDocument
where a new empty membership layer creates
public PdfLayerMembership(PdfDictionary membershipDictionary)
membershipDictionary
- the membership dictionary, must have an indirect reference.
public Collection<PdfLayer> getLayers()
layers
this layer membership operates with
public void addLayer(PdfLayer layer)
layer
- the layer to be added
public void setVisibilityPolicy(PdfName visibilityPolicy)
visibilityPolicy
- the visibility policy
public PdfName getVisibilityPolicy()
public void setVisibilityExpression(PdfVisibilityExpression visibilityExpression)
visibilityExpression
- A (nested) array of which the first value is /And, /Or, or /Not followed by a series of indirect references to OCGs or other visibility expressions.
public PdfVisibilityExpression getVisibilityExpression()
public PdfIndirectReference getIndirectReference()
IPdfOCG
PdfIndirectReference
that represents this layer.
getIndirectReference
in interface IPdfOCG
PdfIndirectReference
that represents this layer
protected boolean isWrappedObjectMustBeIndirect()
PdfObjectWrapper
isWrappedObjectMustBeIndirect
in class PdfObjectWrapper<PdfDictionary>
protected PdfDocument getDocument()
PdfDocument
that owns that layer membership.
PdfDocument
that owns that layer membership
Copyright © 1998–2021 iText Group NV. All rights reserved.