public abstract class AbstractAggregateContent<C extends TransformableContent> extends AbstractTransformableContent
Note: The bounds are not stored in attributes to make this class easier to understand. To do so would require: (1) Use of the isTransformationRequired() method in the parent; and (2) Changes to the add() and remove() methods in this class.
Constructor and Description |
---|
AbstractAggregateContent()
Default Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(C component)
Add a TransformableContent.
|
java.awt.geom.Rectangle2D |
getBounds2D(boolean ofTransformed)
Returns a high precision bounding box of the Content
either before or after it is transformed.
|
java.util.Iterator<C> |
iterator()
Return an Iterator containing all of the TransformableContent
objects.
|
void |
remove(C component)
Remove a TransformableContent.
|
void |
render(java.awt.Graphics g)
Render this AbstractAggregateContent
(required by TransformableContent).
|
getBounds2D, setLocation, setRotation, setScale, setScale
public void add(C component)
component
- The TransformableContent to addpublic java.awt.geom.Rectangle2D getBounds2D(boolean ofTransformed)
getBounds2D
in interface TransformableContent
getBounds2D
in class AbstractTransformableContent
ofTransformed
- true to get the BB of the transformed contentpublic java.util.Iterator<C> iterator()
public void remove(C component)
component
- The TransformableContent to removepublic void render(java.awt.Graphics g)
g
- The rendering engine to use