Class OvalElement
- java.lang.Object
-
- org.openscience.cdk.renderer.elements.OvalElement
-
- All Implemented Interfaces:
IRenderingElement
- Direct Known Subclasses:
RingElement
public class OvalElement extends Object implements IRenderingElement
An oval element (should) have both a width and a height.- Source code:
- main
- Belongs to CDK module:
- renderbasic
-
-
Field Summary
Fields Modifier and Type Field Description ColorcolorThe color to draw the oval.booleanfillIf true, draw the oval as filled.doubleradiusThe radius of the oval.doublestrokeThe stroke width.doublexCoordThe x-coordinate of the center of the oval.doubleyCoordThe y-coordinate of the center of the oval.
-
Constructor Summary
Constructors Constructor Description OvalElement(double xCoord, double yCoord, double radius, boolean fill, Color color)OvalElement(double xCoord, double yCoord, double radius, double stroke, boolean fill, Color color)Make an oval with a particular fill and color.OvalElement(double xCoord, double yCoord, double radius, Color color)Make an oval with the supplied radius.OvalElement(double xCoord, double yCoord, Color color)Make an oval with a default radius of 10.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(IRenderingVisitor visitor)Converts thisTextElementinto widget specific objects.
-
-
-
Field Detail
-
xCoord
public final double xCoord
The x-coordinate of the center of the oval.
-
yCoord
public final double yCoord
The y-coordinate of the center of the oval.
-
radius
public final double radius
The radius of the oval.
-
stroke
public final double stroke
The stroke width.
-
fill
public final boolean fill
If true, draw the oval as filled.
-
color
public final Color color
The color to draw the oval.
-
-
Constructor Detail
-
OvalElement
public OvalElement(double xCoord, double yCoord, Color color)Make an oval with a default radius of 10.- Parameters:
xCoord- the x-coordinate of the center of the ovalyCoord- the y-coordinate of the center of the ovalcolor- the color of the oval
-
OvalElement
public OvalElement(double xCoord, double yCoord, double radius, Color color)Make an oval with the supplied radius.- Parameters:
xCoord- the x-coordinate of the center of the ovalyCoord- the y-coordinate of the center of the ovalradius- the radius of the ovalcolor- the color of the oval
-
OvalElement
public OvalElement(double xCoord, double yCoord, double radius, double stroke, boolean fill, Color color)Make an oval with a particular fill and color.- Parameters:
xCoord- the x-coordinate of the center of the ovalyCoord- the y-coordinate of the center of the ovalradius- the radius of the ovalfill- if true, fill the oval when drawingcolor- the color of the oval
-
OvalElement
public OvalElement(double xCoord, double yCoord, double radius, boolean fill, Color color)
-
-
Method Detail
-
accept
public void accept(IRenderingVisitor visitor)
Converts thisTextElementinto widget specific objects.- Specified by:
acceptin interfaceIRenderingElement- Parameters:
visitor- Toolkit specific widget factory.
-
-