JAL-1807 test
[jalviewjs.git] / bin / jalview / datamodel / SequenceNode.js
1 Clazz.declarePackage ("jalview.datamodel");
2 Clazz.load (["jalview.datamodel.BinaryNode", "java.awt.Color"], "jalview.datamodel.SequenceNode", null, function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.dist = 0;
5 this.count = 0;
6 this.height = 0;
7 this.ycount = 0;
8 this.color = null;
9 this.dummy = false;
10 this.placeholder = false;
11 Clazz.instantialize (this, arguments);
12 }, jalview.datamodel, "SequenceNode", jalview.datamodel.BinaryNode);
13 Clazz.prepareFields (c$, function () {
14 this.color = java.awt.Color.black;
15 });
16 Clazz.makeConstructor (c$, 
17 function (val, parent, dist, name) {
18 Clazz.superConstructor (this, jalview.datamodel.SequenceNode, [val, parent, name]);
19 this.dist = dist;
20 }, "~O,jalview.datamodel.SequenceNode,~N,~S");
21 Clazz.makeConstructor (c$, 
22 function (val, parent, name, dist, bootstrap, dummy) {
23 Clazz.superConstructor (this, jalview.datamodel.SequenceNode, [val, parent, name]);
24 this.dist = dist;
25 this.bootstrap = bootstrap;
26 this.dummy = dummy;
27 }, "~O,jalview.datamodel.SequenceNode,~S,~N,~N,~B");
28 Clazz.defineMethod (c$, "isDummy", 
29 function () {
30 return this.dummy;
31 });
32 Clazz.defineMethod (c$, "isPlaceholder", 
33 function () {
34 return this.placeholder;
35 });
36 Clazz.defineMethod (c$, "setDummy", 
37 function (newstate) {
38 var oldstate = this.dummy;
39 this.dummy = newstate;
40 return oldstate;
41 }, "~B");
42 Clazz.defineMethod (c$, "setPlaceholder", 
43 function (Placeholder) {
44 this.placeholder = Placeholder;
45 }, "~B");
46 Clazz.defineMethod (c$, "AscendTree", 
47 function () {
48 var c = this;
49 do {
50 c = c.parent ();
51 } while ((c != null) && c.dummy);
52 return c;
53 });
54 Clazz.defineMethod (c$, "isSequenceLabel", 
55 function () {
56 if (this.name != null && this.name.length > 0) {
57 for (var c = 0, s = this.name.length; c < s; c++) {
58 var q = this.name.charAt (c);
59 if ('0' <= q && q <= '9') continue;
60 return true;
61 }
62 }return false;
63 });
64 });