JAL-1807 Bob's JalviewJS prototype first commit
[jalviewjs.git] / site / j2s / jalview / structure / AtomSpec.js
1 Clazz.declarePackage ("jalview.structure");\r
2 c$ = Clazz.decorateAsClass (function () {\r
3 this.pdbFile = null;\r
4 this.chain = null;\r
5 this.pdbResNum = 0;\r
6 this.atomIndex = 0;\r
7 Clazz.instantialize (this, arguments);\r
8 }, jalview.structure, "AtomSpec");\r
9 Clazz.makeConstructor (c$, \r
10 function (pdbFile, chain, resNo, atomNo) {\r
11 this.pdbFile = pdbFile;\r
12 this.chain = chain;\r
13 this.pdbResNum = resNo;\r
14 this.atomIndex = atomNo;\r
15 }, "~S,~S,~N,~N");\r
16 Clazz.defineMethod (c$, "getPdbFile", \r
17 function () {\r
18 return this.pdbFile;\r
19 });\r
20 Clazz.defineMethod (c$, "getChain", \r
21 function () {\r
22 return this.chain;\r
23 });\r
24 Clazz.defineMethod (c$, "getPdbResNum", \r
25 function () {\r
26 return this.pdbResNum;\r
27 });\r
28 Clazz.defineMethod (c$, "getAtomIndex", \r
29 function () {\r
30 return this.atomIndex;\r
31 });\r
32 Clazz.overrideMethod (c$, "toString", \r
33 function () {\r
34 return "pdbFile: " + this.pdbFile + ", chain: " + this.chain + ", res: " + this.pdbResNum + ", atom: " + this.atomIndex;\r
35 });\r