Class LineElement
java.lang.Object
org.openscience.cdk.renderer.elements.LineElement
- All Implemented Interfaces:
IRenderingElement
- Direct Known Subclasses:
WedgeLineElement
A line between two points.
- Source code:
- main
- Belongs to CDK module:
- renderbasic
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Color
The color of the line.final double
The x-coordinate of the first point.final double
The y-coordinate of the first point.final double
The x-coordinate of the second point.final double
The y-coordinate of the second point.final double
The width of the line. -
Constructor Summary
ConstructorsConstructorDescriptionLineElement
(double firstPointX, double firstPointY, double secondPointX, double secondPointY, double width, Color color) Make a line element. -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(IRenderingVisitor visitor) Converts thisTextElement
into widget specific objects.
-
Field Details
-
firstPointX
public final double firstPointXThe x-coordinate of the first point. -
firstPointY
public final double firstPointYThe y-coordinate of the first point. -
secondPointX
public final double secondPointXThe x-coordinate of the second point. -
secondPointY
public final double secondPointYThe y-coordinate of the second point. -
width
public final double widthThe width of the line. -
color
The color of the line.
-
-
Constructor Details
-
LineElement
public LineElement(double firstPointX, double firstPointY, double secondPointX, double secondPointY, double width, Color color) Make a line element.- Parameters:
firstPointX
- x-coordinate of the first pointfirstPointY
- y-coordinate of the first pointsecondPointX
- x-coordinate of the second pointsecondPointY
- y-coordinate of the second pointwidth
- the width of the linecolor
- the color of the line
-
-
Method Details
-
accept
Converts thisTextElement
into widget specific objects.- Specified by:
accept
in interfaceIRenderingElement
- Parameters:
visitor
- Toolkit specific widget factory.
-