org.jdrawing.graphics
Class FillPolygon

java.lang.Object
  extended byorg.jdrawing.graphics.GraphicsOperation
      extended byorg.jdrawing.graphics.PolygonOperation
          extended byorg.jdrawing.graphics.FillPolygon
All Implemented Interfaces:
DrawingElement

public class FillPolygon
extends PolygonOperation

Graphics element which corresponds to Graphics.fillPolygon(Polygon)


Constructor Summary
FillPolygon(java.awt.Polygon polygon)
          Returns DrawPolygon with given polygon.
FillPolygon(java.awt.Polygon polygon, Style style)
          Returns DrawPolygon with given polygon.
 
Method Summary
 java.awt.Shape getShapeOfOperation()
          Returns shape of the area updated by this operation.
 void paintOperation(java.awt.Graphics2D graphics)
          Performs drawing operation.
 
Methods inherited from class org.jdrawing.graphics.PolygonOperation
equals, getPolygon, hashCode, setPolygon
 
Methods inherited from class org.jdrawing.graphics.GraphicsOperation
contains, getBounds, getBounds2D, getPosition, getStyle, intersects, paint, setPosition, setStyle
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FillPolygon

public FillPolygon(java.awt.Polygon polygon)
Returns DrawPolygon with given polygon.

Parameters:
polygon - polygon to be used for this operation

FillPolygon

public FillPolygon(java.awt.Polygon polygon,
                   Style style)
Returns DrawPolygon with given polygon.

Parameters:
polygon - polygon to be used for this operation
Method Detail

paintOperation

public void paintOperation(java.awt.Graphics2D graphics)
Performs drawing operation. This implementation invokes graphics.fillPolygon ().

Specified by:
paintOperation in class GraphicsOperation
Parameters:
graphics - graphics context to use for painting

getShapeOfOperation

public java.awt.Shape getShapeOfOperation()
Returns shape of the area updated by this operation.

Specified by:
getShapeOfOperation in class GraphicsOperation
Returns:
the shape of updated area