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