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).
|
Modifier and Type | Method and Description |
---|---|
void |
accept(IRenderingVisitor visitor)
Converts this
TextElement into widget specific objects. |
public final double xCoord
public final double yCoord
public final double width
public final double height
public final boolean filled
public final Color color
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 rectanglepublic void accept(IRenderingVisitor visitor)
TextElement
into widget specific objects.accept
in interface IRenderingElement
visitor
- Toolkit specific widget factory.Copyright © 2018. All Rights Reserved.