JAL-1807 Bob's JalviewJS prototype first commit
[jalviewjs.git] / bin / jalview / datamodel / GraphLine.js
1 Clazz.declarePackage ("jalview.datamodel");\r
2 Clazz.load (["java.awt.Color"], "jalview.datamodel.GraphLine", null, function () {\r
3 c$ = Clazz.decorateAsClass (function () {\r
4 this.value = 0;\r
5 this.label = "";\r
6 this.colour = null;\r
7 this.displayed = true;\r
8 Clazz.instantialize (this, arguments);\r
9 }, jalview.datamodel, "GraphLine");\r
10 Clazz.prepareFields (c$, function () {\r
11 this.colour = java.awt.Color.black;\r
12 });\r
13 Clazz.makeConstructor (c$, \r
14 function (value, label, col) {\r
15 this.value = value;\r
16 if (label != null) {\r
17 this.label = label;\r
18 }if (col != null) {\r
19 this.colour = col;\r
20 }}, "~N,~S,java.awt.Color");\r
21 Clazz.makeConstructor (c$, \r
22 function (from) {\r
23 if (from != null) {\r
24 this.value = from.value;\r
25 this.label =  String.instantialize (from.label);\r
26 this.colour = from.colour;\r
27 this.displayed = from.displayed;\r
28 }}, "jalview.datamodel.GraphLine");\r
29 Clazz.overrideMethod (c$, "equals", \r
30 function (obj) {\r
31 if (obj != null && Clazz.instanceOf (obj, jalview.datamodel.GraphLine)) {\r
32 var other = obj;\r
33 return this.displayed == other.displayed && this.value == other.value && (this.colour != null ? (other.colour != null && other.colour.equals (this.colour)) : other.colour == null) && (this.label != null ? (other.label != null && other.label.equals (this.label)) : other.label == null);\r
34 }return false;\r
35 }, "~O");\r
36 });\r