com.spire.pdf.graphics.layer
Class PdfLayer

java.lang.Object
  extended by com.spire.pdf.graphics.layer.PdfLayer
All Implemented Interfaces:
IPdfVisibilityGroup

public class PdfLayer
extends java.lang.Object
implements IPdfVisibilityGroup

Represent pdf optional content group. Content typically belongs to a single optional content group.


Constructor Summary
PdfLayer(PdfDictionary dictOptionalContentGroup, PdfLayerCollectionConfiguration config)
          Construct an instance with the optional content group dictionary
PdfLayer(PdfDictionary dictOptionalContentGroup, PdfLayerCollectionConfiguration config, java.lang.String reference)
          Construct an instance with the optional content group dictionary
PdfLayer(java.lang.String name, PdfLayerCollectionConfiguration config)
          Construct an instance.
 
Method Summary
 PdfCanvas createGraphics(PdfCanvas g)
          Create the layer graphics.
 java.lang.String getName()
          Get pdf layer name.
 java.lang.String getReference()
          Get reference of the layer.
 PdfVisibility getVisibility()
          Get pdf layer visible.
 boolean isShowOnUI()
          Get whether the layer shows on user interface or not.
 void setName(java.lang.String value)
          Set pdf layer name.
 void setVisibility(PdfVisibility value)
          Set pdf layer visible.
 

Constructor Detail

PdfLayer

public PdfLayer(java.lang.String name,
                PdfLayerCollectionConfiguration config)
Construct an instance.

Parameters:
name - The pdf layer name.
config - The optional content configuration.

PdfLayer

public PdfLayer(PdfDictionary dictOptionalContentGroup,
                PdfLayerCollectionConfiguration config)
Construct an instance with the optional content group dictionary

Parameters:
dictOptionalContentGroup - The optional content group dictionary
config - The optional content configuration.

PdfLayer

public PdfLayer(PdfDictionary dictOptionalContentGroup,
                PdfLayerCollectionConfiguration config,
                java.lang.String reference)
Construct an instance with the optional content group dictionary

Parameters:
dictOptionalContentGroup - The optional content group dictionary
config - The optional content configuration.
reference - The reference of the layer
Method Detail

getName

public java.lang.String getName()
Get pdf layer name.

Returns:
Name may be is not unique.

setName

public void setName(java.lang.String value)
Set pdf layer name.

Parameters:
value - Name may be is not unique.

getVisibility

public PdfVisibility getVisibility()
Get pdf layer visible.


setVisibility

public void setVisibility(PdfVisibility value)
Set pdf layer visible.


isShowOnUI

public boolean isShowOnUI()
Get whether the layer shows on user interface or not.


getReference

public java.lang.String getReference()
Get reference of the layer.


createGraphics

public PdfCanvas createGraphics(PdfCanvas g)
Create the layer graphics.

Parameters:
g - The pdf layer container's graphics.
Returns:
The pdf layer graphics.