Class WedgeLineElement
- java.lang.Object
-
- org.openscience.cdk.renderer.elements.LineElement
-
- org.openscience.cdk.renderer.elements.WedgeLineElement
-
- All Implemented Interfaces:
IRenderingElement
public class WedgeLineElement extends LineElement
A 'wedge' is a triangle aligned along a bond that indicates stereochemistry. It can be dashed or not to indicate up and down.- Source code:
- main
- Belongs to CDK module:
- renderbasic
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WedgeLineElement.Direction
'toFirst' means that the wedge gets thicker in the direction of the first point in the line.static class
WedgeLineElement.TYPE
If the bond is dashed ,wedged, or "up_or_down", i.e., not defined.-
Nested classes/interfaces inherited from class org.openscience.cdk.renderer.elements.LineElement
LineElement.LineType
-
-
Field Summary
Fields Modifier and Type Field Description WedgeLineElement.Direction
direction
The direction indicates which way the wedge gets thicker.WedgeLineElement.TYPE
type
The type of the bond (dashed, wedged, not defined).-
Fields inherited from class org.openscience.cdk.renderer.elements.LineElement
color, firstPointX, firstPointY, secondPointX, secondPointY, width
-
-
Constructor Summary
Constructors Constructor Description WedgeLineElement(double x1, double y1, double x2, double y2, double width, WedgeLineElement.TYPE type, WedgeLineElement.Direction direction, Color color)
Make a wedge between the points (x1, y1) and (x2, y2) with a certain width, direction, dash, and color.WedgeLineElement(LineElement element, WedgeLineElement.TYPE type, WedgeLineElement.Direction direction, Color color)
Make a wedge along the given line element.
-
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
-
type
public final WedgeLineElement.TYPE type
The type of the bond (dashed, wedged, not defined).
-
direction
public final WedgeLineElement.Direction direction
The direction indicates which way the wedge gets thicker.
-
-
Constructor Detail
-
WedgeLineElement
public WedgeLineElement(double x1, double y1, double x2, double y2, double width, WedgeLineElement.TYPE type, WedgeLineElement.Direction direction, Color color)
Make a wedge between the points (x1, y1) and (x2, y2) with a certain width, direction, dash, and color.- Parameters:
x1
- the x-coordinate of the first pointy1
- the y-coordinate of the first pointx2
- the x-coordinate of the second pointy2
- the y-coordinate of the second pointwidth
- the width of the wedgetype
- the bond is dashed ,wedged, or "up_or_down", i.e., not defined.direction
- the direction of the thicknesscolor
- the color of the wedge
-
WedgeLineElement
public WedgeLineElement(LineElement element, WedgeLineElement.TYPE type, WedgeLineElement.Direction direction, Color color)
Make a wedge along the given line element.- Parameters:
element
- the line element to use as the basic geometrytype
- if the bond is dashed ,wedged, or "up_or_down", i.e., not defineddirection
- the direction of the thicknesscolor
- the color of the wedge
-
-
Method Detail
-
accept
public void accept(IRenderingVisitor v)
Converts thisTextElement
into widget specific objects.- Specified by:
accept
in interfaceIRenderingElement
- Overrides:
accept
in classLineElement
- Parameters:
v
- Toolkit specific widget factory.
-
-