Package jcckit.graphic
Interface GraphicalElement
-
- All Known Implementing Classes:
BasicGraphicalElement,GraphicalComposite,Oval,Polygon,Rectangle,Text
public interface GraphicalElementInterface all graphical elements have to implement. Together with the marker interfaceRendererit realizes the Anticyclic Visitor Pattern, a variant of the GoF Visitor Pattern. This allows not only to extend JCCKit with new renderers but also with new types of GraphicalElements without touching existing code.- Author:
- Franz-Josef Elmer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidrenderWith(Renderer renderer)Renders this element according to the type of renderer.
-
-
-
Method Detail
-
renderWith
void renderWith(Renderer renderer)
Renders this element according to the type of renderer. Concrete GraphicalElements who are not instances ofGraphicalCompositedynamically cast renderer. If it does not implement the type of renderer specific for the concrete GraphicalElement it should throw an IllegalArgumentException.
-
-