com.spire.pdf
Class PdfStampCollection

java.lang.Object
  extended by com.spire.pdf.PdfCollection
      extended by com.spire.pdf.PdfStampCollection
All Implemented Interfaces:
com.spire.ms.System.Collections.IEnumerable, java.lang.Iterable

public class PdfStampCollection
extends PdfCollection

A collection of stamps that are applied to the page templates.


Constructor Summary
PdfStampCollection()
          Creates a new stamp collection.
 
Method Summary
 PdfPageTemplateElement add(float x, float y, float width, float height)
          Creates a stamp element and adds it to the collection.
 int add(PdfPageTemplateElement template)
          Adds a stamp element to the collection.
 void clear()
          Cleares the collection.
 boolean contains(PdfPageTemplateElement template)
          Checks whether the stamp element exists in the collection.
 PdfPageTemplateElement get(int index)
          Gets a stamp element by its index.
 void insert(int index, PdfPageTemplateElement template)
          Inserts a stamp element to the collection at the specified position.
 void remove(PdfPageTemplateElement template)
          Removes the stamp element from the collection.
 void removeAt(int index)
          Removes a stamp element from the specified position in the collection.
 
Methods inherited from class com.spire.pdf.PdfCollection
getCount, getList
 

Constructor Detail

PdfStampCollection

public PdfStampCollection()
Creates a new stamp collection.

Method Detail

get

public PdfPageTemplateElement get(int index)
Gets a stamp element by its index.


add

public int add(PdfPageTemplateElement template)
Adds a stamp element to the collection.

Parameters:
template - The stamp element.
Returns:
The index of the stamp element.

add

public PdfPageTemplateElement add(float x,
                                  float y,
                                  float width,
                                  float height)
Creates a stamp element and adds it to the collection.

Parameters:
x - X co-ordinate of the stamp.
y - Y co-ordinate of the stamp.
width - Width of the stamp.
height - Height of the stamp.
Returns:
The created stamp element.

contains

public boolean contains(PdfPageTemplateElement template)
Checks whether the stamp element exists in the collection.

Parameters:
template - Stamp element.
Returns:
True - if stamp element exists in the collection, False otherwise.

insert

public void insert(int index,
                   PdfPageTemplateElement template)
Inserts a stamp element to the collection at the specified position.

Parameters:
index - The index of the stamp in the collection.
template - The stamp element.

remove

public void remove(PdfPageTemplateElement template)
Removes the stamp element from the collection.

Parameters:
template - The stamp element.

removeAt

public void removeAt(int index)
Removes a stamp element from the specified position in the collection.

Parameters:
index - The index of the stamp in the collection.

clear

public void clear()
Cleares the collection.