org.jdrawing.graphics
Class GraphicsOperation

java.lang.Object
  extended byorg.jdrawing.graphics.GraphicsElement
      extended byorg.jdrawing.graphics.GraphicsOperation
All Implemented Interfaces:
DrawingElement
Direct Known Subclasses:
DrawImage, DrawLine, DrawString, PolygonOperation, RectangleOperation, ShapeOperation

public abstract class GraphicsOperation
extends GraphicsElement
implements DrawingElement

This is the base class for all elements, representing drawing operations.


Field Summary
 
Fields inherited from class org.jdrawing.graphics.GraphicsElement
BACKGROUND, COLOR, COMPOSITE, FONT, PAINT, parent, position, STROKE, TRANSFORM
 
Constructor Summary
GraphicsOperation()
           
 
Method Summary
 void paint(java.awt.Graphics graphics)
          Paint the element.
abstract  void paintOperation(java.awt.Graphics2D graphics)
          Performs grawing operation.
 void update()
          Notifies parent about changes in this element
 
Methods inherited from class org.jdrawing.graphics.GraphicsElement
addStyle, getParent, getStyle, getStyles, getTransform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jdrawing.DrawingElement
contains, getBounds, getBounds2D, intersects
 

Constructor Detail

GraphicsOperation

public GraphicsOperation()
Method Detail

paint

public void paint(java.awt.Graphics graphics)
Paint the element. This implementation applies all styles and then calls paintOperation(java.awt.Graphics2D).

Specified by:
paint in interface DrawingElement
Parameters:
graphics - graphics context to use for painting

paintOperation

public abstract void paintOperation(java.awt.Graphics2D graphics)
Performs grawing operation.

Parameters:
graphics - graphics context to use for painting

update

public void update()
Notifies parent about changes in this element