Class ArrowElement
- java.lang.Object
-
- org.openscience.cdk.renderer.elements.ArrowElement
-
- All Implemented Interfaces:
IRenderingElement
public class ArrowElement extends Object implements IRenderingElement
IRenderingElement
for linear arrows.- Source code:
- main
- Belongs to CDK module:
- renderbasic
-
-
Field Summary
Fields Modifier and Type Field Description Color
color
Color of the arrow.boolean
direction
Boolean that is true if the arrow points from start to end, false if from end to start.double
endX
X coordinate of the point where the arrow ends.double
endY
Y coordinate of the point where the arrow ends.double
startX
X coordinate of the point where the arrow starts.double
startY
Y coordinate of the point where the arrow starts.double
width
Width of the arrow line.
-
Constructor Summary
Constructors Constructor Description ArrowElement(double startX, double startY, double endX, double endY, double width, boolean direction, Color color)
Constructor for an arrow element, based on starting point, end point, width, direction, and color.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(IRenderingVisitor v)
Converts thisTextElement
into widget specific objects.
-
-
-
Field Detail
-
startX
public final double startX
X coordinate of the point where the arrow starts.
-
startY
public final double startY
Y coordinate of the point where the arrow starts.
-
endX
public final double endX
X coordinate of the point where the arrow ends.
-
endY
public final double endY
Y coordinate of the point where the arrow ends.
-
width
public final double width
Width of the arrow line.
-
color
public final Color color
Color of the arrow.
-
direction
public final boolean direction
Boolean that is true if the arrow points from start to end, false if from end to start.
-
-
Constructor Detail
-
ArrowElement
public ArrowElement(double startX, double startY, double endX, double endY, double width, boolean direction, Color color)
Constructor for an arrow element, based on starting point, end point, width, direction, and color.- Parameters:
startX
- X coordinate of the point where the arrow starts.startY
- Y coodrinate of the point where the arrow starts.endX
- X coordinate of the point where the arrow ends.endY
- Y coordinate of the point where the arrow ends.width
- width of the arrow line.direction
- true is the arrow points from start to end, false if from end to startcolor
-Color
of the arrow
-
-
Method Detail
-
accept
public void accept(IRenderingVisitor v)
Converts thisTextElement
into widget specific objects.- Specified by:
accept
in interfaceIRenderingElement
- Parameters:
v
- Toolkit specific widget factory.
-
-