Class OvalElement
java.lang.Object
org.openscience.cdk.renderer.elements.OvalElement
- All Implemented Interfaces:
IRenderingElement
- Direct Known Subclasses:
RingElement
An oval element (should) have both a width and a height.
- Source code:
- main
- Belongs to CDK module:
- renderbasic
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Color
The color to draw the oval.final boolean
If true, draw the oval as filled.final double
The radius of the oval.final double
The stroke width.final double
The x-coordinate of the center of the oval.final double
The y-coordinate of the center of the oval. -
Constructor Summary
ConstructorsConstructorDescriptionOvalElement
(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
Modifier and TypeMethodDescriptionvoid
accept
(IRenderingVisitor visitor) Converts thisTextElement
into widget specific objects.
-
Field Details
-
xCoord
public final double xCoordThe x-coordinate of the center of the oval. -
yCoord
public final double yCoordThe y-coordinate of the center of the oval. -
radius
public final double radiusThe radius of the oval. -
stroke
public final double strokeThe stroke width. -
fill
public final boolean fillIf true, draw the oval as filled. -
color
The color to draw the oval.
-
-
Constructor Details
-
OvalElement
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
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
-
-
Method Details
-
accept
Converts thisTextElement
into widget specific objects.- Specified by:
accept
in interfaceIRenderingElement
- Parameters:
visitor
- Toolkit specific widget factory.
-