org.jdrawing.graphics
Class FillOval

java.lang.Object
  extended byorg.jdrawing.graphics.GraphicsOperation
      extended byorg.jdrawing.graphics.RectangleOperation
          extended byorg.jdrawing.graphics.FillOval
All Implemented Interfaces:
DrawingElement

public class FillOval
extends RectangleOperation

Graphics element which corresponds to Graphics.fillOval(int, int, int, int)


Constructor Summary
FillOval(int x, int y, int width, int height)
          Returns DrawOval which fits into specified rectangle.
FillOval(int x, int y, int width, int height, Style style)
          Returns DrawOval which fits into specified rectangle.
 
Method Summary
 java.awt.Rectangle getBounds()
          Returns bounding box of the element.
 java.awt.geom.Rectangle2D getBounds2D()
          Returns high precision bounding box of the element.
 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.RectangleOperation
getHeight, getWidth, getX, getY, setHeight, setRectangle, setWidth, setX, setY
 
Methods inherited from class org.jdrawing.graphics.GraphicsOperation
contains, getPosition, getStyle, intersects, paint, setPosition, setStyle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FillOval

public FillOval(int x,
                int y,
                int width,
                int height)
Returns DrawOval which fits into specified rectangle.

Parameters:
x - left edge of the rectangle
y - top edge of the rectangle
width - width of the rectangle
height - height of the rectangle

FillOval

public FillOval(int x,
                int y,
                int width,
                int height,
                Style style)
Returns DrawOval which fits into specified rectangle.

Parameters:
x - left edge of the rectangle
y - top edge of the rectangle
width - width of the rectangle
height - height of the rectangle
Method Detail

paintOperation

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

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

getBounds

public java.awt.Rectangle getBounds()
Returns bounding box of the element. If the element is unbounded then this method returns null.

Specified by:
getBounds in interface DrawingElement
Overrides:
getBounds in class GraphicsOperation
Returns:
bounding box of the element or null is the element is unbounded

getBounds2D

public java.awt.geom.Rectangle2D getBounds2D()
Returns high precision bounding box of the element. If the element is unbounded then this method returns null.

Specified by:
getBounds2D in interface DrawingElement
Overrides:
getBounds2D in class GraphicsOperation
Returns:
high precision bounding box of the element or null if the element is unbounded

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