Class Container
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Makes a copy of the container.clone(EnumSet<ElementCloneFlags> cloneFlags) Makes a copy of the container.colorConvert(Document document, ColorProfile prof, RenderIntent intent, boolean embed) Applies the specified ICC ColorProfile to the objects in the Containervoiddelete()Obtain the content of a container.The container's Marked Content Tag.The OptionalContentMembershipDict property for this Container.Retrieve the PDFObject representation of this objectbooleanTests whether a container is visible in a given optional content context, considering the current ON-OFF states of the optional-content groups in the optional-content dictionary (OCMD) and the dictionary's visibility policy.booleanisCurrentlyVisible(OptionalContentContext occ, Content content) Tests whether a container is visible in a given optional content context and content.booleanmakeVisible(OptionalContentContext occ, Content content) Makes a container visible in a given optional content context and content by manipulating the ON-OFF states of the optional content groups.voidsetContent(Content content) Set the content of a container.voidsetMarkedContentTag(String mcTag) The container's Marked Content Tag.voidThe OptionalContentMembershipDict property for this Container.
-
Constructor Details
-
Container
public Container()Create a new Container.The new Container has no tag and is not associated with a dictionary.
-
Container
Create a new Container with a given Marked Content Tag.The new Container has a Marked Content tag but is not associated with a dictionary.
-
Container
Create a new Container with a given Marked Content Tag and Property list.The new Container has a Marked Content tag and is associated with a dictionary.
- Parameters:
propertyList- The tag name for the Container.isInline- If true, it's part of content stream. If false, its emitted outside of the content stream and referenced by name.propertyList- The dictionary representing the Property List to associate with the Container.
-
-
Method Details
-
delete
public void delete() -
getMarkedContentTag
The container's Marked Content Tag. -
setMarkedContentTag
The container's Marked Content Tag. -
getContent
Obtain the content of a container. -
setContent
Set the content of a container.- Parameters:
content- The new Content of the container.
-
clone
Makes a copy of the container.Make a copy of an container to obtain a new container that has a distinct set of attributes.
-
clone
Makes a copy of the container.Make a copy of an container to obtain a new container that has a distinct set of attributes.
-
getOptionalContentMembershipDict
The OptionalContentMembershipDict property for this Container.Setting this property will attach the Container to an OptionalContentMembershipDict; it will then be associated with the OptionalContentGroups and be subject to the VisibilityPolicy and VisibilityExpression of that MembershipDict.
By setting this property to null, the Container is detached from any OptionalContentMembershipDict.
- Returns:
- the OptionalContentMembershipDict
-
setOptionalContentMembershipDict
The OptionalContentMembershipDict property for this Container.Setting this property will attach the Container to an OptionalContentMembershipDict; it will then be associated with the OptionalContentGroups and be subject to the VisibilityPolicy and VisibilityExpression of that MembershipDict.
By setting this property to null, the Container is detached from any OptionalContentMembershipDict.
- Parameters:
ocmd- the OptionalContentMembershipDict
-
isCurrentlyVisible
Tests whether a container is visible in a given optional content context, considering the current ON-OFF states of the optional-content groups in the optional-content dictionary (OCMD) and the dictionary's visibility policy.If the container occurs more than once within the content, this method only checks the visibility of the first occurrence of the container.
This method determines visibility without considering the visbility of the Content object that the container belongs to. To determine the visibility of a container while taking the Content's visibility into consideration, use the alternate version of this method.
- Returns:
- true if the container is currently visible.
-
isCurrentlyVisible
Tests whether a container is visible in a given optional content context and content.If the container occurs more than once within the content, this method only checks the visibility of the first occurrence of the container.
- Returns:
- true if the container is currently visible.
-
makeVisible
Makes a container visible in a given optional content context and content by manipulating the ON-OFF states of the optional content groups.- Parameters:
occ- The optional content context in which the container is made visible.content- The content containing the container.- Returns:
- true if the container is successfully made visible in the given context and content, false otherwise
-
colorConvert
public Container colorConvert(Document document, ColorProfile prof, RenderIntent intent, boolean embed) Applies the specified ICC ColorProfile to the objects in the Container- Parameters:
document- The document the element belongs to.prof- The ICC ColorProfile to be applied.intent- The ICC Rendering Intent for the ColorProfileembed- If true, embed the color space and make the objects calibrated. If it is false and the target profile is CMYK, RGB, or Gray, the colors space of the resulting objects, after conversion, will be DeviceCMYK, DeviceRGB, or DeviceGray, respectively.- Returns:
- A new Container with the applied ICC ColorProfile.
-
getPDFDict
Retrieve the PDFObject representation of this object
-