Class BasicGraphicalElement

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

public abstract class BasicGraphicalElement extends Object implements GraphicalElement
Abstract superclass of all basic GraphicalElements. Concrete subclasses have to implement the method GraphicalElement.renderWith(jcckit.graphic.Renderer).
  • Constructor Details

    • 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 Details

    • 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.