Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated for IBond.Stereo

  • Loading branch information...
commit d584378dc24627a9e46b091fde2a1a5615b692a9 1 parent e91ac9a
@egonw egonw authored
View
19 src/main/org/openscience/cdk/renderer/generators/BasicBondGenerator.java
@@ -19,17 +19,12 @@
*/
package org.openscience.cdk.renderer.generators;
-import static org.openscience.cdk.CDKConstants.STEREO_BOND_DOWN;
-import static org.openscience.cdk.CDKConstants.STEREO_BOND_DOWN_INV;
-import static org.openscience.cdk.CDKConstants.STEREO_BOND_NONE;
-import static org.openscience.cdk.CDKConstants.STEREO_BOND_UNDEFINED;
-import static org.openscience.cdk.CDKConstants.STEREO_BOND_UP_INV;
-
import java.awt.Color;
import javax.vecmath.Point2d;
import javax.vecmath.Vector2d;
+import org.openscience.cdk.CDKConstants;
import org.openscience.cdk.geometry.GeometryTools;
import org.openscience.cdk.graph.ConnectivityChecker;
import org.openscience.cdk.interfaces.IAtom;
@@ -288,12 +283,14 @@ public LineElement generateInnerElement(
private IRenderingElement generateStereoElement(
IBond bond, RendererModel model) {
- int stereo = bond.getStereo();
+ IBond.Stereo stereo = bond.getStereo();
boolean dashed = false;
Direction dir = Direction.toSecond;
- if (stereo == STEREO_BOND_DOWN || stereo == STEREO_BOND_DOWN_INV)
+ if (stereo == IBond.Stereo.DOWN ||
+ stereo == IBond.Stereo.DOWN_INVERTED)
dashed = true;
- if (stereo == STEREO_BOND_DOWN_INV || stereo == STEREO_BOND_UP_INV)
+ if (stereo == IBond.Stereo.DOWN_INVERTED ||
+ stereo == IBond.Stereo.UP_INVERTED)
dir = Direction.toFirst;
IRenderingElement base = generateBondElement(
@@ -311,8 +308,8 @@ public boolean isSingle(IBond bond) {
}
public boolean isStereoBond(IBond bond) {
- return bond.getStereo() != STEREO_BOND_NONE
- && bond.getStereo() != STEREO_BOND_UNDEFINED;
+ return bond.getStereo() != IBond.Stereo.NONE
+ && bond.getStereo() != (IBond.Stereo)CDKConstants.UNSET;
}
public boolean bindsHydrogen(IBond bond) {
Please sign in to comment.
Something went wrong with that request. Please try again.