Class PdfLayerMembership
java.lang.Object
com.aowagie.text.pdf.PdfObject
com.aowagie.text.pdf.PdfDictionary
com.aowagie.text.pdf.PdfLayerMembership
- All Implemented Interfaces:
PdfOCG
Content typically belongs to a single optional content group,
and is visible when the group is ON and invisible when it is OFF. To express more
complex visibility policies, content should not declare itself to belong to an optional
content group directly, but rather to an optional content membership dictionary
represented by this class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HashSetprivate final PdfArrayprivate final PdfIndirectReferenceFields inherited from class PdfDictionary
CATALOG, hashMap, OUTLINES, PAGEFields inherited from class PdfObject
ARRAY, BOOLEAN, bytes, DICTIONARY, INDIRECT, NAME, NOTHING, NULL, NUMBER, STREAM, STRING, TEXT_PDFDOCENCODING, TEXT_UNICODE, type -
Constructor Summary
ConstructorsConstructorDescriptionPdfLayerMembership(PdfWriter writer) Creates a new, empty, membership layer. -
Method Summary
Modifier and TypeMethodDescriptionGets the member layers.Gets the dictionary representing the membership layer.getRef()Gets thePdfIndirectReferencethat represents this membership layer.voidsetVisibilityPolicy(PdfName type) Sets the visibility policy for content belonging to this membership dictionary.Methods inherited from class PdfDictionary
contains, get, getAsArray, getAsBoolean, getAsDict, getAsIndirectObject, getAsName, getAsNumber, getAsString, getDirectObject, getKeys, isCatalog, isFont, isOutlineTree, isPage, isPages, merge, mergeDifferent, put, putAll, remove, size, toPdf, toStringMethods inherited from class PdfObject
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, setContent, setIndRef, type
-
Field Details
-
ref
-
members
-
layers
-
-
Constructor Details
-
PdfLayerMembership
Creates a new, empty, membership layer.- Parameters:
writer- the writer
-
-
Method Details
-
getRef
Gets thePdfIndirectReferencethat represents this membership layer. -
getLayers
-
setVisibilityPolicy
Sets the visibility policy for content belonging to this membership dictionary. Possible values are ALLON, ANYON, ANYOFF and ALLOFF. The default value is ANYON.- Parameters:
type- the visibility policy
-
getPdfObject
Gets the dictionary representing the membership layer. It just returnsthis.- Specified by:
getPdfObjectin interfacePdfOCG- Returns:
- the dictionary representing the layer
-