JAL-1807 includes ?j2sdebug flag and DebugJS._(msg)
[jalviewjs.git] / bin / jalview / appletgui / AnnotationRowFilter.js
index 8b9fe70..aafbcad 100644 (file)
-Clazz.declarePackage ("jalview.appletgui");\r
-Clazz.load (["awt2swing.Panel", "$.Button", "$.Checkbox", "$.Scrollbar", "$.TextField"], "jalview.appletgui.AnnotationRowFilter", ["jalview.util.MessageManager", "java.lang.Float", "java.util.Vector"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.av = null;\r
-this.ap = null;\r
-this.annmap = null;\r
-this.enableSeqAss = false;\r
-this.currentAnnotation = null;\r
-this.adjusting = false;\r
-this.currentColours = null;\r
-this.minColour = null;\r
-this.maxColour = null;\r
-this.seqAssociated = null;\r
-this.thresholdIsMin = null;\r
-this.slider = null;\r
-this.thresholdValue = null;\r
-this.frame = null;\r
-this.ok = null;\r
-this.cancel = null;\r
-this.sliderDragging = false;\r
-Clazz.instantialize (this, arguments);\r
-}, jalview.appletgui, "AnnotationRowFilter", awt2swing.Panel);\r
-Clazz.prepareFields (c$, function () {\r
-this.currentColours =  new awt2swing.Checkbox ();\r
-this.minColour =  new awt2swing.Panel ();\r
-this.maxColour =  new awt2swing.Panel ();\r
-this.seqAssociated =  new awt2swing.Checkbox ();\r
-this.thresholdIsMin =  new awt2swing.Checkbox ();\r
-this.slider =  new awt2swing.Scrollbar (0);\r
-this.thresholdValue =  new awt2swing.TextField (20);\r
-this.ok =  new awt2swing.Button ();\r
-this.cancel =  new awt2swing.Button ();\r
-});\r
-Clazz.makeConstructor (c$, \r
-function (av, ap) {\r
-Clazz.superConstructor (this, jalview.appletgui.AnnotationRowFilter, []);\r
-this.av = av;\r
-this.ap = ap;\r
-}, "jalview.appletgui.AlignViewport,jalview.appletgui.AlignmentPanel");\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-Clazz.superConstructor (this, jalview.appletgui.AnnotationRowFilter, []);\r
-});\r
-Clazz.defineMethod (c$, "getAnnotationItems", \r
-function (isSeqAssociated) {\r
-var list =  new java.util.Vector ();\r
-var index = 1;\r
-var anmap =  Clazz.newIntArray (this.av.getAlignment ().getAlignmentAnnotation ().length, 0);\r
-for (var i = 0; i < this.av.getAlignment ().getAlignmentAnnotation ().length; i++) {\r
-if (this.av.getAlignment ().getAlignmentAnnotation ()[i].sequenceRef == null) {\r
-if (isSeqAssociated) {\r
-continue;\r
-}} else {\r
-this.enableSeqAss = true;\r
-}var label = this.av.getAlignment ().getAlignmentAnnotation ()[i].label;\r
-if (!list.contains (label)) {\r
-anmap[list.size ()] = i;\r
-list.add (label);\r
-} else {\r
-if (!isSeqAssociated) {\r
-anmap[list.size ()] = i;\r
-list.add (label + "_" + (index++));\r
-}}}\r
-this.annmap =  Clazz.newIntArray (list.size (), 0);\r
-System.arraycopy (anmap, 0, this.annmap, 0, this.annmap.length);\r
-return list;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "getSelectedThresholdItem", \r
-function (indexValue) {\r
-var selectedThresholdItem = -1;\r
-if (indexValue == 1) {\r
-selectedThresholdItem = 1;\r
-} else if (indexValue == 2) {\r
-selectedThresholdItem = 0;\r
-}return selectedThresholdItem;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "modelChanged", \r
-function () {\r
-this.seqAssociated.setEnabled (this.enableSeqAss);\r
-});\r
-Clazz.defineMethod (c$, "ok_actionPerformed", \r
-function (e) {\r
-this.updateView ();\r
-this.frame.setVisible (false);\r
-}, "java.awt.event.ActionEvent");\r
-Clazz.defineMethod (c$, "cancel_actionPerformed", \r
-function (e) {\r
-this.reset ();\r
-this.ap.paintAlignment (true);\r
-this.frame.setVisible (false);\r
-}, "java.awt.event.ActionEvent");\r
-Clazz.defineMethod (c$, "thresholdCheck_actionPerformed", \r
-function (e) {\r
-this.updateView ();\r
-}, "java.awt.event.ActionEvent");\r
-Clazz.defineMethod (c$, "annotations_actionPerformed", \r
-function (e) {\r
-this.updateView ();\r
-}, "java.awt.event.ActionEvent");\r
-Clazz.defineMethod (c$, "threshold_actionPerformed", \r
-function (e) {\r
-this.updateView ();\r
-}, "java.awt.event.ActionEvent");\r
-Clazz.defineMethod (c$, "thresholdValue_actionPerformed", \r
-function (e) {\r
-try {\r
-var f = Float.parseFloat (this.thresholdValue.getText ());\r
-this.slider.setValue (Clazz.floatToInt (f * 1000));\r
-this.updateView ();\r
-} catch (ex) {\r
-if (Clazz.exceptionOf (ex, NumberFormatException)) {\r
-} else {\r
-throw ex;\r
-}\r
-}\r
-}, "java.awt.event.ActionEvent");\r
-Clazz.defineMethod (c$, "populateThresholdComboBox", \r
-function (threshold) {\r
-threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_no_thereshold"));\r
-threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_above_thereshold"));\r
-threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_below_thereshold"));\r
-}, "awt2swing.Choice");\r
-Clazz.defineMethod (c$, "getCurrentAnnotation", \r
-function () {\r
-return this.currentAnnotation;\r
-});\r
-Clazz.defineMethod (c$, "setCurrentAnnotation", \r
-function (currentAnnotation) {\r
-this.currentAnnotation = currentAnnotation;\r
-}, "jalview.datamodel.AlignmentAnnotation");\r
-});\r
+Clazz.declarePackage ("jalview.appletgui");
+Clazz.load (["awt2swing.Panel", "$.Button", "$.Checkbox", "$.Scrollbar", "$.TextField"], "jalview.appletgui.AnnotationRowFilter", ["jalview.util.MessageManager", "java.lang.Float", "java.util.Vector"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.av = null;
+this.ap = null;
+this.annmap = null;
+this.enableSeqAss = false;
+this.currentAnnotation = null;
+this.adjusting = false;
+this.currentColours = null;
+this.minColour = null;
+this.maxColour = null;
+this.seqAssociated = null;
+this.thresholdIsMin = null;
+this.slider = null;
+this.thresholdValue = null;
+this.frame = null;
+this.ok = null;
+this.cancel = null;
+this.sliderDragging = false;
+Clazz.instantialize (this, arguments);
+}, jalview.appletgui, "AnnotationRowFilter", awt2swing.Panel);
+Clazz.prepareFields (c$, function () {
+this.currentColours =  new awt2swing.Checkbox ();
+this.minColour =  new awt2swing.Panel ();
+this.maxColour =  new awt2swing.Panel ();
+this.seqAssociated =  new awt2swing.Checkbox ();
+this.thresholdIsMin =  new awt2swing.Checkbox ();
+this.slider =  new awt2swing.Scrollbar (0);
+this.thresholdValue =  new awt2swing.TextField (20);
+this.ok =  new awt2swing.Button ();
+this.cancel =  new awt2swing.Button ();
+});
+Clazz.makeConstructor (c$, 
+function (av, ap) {
+Clazz.superConstructor (this, jalview.appletgui.AnnotationRowFilter, []);
+this.av = av;
+this.ap = ap;
+}, "jalview.appletgui.AlignViewport,jalview.appletgui.AlignmentPanel");
+Clazz.makeConstructor (c$, 
+function () {
+Clazz.superConstructor (this, jalview.appletgui.AnnotationRowFilter, []);
+});
+Clazz.defineMethod (c$, "getAnnotationItems", 
+function (isSeqAssociated) {
+var list =  new java.util.Vector ();
+var index = 1;
+var anmap =  Clazz.newIntArray (this.av.getAlignment ().getAlignmentAnnotation ().length, 0);
+for (var i = 0; i < this.av.getAlignment ().getAlignmentAnnotation ().length; i++) {
+if (this.av.getAlignment ().getAlignmentAnnotation ()[i].sequenceRef == null) {
+if (isSeqAssociated) {
+continue;
+}} else {
+this.enableSeqAss = true;
+}var label = this.av.getAlignment ().getAlignmentAnnotation ()[i].label;
+if (!list.contains (label)) {
+anmap[list.size ()] = i;
+list.add (label);
+} else {
+if (!isSeqAssociated) {
+anmap[list.size ()] = i;
+list.add (label + "_" + (index++));
+}}}
+this.annmap =  Clazz.newIntArray (list.size (), 0);
+System.arraycopy (anmap, 0, this.annmap, 0, this.annmap.length);
+return list;
+}, "~B");
+Clazz.defineMethod (c$, "getSelectedThresholdItem", 
+function (indexValue) {
+var selectedThresholdItem = -1;
+if (indexValue == 1) {
+selectedThresholdItem = 1;
+} else if (indexValue == 2) {
+selectedThresholdItem = 0;
+}return selectedThresholdItem;
+}, "~N");
+Clazz.defineMethod (c$, "modelChanged", 
+function () {
+this.seqAssociated.setEnabled (this.enableSeqAss);
+});
+Clazz.defineMethod (c$, "ok_actionPerformed", 
+function (e) {
+this.updateView ();
+this.frame.setVisible (false);
+}, "java.awt.event.ActionEvent");
+Clazz.defineMethod (c$, "cancel_actionPerformed", 
+function (e) {
+this.reset ();
+this.ap.paintAlignment (true);
+this.frame.setVisible (false);
+}, "java.awt.event.ActionEvent");
+Clazz.defineMethod (c$, "thresholdCheck_actionPerformed", 
+function (e) {
+this.updateView ();
+}, "java.awt.event.ActionEvent");
+Clazz.defineMethod (c$, "annotations_actionPerformed", 
+function (e) {
+this.updateView ();
+}, "java.awt.event.ActionEvent");
+Clazz.defineMethod (c$, "threshold_actionPerformed", 
+function (e) {
+this.updateView ();
+}, "java.awt.event.ActionEvent");
+Clazz.defineMethod (c$, "thresholdValue_actionPerformed", 
+function (e) {
+try {
+var f = Float.parseFloat (this.thresholdValue.getText ());
+this.slider.setValue (Clazz.floatToInt (f * 1000));
+this.updateView ();
+} catch (ex) {
+if (Clazz.exceptionOf (ex, NumberFormatException)) {
+} else {
+throw ex;
+}
+}
+}, "java.awt.event.ActionEvent");
+Clazz.defineMethod (c$, "populateThresholdComboBox", 
+function (threshold) {
+threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_no_thereshold"));
+threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_above_thereshold"));
+threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_below_thereshold"));
+}, "awt2swing.Choice");
+Clazz.defineMethod (c$, "getCurrentAnnotation", 
+function () {
+return this.currentAnnotation;
+});
+Clazz.defineMethod (c$, "setCurrentAnnotation", 
+function (currentAnnotation) {
+this.currentAnnotation = currentAnnotation;
+}, "jalview.datamodel.AlignmentAnnotation");
+});