DynamicPDF by ceTe Software

com.cete.dynamicpdf.pageelements
Class Group

java.lang.Object
  |
  +--com.cete.dynamicpdf.PageElement
        |
        +--com.cete.dynamicpdf.pageelements.Group
All Implemented Interfaces:
IPageElementContainer
Direct Known Subclasses:
AreaGroup, TransformationGroup, TransparencyGroup

public class Group
extends PageElement
implements IPageElementContainer

This class can be used to collect many page elements together and add them to the page all at once. Every page element that you add to the group will be added to the page when the group is added to the page.

View Example


Constructor Summary
Group()
          Initializes a new instance of the Group class.
 
Method Summary
 void add(PageElement pageElement)
          Adds a page element to the group.
 void draw(PageWriter writer)
          Draws the group to the given PageWriter object.
 int getCount()
          Gets the number of page elements in the group.
 java.util.Iterator getEnumerator()
          Returns an enumerator that can iterate through the Group.
 PageElement getPageElement(int index)
          Gets the PageElement object at the given index.
 PageElement getPageElement(java.lang.String id)
          Gets the PageElement object with the given ID.
 PageElement getPageElementByID(java.lang.String id)
          Returns a page element with the given ID.
 void insert(int index, PageElement pageElement)
          Inserts a page element to the group.
 
Methods inherited from class com.cete.dynamicpdf.PageElement
getRequiredLicenseLevel, getStrID, setRequiredLicenseLevel, setStrID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Group

public Group()
Initializes a new instance of the Group class.

See Also:
Group
Method Detail

getPageElement

public PageElement getPageElement(java.lang.String id)
Gets the PageElement object with the given ID.

See Also:
PageElement

getPageElement

public PageElement getPageElement(int index)
Gets the PageElement object at the given index.

See Also:
PageElement

getCount

public int getCount()
Gets the number of page elements in the group.


draw

public void draw(PageWriter writer)
Draws the group to the given PageWriter object.

Specified by:
draw in class PageElement
Parameters:
writer - PageWriter object to receive the group's output.
See Also:
PageWriter

insert

public void insert(int index,
                   PageElement pageElement)
Inserts a page element to the group.

Parameters:
index - The Zero-based index it which the page element should be inserted.
pageElement - PageElement object to insert in the group.
See Also:
PageElement

add

public void add(PageElement pageElement)
Adds a page element to the group.

Parameters:
pageElement - PageElement object to add to the group.
See Also:
PageElement

getEnumerator

public java.util.Iterator getEnumerator()
Returns an enumerator that can iterate through the Group.

Returns:
A Iterator for the entire Group

getPageElementByID

public PageElement getPageElementByID(java.lang.String id)
Returns a page element with the given ID.

Specified by:
getPageElementByID in interface IPageElementContainer
Parameters:
id - ID of the page element to find.
Returns:
PageElement with the given ID.
See Also:
PageElement

DynamicPDF by ceTe Software

API Reference for DynamicPDF™ for Java generated on December 20, 2005
© Copyright 2005, ceTe Software