@TestClass(value="org.openscience.cdk.renderer.elements.RectangleElementTest") public class RectangleElement extends Object implements IRenderingElement
| Modifier and Type | Field and Description |
|---|---|
Color |
color
The color of the rectangle.
|
boolean |
filled
If true, the rectangle is drawn as filled.
|
double |
height
The height of the rectangle.
|
double |
width
The width of the rectangle.
|
double |
xCoord
The x-coordinate of the center of the rectangle.
|
double |
yCoord
The y-coordinate of the center of the rectangle.
|
| Constructor and Description |
|---|
RectangleElement(double xCoord,
double yCoord,
double width,
double height,
boolean filled,
Color color)
Make a rectangle centered on (x, y).
|
RectangleElement(double xCoord1,
double yCoord1,
double xCoord2,
double yCoord2,
Color color)
Make a rectangle from two opposite corners (x1, y1) and (x2, y2).
|
public final double xCoord
public final double yCoord
public final double width
public final double height
public final boolean filled
public final Color color
@TestMethod(value="testConstructor") public RectangleElement(double xCoord1, double yCoord1, double xCoord2, double yCoord2, Color color)
xCoord1 - the x-coordinate of the first pointyCoord1 - the y-coordinate of the first pointxCoord2 - the x-coordinate of the second pointyCoord2 - the y-coordinate of the second pointcolor - the color of the rectanglepublic RectangleElement(double xCoord,
double yCoord,
double width,
double height,
boolean filled,
Color color)
xCoord - x-coordinate of the center of the rectangleyCoord - y-coordinate of the center of the rectanglewidth - width of the rectangleheight - height of the rectanglefilled - if true, the rectangle is drawn as filledcolor - the color of the rectangle@TestMethod(value="testAccept") public void accept(IRenderingVisitor visitor)
TextElement into widget specific objects.accept in interface IRenderingElementvisitor - Toolkit specific widget factory.