uk.ac.starlink.diva
Class DrawEllipseFigure

java.lang.Object
  extended by diva.canvas.AbstractFigure
      extended by diva.canvas.toolbox.BasicFigure
          extended by uk.ac.starlink.diva.DrawBasicFigure
              extended by uk.ac.starlink.diva.DrawEllipseFigure
All Implemented Interfaces:
CanvasComponent, Figure, ShapedFigure, VisibleComponent, UserObjectContainer, DrawFigure

public class DrawEllipseFigure
extends DrawBasicFigure

A figure that displays as an ellipse. This is a convenience class for creating ellipses for use on a Draw component.

Version:
$Id$
Author:
Peter W. Draper
See Also:
Draw

Field Summary
 
Fields inherited from class uk.ac.starlink.diva.DrawBasicFigure
listeners, transformFreely
 
Constructor Summary
DrawEllipseFigure(double x, double y, double width, double height)
          Create a new instance with the given origin and size, a unit-width continuous stroke and no paint pattern.
DrawEllipseFigure(double x, double y, double width, double height, float lineWidth)
          Create a new instance with the given origin, size, and outline width.
DrawEllipseFigure(double x, double y, double width, double height, Paint fill)
          Create a new instance with the given origin, size, and fill paint.
DrawEllipseFigure(double x, double y, double width, double height, Paint fill, Paint outline, float lineWidth, AlphaComposite composite)
          Create a new instance with the given origin, size, fill, and outline width.
DrawEllipseFigure(Ellipse2D ellipse)
          Create a new instance with the given ellipse, a unit-width continuous stroke and no paint pattern.
 
Method Summary
 void translate(double x, double y)
          Translate the ellipse the given distance
 
Methods inherited from class uk.ac.starlink.diva.DrawBasicFigure
addListener, fireChanged, fireCreated, fireRemoved, isTransformFreely, removeListener, setTransformFreely, setVisible, transform
 
Methods inherited from class diva.canvas.toolbox.BasicFigure
getBounds, getComposite, getDashArray, getFillPaint, getLineWidth, getShape, getStrokePaint, hit, paint, setComposite, setDashArray, setFillPaint, setLineWidth, setShape, setStroke, setStrokePaint
 
Methods inherited from class diva.canvas.AbstractFigure
contains, getInteractor, getLayer, getOrigin, getParent, getToolTipText, getTransformContext, getUserObject, intersects, isVisible, paint, repaint, repaint, setInteractor, setParent, setToolTipText, setUserObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface uk.ac.starlink.diva.DrawFigure
getComposite, getFillPaint, getLineWidth, getStrokePaint, setComposite, setFillPaint, setLineWidth, setShape, setStrokePaint
 
Methods inherited from interface diva.canvas.Figure
contains, getBounds, getInteractor, getLayer, getOrigin, getParent, getShape, getToolTipText, hit, intersects, setInteractor, setParent, setToolTipText
 
Methods inherited from interface diva.canvas.VisibleComponent
isVisible, paint, paint
 
Methods inherited from interface diva.canvas.CanvasComponent
getTransformContext, repaint, repaint
 
Methods inherited from interface diva.util.UserObjectContainer
getUserObject, setUserObject
 

Constructor Detail

DrawEllipseFigure

public DrawEllipseFigure(Ellipse2D ellipse)
Create a new instance with the given ellipse, a unit-width continuous stroke and no paint pattern.


DrawEllipseFigure

public DrawEllipseFigure(double x,
                         double y,
                         double width,
                         double height)
Create a new instance with the given origin and size, a unit-width continuous stroke and no paint pattern.


DrawEllipseFigure

public DrawEllipseFigure(double x,
                         double y,
                         double width,
                         double height,
                         Paint fill)
Create a new instance with the given origin, size, and fill paint. It has no outline.


DrawEllipseFigure

public DrawEllipseFigure(double x,
                         double y,
                         double width,
                         double height,
                         float lineWidth)
Create a new instance with the given origin, size, and outline width. It has no fill.


DrawEllipseFigure

public DrawEllipseFigure(double x,
                         double y,
                         double width,
                         double height,
                         Paint fill,
                         Paint outline,
                         float lineWidth,
                         AlphaComposite composite)
Create a new instance with the given origin, size, fill, and outline width.

Method Detail

translate

public void translate(double x,
                      double y)
Translate the ellipse the given distance

Specified by:
translate in interface Figure
Overrides:
translate in class DrawBasicFigure


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.