Class WedgeLineElement
java.lang.Object
org.openscience.cdk.renderer.elements.LineElement
org.openscience.cdk.renderer.elements.WedgeLineElement
- All Implemented Interfaces:
IRenderingElement
A 'wedge' is a triangle aligned along a bond that indicates stereochemistry.
It can be dashed or not to indicate up and down.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum'toFirst' means that the wedge gets thicker in the direction of the first point in the line.static enumIf the bond is dashed ,wedged, or "up_or_down", i.e., not defined.Nested classes/interfaces inherited from class LineElement
LineElement.LineType -
Field Summary
FieldsModifier and TypeFieldDescriptionThe direction indicates which way the wedge gets thicker.final WedgeLineElement.TYPEThe type of the bond (dashed, wedged, not defined).Fields inherited from class LineElement
color, firstPointX, firstPointY, secondPointX, secondPointY, widthModifier and TypeFieldDescriptionfinal ColorThe color of the line.final doubleThe x-coordinate of the first point.final doubleThe y-coordinate of the first point.final doubleThe x-coordinate of the second point.final doubleThe y-coordinate of the second point.final doubleThe width of the line. -
Constructor Summary
ConstructorsConstructorDescriptionWedgeLineElement(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
Methods inherited from class LineElement
toArea, toArea
-
Field Details
-
type
The type of the bond (dashed, wedged, not defined). -
direction
The direction indicates which way the wedge gets thicker.
-
-
Constructor Details
-
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 Details
-
accept
Converts thisTextElementinto widget specific objects.- Specified by:
acceptin interfaceIRenderingElement- Overrides:
acceptin classLineElement- Parameters:
v- Toolkit specific widget factory.
-