jcckit.graphic
Class BasicGraphicalElement

java.lang.Object
  extended byjcckit.graphic.BasicGraphicalElement
All Implemented Interfaces:
GraphicalElement
Direct Known Subclasses:
Polygon, Rectangle, Text

public abstract class BasicGraphicalElement
extends java.lang.Object
implements GraphicalElement

Abstract superclass of all basic GraphicalElements. Concrete subclasses have to implement the method GraphicalElement.renderWith(jcckit.graphic.Renderer).

Author:
Franz-Josef Elmer

Constructor Summary
BasicGraphicalElement(GraphicAttributes attributes)
          Creates an instance with the specified drawing attributes.
 
Method Summary
 GraphicAttributes getGraphicAttributes()
          Returns the drawing attributes.
 boolean isClosed()
          Returns whether this basic graphical element has a closed shape or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jcckit.graphic.GraphicalElement
renderWith
 

Constructor Detail

BasicGraphicalElement

public BasicGraphicalElement(GraphicAttributes attributes)
Creates an instance with the specified drawing attributes. Note, that a Renderer should use default attributes in the case no attributes are defined.

Parameters:
attributes - Drawing attributes or null if undefined.
Method Detail

getGraphicAttributes

public GraphicAttributes getGraphicAttributes()
Returns the drawing attributes.

Returns:
null if undefined.

isClosed

public boolean isClosed()
Returns whether this basic graphical element has a closed shape or not. By default always true. Subclasses may override this behaviour.

Returns:
true if the shape is closed.