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:
AnchorGroup, 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.

Licensing:
This class is a DynamicPDF Generator Community Edition feature.

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.
protected  boolean hasPageElements()
          Returns a value indicating if there are any PageElements in the group.
 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

hasPageElements

protected boolean hasPageElements()
Returns a value indicating if there are any PageElements in the group.

Returns:
Value indication whether or not there are PageElements in the group.

DynamicPDF by ceTe Software

API Reference for DynamicPDFTM v4.0.3 for Java generated on March 22, 2007
© Copyright 2007, ceTe Software