public class PdfLayerMembership extends PdfDictionary implements PdfOCG
Modifier and Type | Field and Description |
---|---|
static PdfName |
ALLOFF
Visible only if all of the entries are OFF.
|
static PdfName |
ALLON
Visible only if all of the entries are ON.
|
static PdfName |
ANYOFF
Visible if any of the entries are OFF.
|
static PdfName |
ANYON
Visible if any of the entries are ON.
|
(package private) HashSet<PdfLayer> |
layers |
(package private) PdfArray |
members |
(package private) PdfIndirectReference |
ref |
Constructor and Description |
---|
PdfLayerMembership(PdfWriter writer)
Creates a new, empty, membership layer.
|
Modifier and Type | Method and Description |
---|---|
void |
addMember(PdfLayer layer)
Adds a new member to the layer.
|
Collection<PdfLayer> |
getLayers()
Gets the member layers.
|
PdfObject |
getPdfObject()
Gets the dictionary representing the membership layer.
|
PdfIndirectReference |
getRef()
Gets the
PdfIndirectReference that represents this membership layer. |
void |
setVisibilityExpression(PdfVisibilityExpression ve)
Sets the visibility expression for content belonging to this
membership dictionary.
|
void |
setVisibilityPolicy(PdfName type)
Sets the visibility policy for content belonging to this
membership dictionary.
|
clear, contains, get, getAsArray, getAsBoolean, getAsDict, getAsIndirectObject, getAsName, getAsNumber, getAsStream, getAsString, getDirectObject, getKeys, isCatalog, isFont, isOutlineTree, isPage, isPages, merge, mergeDifferent, put, putAll, putEx, remove, size, toPdf, toString
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, type
public PdfLayerMembership(PdfWriter writer)
writer
- the writerpublic PdfIndirectReference getRef()
PdfIndirectReference
that represents this membership layer.public void addMember(PdfLayer layer)
layer
- the new member to the layerpublic Collection<PdfLayer> getLayers()
public void setVisibilityPolicy(PdfName type)
type
- the visibility policypublic void setVisibilityExpression(PdfVisibilityExpression ve)
ve
- 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 PdfObject getPdfObject()
this
.getPdfObject
in interface PdfOCG
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses