Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / jalview / datamodel / GraphLine.js
1 Clazz.declarePackage ("jalview.datamodel");
2 Clazz.load (["java.awt.Color"], "jalview.datamodel.GraphLine", null, function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.value = 0;
5 this.label = "";
6 this.colour = null;
7 this.displayed = true;
8 Clazz.instantialize (this, arguments);
9 }, jalview.datamodel, "GraphLine");
10 Clazz.prepareFields (c$, function () {
11 this.colour = java.awt.Color.black;
12 });
13 Clazz.makeConstructor (c$, 
14 function (value, label, col) {
15 this.value = value;
16 if (label != null) {
17 this.label = label;
18 }if (col != null) {
19 this.colour = col;
20 }}, "~N,~S,java.awt.Color");
21 Clazz.makeConstructor (c$, 
22 function (from) {
23 if (from != null) {
24 this.value = from.value;
25 this.label =  String.instantialize (from.label);
26 this.colour = from.colour;
27 this.displayed = from.displayed;
28 }}, "jalview.datamodel.GraphLine");
29 Clazz.overrideMethod (c$, "equals", 
30 function (obj) {
31 if (obj != null && Clazz.instanceOf (obj, jalview.datamodel.GraphLine)) {
32 var other = obj;
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);
34 }return false;
35 }, "~O");
36 });