JAL-1807 includes ?j2sdebug flag and DebugJS._(msg)
[jalviewjs.git] / bin / MCview / Bond.js
1 Clazz.declarePackage ("MCview");
2 Clazz.load (["java.awt.Color"], "MCview.Bond", null, function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.start = null;
5 this.end = null;
6 this.startCol = null;
7 this.endCol = null;
8 this.at1 = null;
9 this.at2 = null;
10 Clazz.instantialize (this, arguments);
11 }, MCview, "Bond");
12 Clazz.prepareFields (c$, function () {
13 this.startCol = java.awt.Color.lightGray;
14 this.endCol = java.awt.Color.lightGray;
15 });
16 Clazz.makeConstructor (c$, 
17 function (at1, at2) {
18 this.start =  Clazz.newFloatArray (-1, [at1.x, at1.y, at1.z]);
19 this.end =  Clazz.newFloatArray (-1, [at2.x, at2.y, at2.z]);
20 this.startCol = at1.color;
21 this.endCol = at2.color;
22 this.at1 = at1;
23 this.at2 = at2;
24 }, "MCview.Atom,MCview.Atom");
25 Clazz.defineMethod (c$, "translate", 
26 function (x, y, z) {
27 this.start[0] = this.start[0] + x;
28 this.end[0] = this.end[0] + x;
29 this.start[1] = this.start[1] + y;
30 this.end[1] = this.end[1] + y;
31 this.start[2] = this.start[2] + z;
32 this.end[2] = this.end[2] + z;
33 }, "~N,~N,~N");
34 });