OptionalContentContext Class Documentation
classOptionalContentContextNamespace:com::datalogics::PDFL
Detailed Description
Defines the context for optional content in a PDF. An Optional Content Context is a status object that defines the context for optional content within a document.
The context tracks the On/Off status for Optional Content Groups (layers) within a document. It contains flags that control whether to display content that is marked as optional.
Referenced by
Constructor & Destructor Documentation
OptionalContentContext
OptionalContentContext(Documentdocument)Parameters
document: DocumentThe document for which to create a context.
Creates a context object that represents an optional-content state of the document, using the current state as the initial state for each group (OCG), as determined by the document's optional-content configuration.
Member Function Documentation
DisposeChildren
voidDisposeChildren()Returns:
void[static initializer]
static void[static initializer]()clone
OptionalContentContextclone()Returns:
A copy of the original optional content context.Makes a copy of the optional content context.
delete
synchronized voiddelete(Booleandisposing)Parameters
disposing: Boolean
Returns:
synchronized voiddelete
synchronized voiddelete()Returns:
synchronized voidequals
booleanequals(Objectrhs)Parameters
rhs: Object
Returns:
booleanfinalize
voidfinalize()Returns:
voidgetDrawOptionalContent
OptionalContentDrawingPolicygetDrawOptionalContent()Returns:
The drawing policy for optional content in this optional content context.Gets the drawing policy for the optional content in this optional content context.
getOCGStates
java.util.List< Boolean >getOCGStates(java.util.List< OptionalContentGroup >ocgs)Parameters
ocgs: java.util.List< OptionalContentGroup >A list of optional-content groups whose states are obtained.
Returns:
An array of OCG states corresponding to the array of OCGs, true for ON and false for OFF.Gets the ON-OFF states for the given optional-content groups (OCGs) in the given optional-content context.
getStateOfOCG
booleangetStateOfOCG(OptionalContentGroupocg)Parameters
ocg: OptionalContentGroupThe optional content group whose state will be retrieved.
Returns:
booleanGets the ON-OFF state for the given optional content group (OCG) in this optional content context.
sameTypeEquals
booleansameTypeEquals(OptionalContentContextarg0)Parameters
arg0: OptionalContentContext
Returns:
booleansetDrawOptionalContent
voidsetDrawOptionalContent(OptionalContentDrawingPolicynewPolicy)Parameters
newPolicy: OptionalContentDrawingPolicyThe new drawing policy for optional content in this optional content context.
Returns:
voidSets the drawing policy for the optional content in this optional content context.
setOCGStates
voidsetOCGStates(java.util.List< OptionalContentGroup >ocgs, java.util.List< Boolean >newStates)Parameters
ocgs: java.util.List< OptionalContentGroup >A list of optional-content groups.
newStates: java.util.List< Boolean >A list of new OCG states corresponding to the list of OCGs, true for ON and false for OFF. The list must contain as many states as there are non-NULL OCGs in the pdocgs list.
Returns:
voidSets the ON-OFF states for the given optional-content groups (OCGs) in the given optional-content context. The newStates vector must be large enough to hold as many Boolean values as there are OCGs.
setStateOfOCG
voidsetStateOfOCG(OptionalContentGroupocg, booleannewValue)Parameters
ocg: OptionalContentGroupThe optional content group whose state will be set.
newValue: booleanThe new ON-OFF state for the optional content group.
Returns:
voidSets the ON-OFF state for the given optional content group (OCG) in this optional content context.
toString
StringtoString()Returns:
String