public class PDOptionalContentProperties extends Object implements COSObjectable
| Modifier and Type | Class and Description | 
|---|---|
| static class  | PDOptionalContentProperties.BaseStateEnumeration for the BaseState dictionary entry on the "D" dictionary. | 
| Constructor and Description | 
|---|
| PDOptionalContentProperties()Creates a new optional content properties dictionary. | 
| PDOptionalContentProperties(COSDictionary props)Creates a new instance based on a given  COSDictionary. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addGroup(PDOptionalContentGroup ocg)Adds an optional content group (OCG). | 
| PDOptionalContentProperties.BaseState | getBaseState()Returns the base state for optional content groups. | 
| COSBase | getCOSObject()Convert this standard java object to a COS object. | 
| PDOptionalContentGroup | getGroup(String name)Returns the optional content group of the given name. | 
| String[] | getGroupNames()Lists all optional content group names. | 
| Collection<PDOptionalContentGroup> | getOptionalContentGroups()Returns the collection of all optional content groups. | 
| boolean | hasGroup(String groupName)Indicates whether a particular optional content group is found in the PDF file. | 
| boolean | isGroupEnabled(String groupName)Indicates whether an optional content group is enabled. | 
| void | setBaseState(PDOptionalContentProperties.BaseState state)Sets the base state for optional content groups. | 
| boolean | setGroupEnabled(String groupName,
               boolean enable)Enables or disables an optional content group. | 
public PDOptionalContentProperties()
public PDOptionalContentProperties(COSDictionary props)
COSDictionary.props - the dictionarypublic COSBase getCOSObject()
getCOSObject in interface COSObjectablepublic PDOptionalContentGroup getGroup(String name)
name - the group namepublic void addGroup(PDOptionalContentGroup ocg)
ocg - the optional content grouppublic Collection<PDOptionalContentGroup> getOptionalContentGroups()
public PDOptionalContentProperties.BaseState getBaseState()
public void setBaseState(PDOptionalContentProperties.BaseState state)
state - the base statepublic String[] getGroupNames()
public boolean hasGroup(String groupName)
groupName - the group namepublic boolean isGroupEnabled(String groupName)
groupName - the group namepublic boolean setGroupEnabled(String groupName, boolean enable)
groupName - the group nameenable - true to enable, false to disableCopyright © 2002–2016 The Apache Software Foundation. All rights reserved.