+ for (int i = 0; i < bonds.size(); i++) {\r
+ Bond tmpBond = (Bond) bonds.elementAt(i);\r
+\r
+ xstart = (int) (((tmpBond.start[0] - centre[0]) * scale) +\r
+ (getWidth() / 2));\r
+ ystart = (int) (((tmpBond.start[1] - centre[1]) * scale) +\r
+ (getHeight() / 2));\r
+\r
+ xend = (int) (((tmpBond.end[0] - centre[0]) * scale) +\r
+ (getWidth() / 2));\r
+ yend = (int) (((tmpBond.end[1] - centre[1]) * scale) +\r
+ (getHeight() / 2));\r
+\r
+ xmid = (xend + xstart) / 2;\r
+ ymid = (yend + ystart) / 2;\r
+\r
+ if (depthcue && !bymolecule) {\r
+ if (tmpBond.start[2] < (centre[2] - (maxwidth / 6))) {\r
+ g.setColor(tmpBond.startCol.darker().darker());\r
+ drawLine(g, xstart, ystart, xmid, ymid);\r
+\r
+ g.setColor(tmpBond.endCol.darker().darker());\r
+ drawLine(g, xmid, ymid, xend, yend);\r
+ } else if (tmpBond.start[2] < (centre[2] + (maxwidth / 6))) {\r
+ g.setColor(tmpBond.startCol.darker());\r
+ drawLine(g, xstart, ystart, xmid, ymid);\r
+\r
+ g.setColor(tmpBond.endCol.darker());\r
+ drawLine(g, xmid, ymid, xend, yend);\r
+ } else {\r
+ g.setColor(tmpBond.startCol);\r
+ drawLine(g, xstart, ystart, xmid, ymid);\r
+\r
+ g.setColor(tmpBond.endCol);\r
+ drawLine(g, xmid, ymid, xend, yend);\r
+ }\r
+ } else if (depthcue && bymolecule) {\r
+ if (tmpBond.start[2] < (centre[2] - (maxwidth / 6))) {\r
+ g.setColor(Color.green.darker().darker());\r
+ drawLine(g, xstart, ystart, xend, yend);\r
+ } else if (tmpBond.start[2] < (centre[2] + (maxwidth / 6))) {\r
+ g.setColor(Color.green.darker());\r
+ drawLine(g, xstart, ystart, xend, yend);\r
+ } else {\r
+ g.setColor(Color.green);\r
+ drawLine(g, xstart, ystart, xend, yend);\r
+ }\r
+ } else if (!depthcue && !bymolecule) {\r
+ g.setColor(tmpBond.startCol);\r
+ drawLine(g, xstart, ystart, xmid, ymid);\r
+ g.setColor(tmpBond.endCol);\r
+ drawLine(g, xmid, ymid, xend, yend);\r
+ } else {\r
+ drawLine(g, xstart, ystart, xend, yend);\r
+ }\r
+ }\r
+ }\r