Package jcckit.graphic
Class GraphicalComposite
java.lang.Object
jcckit.graphic.GraphicalComposite
- All Implemented Interfaces:
GraphicalElement
Container for
GraphicalElements.-
Constructor Summary
ConstructorsConstructorDescriptionGraphicalComposite(ClippingShape clippingShape) Creates an instance with the specified clipping shape. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddElement(GraphicalElement element) Adds the specified element at the end of the list of elements.Returns the clipping shape.voidRemove all elements.voidrenderWith(Renderer renderer) Renders allGraphicalElementsin the sequence they have been added.voidreplaceElementAt(int index, GraphicalElement element) Replaces the specified element at the specified index of the list of elements.
-
Constructor Details
-
GraphicalComposite
Creates an instance with the specified clipping shape.- Parameters:
clippingShape- Clipping shape or null if no clipping.
-
-
Method Details
-
getClippingShape
Returns the clipping shape.- Returns:
- null if no clipping should be applied.
-
addElement
Adds the specified element at the end of the list of elements.- Parameters:
element- Element to be added. null is not allowed.- Throws:
NullPointerException- if element == null
-
removeAllElements
public void removeAllElements()Remove all elements. -
replaceElementAt
Replaces the specified element at the specified index of the list of elements.- Parameters:
index- Index of the element to be replaced.element- New element. null is not allowed.- Throws:
NullPointerException- if element == null
-
renderWith
Renders allGraphicalElementsin the sequence they have been added.- Specified by:
renderWithin interfaceGraphicalElement- Parameters:
renderer- Renderer which implements all renderer interfaces necessary to render the child elements.- Throws:
IllegalArgumentException- if renderer is not an instance of GraphicalCompositeRenderer.
-