DynamicPDF by ceTe Software

com.cete.dynamicpdf.pageelements
Class Group

java.lang.Object
  extended by com.cete.dynamicpdf.PageElement
      extended by com.cete.dynamicpdf.pageelements.Group
All Implemented Interfaces:
IPageElementContainer
Direct Known Subclasses:
AnchorGroup, AreaGroup, ContentArea, 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.
 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 hasElements()
          Get a value indicating whether the group has any elements.
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.
 int size()
          Gets the number of page elements in 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.

Parameters:
id - the element id.
Returns:
element related to the id.
See Also:
PageElement

getPageElement

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

Parameters:
index - the index of the element
Returns:
element related to the index.
See Also:
PageElement

size

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

Returns:
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.

hasElements

protected boolean hasElements()
Get a value indicating whether the group has any elements.

Returns:
whether the group has any elements.

DynamicPDF by ceTe Software

API Reference for DynamicPDF v10.04 for Java generated on September 25, 2019
© Copyright 2019, ceTe Software