JAL-1807 includes ?j2sdebug flag and DebugJS._(msg)
[jalviewjs.git] / bin / jalview / appletgui / FeatureSettings.js
1 Clazz.declarePackage ("jalview.appletgui");
2 Clazz.load (["awt2swing.Checkbox", "$.Panel", "jalview.api.FeatureSettingsControllerI", "java.awt.event.ActionListener", "$.AdjustmentListener", "$.ItemListener", "$.MouseListener", "$.MouseMotionListener"], "jalview.appletgui.FeatureSettings", ["awt2swing.Button", "$.Frame", "$.Label", "$.MenuItem", "$.PopupMenu", "$.ScrollPane", "$.Scrollbar", "jalview.appletgui.FeatureColourChooser", "$.UserDefinedColours", "jalview.bin.JalviewLite", "jalview.schemes.GraduatedColor", "jalview.util.MessageManager", "java.awt.BorderLayout", "$.Color", "$.Font", "$.GridLayout", "$.Toolkit", "java.awt.event.WindowAdapter", "java.lang.Boolean", "$.Error", "java.util.Vector"], function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.fr = null;
5 this.ap = null;
6 this.av = null;
7 this.frame = null;
8 this.groupPanel = null;
9 this.featurePanel = null;
10 this.scrollPane = null;
11 this.linkImage = null;
12 this.transparency = null;
13 this.groupItemListener = null;
14 this.selectedCheck = null;
15 this.dragging = false;
16 if (!Clazz.isClassDefined ("jalview.appletgui.FeatureSettings.MyCheckbox")) {
17 jalview.appletgui.FeatureSettings.$FeatureSettings$MyCheckbox$ ();
18 }
19 Clazz.instantialize (this, arguments);
20 }, jalview.appletgui, "FeatureSettings", awt2swing.Panel, [java.awt.event.ItemListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.ActionListener, java.awt.event.AdjustmentListener, jalview.api.FeatureSettingsControllerI]);
21 Clazz.prepareFields (c$, function () {
22 this.featurePanel =  new awt2swing.Panel ();
23 this.groupItemListener = ((Clazz.isClassDefined ("jalview.appletgui.FeatureSettings$1") ? 0 : jalview.appletgui.FeatureSettings.$FeatureSettings$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.FeatureSettings$1, this, null));
24 });
25 Clazz.makeConstructor (c$, 
26 function (ap) {
27 Clazz.superConstructor (this, jalview.appletgui.FeatureSettings, []);
28 this.ap = ap;
29 this.av = ap.av;
30 ap.av.featureSettings = this;
31 this.fr = ap.seqPanel.seqCanvas.getFeatureRenderer ();
32 this.transparency =  new awt2swing.Scrollbar (0, 100 - Clazz.floatToInt (this.fr.getTransparency () * 100), 1, 1, 100);
33 if (this.fr.isTransparencyAvailable ()) {
34 this.transparency.addAdjustmentListener (this);
35 } else {
36 this.transparency.setEnabled (false);
37 }var url = this.getClass ().getResource ("/images/link.gif");
38 if (url != null) {
39 this.linkImage = java.awt.Toolkit.getDefaultToolkit ().getImage (url);
40 }if (this.av.isShowSequenceFeatures () || !this.fr.hasRenderOrder ()) {
41 this.fr.findAllFeatures (true);
42 }this.discoverAllFeatureData ();
43 this.setLayout ( new java.awt.BorderLayout ());
44 this.scrollPane =  new awt2swing.ScrollPane ();
45 this.scrollPane.add (this.featurePanel);
46 if (this.fr.getAllFeatureColours () != null && this.fr.getAllFeatureColours ().size () > 0) {
47 this.add (this.scrollPane, "Center");
48 }var invert =  new awt2swing.Button ("Invert Selection");
49 invert.addActionListener (this);
50 var lowerPanel =  new awt2swing.Panel ( new java.awt.GridLayout (2, 1, 5, 10));
51 lowerPanel.add (invert);
52 var tPanel =  new awt2swing.Panel ( new java.awt.BorderLayout ());
53 if (this.fr.isTransparencyAvailable ()) {
54 tPanel.add (this.transparency, "Center");
55 tPanel.add ( new awt2swing.Label ("Transparency"), "East");
56 } else {
57 tPanel.add ( new awt2swing.Label ("Transparency not available in this web browser"), "Center");
58 }lowerPanel.add (tPanel, "South");
59 this.add (lowerPanel, "South");
60 if (this.groupPanel != null) {
61 this.groupPanel.setLayout ( new java.awt.GridLayout (Clazz.doubleToInt ((this.fr.getFeatureGroupsSize ()) / 4) + 1, 4));
62 this.groupPanel.validate ();
63 this.add (this.groupPanel, "North");
64 }this.frame =  new awt2swing.Frame ();
65 this.frame.add (this);
66 var me = this;
67 this.frame.addWindowListener (((Clazz.isClassDefined ("jalview.appletgui.FeatureSettings$2") ? 0 : jalview.appletgui.FeatureSettings.$FeatureSettings$2$ ()), Clazz.innerTypeInstance (jalview.appletgui.FeatureSettings$2, this, Clazz.cloneFinals ("me", me))));
68 var height = this.featurePanel.getComponentCount () * 50 + 60;
69 height = Math.max (200, height);
70 height = Math.min (400, height);
71 var width = 300;
72 jalview.bin.JalviewLite.addFrame (this.frame, jalview.util.MessageManager.getString ("label.feature_settings"), width, height);
73 }, "jalview.appletgui.AlignmentPanel");
74 Clazz.defineMethod (c$, "PaintComponent", 
75 function (g) {
76 g.setColor (java.awt.Color.black);
77 g.drawString (jalview.util.MessageManager.getString ("label.no_features_added_to_this_alignment"), 10, 20);
78 g.drawString (jalview.util.MessageManager.getString ("label.features_can_be_added_from_searches_1"), 10, 40);
79 g.drawString (jalview.util.MessageManager.getString ("label.features_can_be_added_from_searches_2"), 10, 60);
80 }, "java.awt.Graphics");
81 Clazz.defineMethod (c$, "popupSort", 
82 function (check, minmax, x, y) {
83 var type = check.type;
84 var typeCol = this.fr.getFeatureStyle (type);
85 var men =  new awt2swing.PopupMenu (jalview.util.MessageManager.formatMessage ("label.settings_for_type",  Clazz.newArray (-1, [type])));
86 var scr =  new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.sort_by_score"));
87 men.add (scr);
88 var me = this;
89 scr.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.FeatureSettings$3") ? 0 : jalview.appletgui.FeatureSettings.$FeatureSettings$3$ ()), Clazz.innerTypeInstance (jalview.appletgui.FeatureSettings$3, this, Clazz.cloneFinals ("me", me, "type", type))));
90 var dens =  new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.sort_by_density"));
91 dens.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.FeatureSettings$4") ? 0 : jalview.appletgui.FeatureSettings.$FeatureSettings$4$ ()), Clazz.innerTypeInstance (jalview.appletgui.FeatureSettings$4, this, Clazz.cloneFinals ("me", me, "type", type))));
92 men.add (dens);
93 if (minmax != null) {
94 var typeMinMax = minmax.get (type);
95 if (typeMinMax != null && (typeMinMax)[0] != null) {
96 var mxcol =  new awt2swing.MenuItem ((Clazz.instanceOf (typeCol, java.awt.Color)) ? "Graduated Colour" : "Single Colour");
97 men.add (mxcol);
98 mxcol.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.FeatureSettings$5") ? 0 : jalview.appletgui.FeatureSettings.$FeatureSettings$5$ ()), Clazz.innerTypeInstance (jalview.appletgui.FeatureSettings$5, this, Clazz.cloneFinals ("typeCol", typeCol, "me", me, "type", type, "check", check))));
99 }}this.featurePanel.add (men);
100 men.show (this.featurePanel, x, y);
101 }, "jalview.appletgui.FeatureSettings.MyCheckbox,java.util.Hashtable,~N,~N");
102 Clazz.overrideMethod (c$, "discoverAllFeatureData", 
103 function () {
104 if (this.fr.getAllFeatureColours () != null && this.fr.getAllFeatureColours ().size () > 0) {
105 this.rebuildGroups ();
106 }this.resetTable (false);
107 });
108 Clazz.defineMethod (c$, "rebuildGroups", 
109 function () {
110 var rdrw = false;
111 if (this.groupPanel == null) {
112 this.groupPanel =  new awt2swing.Panel ();
113 } else {
114 rdrw = true;
115 this.groupPanel.removeAll ();
116 }for (var group, $group = this.fr.getFeatureGroups ().iterator (); $group.hasNext () && ((group = $group.next ()) || true);) {
117 var vis = this.fr.checkGroupVisibility (group, false);
118 var check = Clazz.innerTypeInstance (jalview.appletgui.FeatureSettings.MyCheckbox, this, null, group, vis, (this.fr.featureLinks != null && this.fr.featureLinks.containsKey (group)));
119 check.addMouseListener (this);
120 check.setFont ( new java.awt.Font ("Serif", 1, 12));
121 check.addItemListener (this.groupItemListener);
122 check.setVisible (vis);
123 this.groupPanel.add (check);
124 }
125 if (rdrw) {
126 this.groupPanel.validate ();
127 }});
128 Clazz.defineMethod (c$, "resetTable", 
129 function (groupsChanged) {
130 var tmpfeatures;
131 var group = null;
132 var type;
133 var visibleChecks =  new java.util.Vector ();
134 var alignment = this.av.getAlignment ();
135 for (var i = 0; i < alignment.getHeight (); i++) {
136 if (alignment.getSequenceAt (i).getSequenceFeatures () == null) {
137 continue;
138 }tmpfeatures = alignment.getSequenceAt (i).getSequenceFeatures ();
139 var index = 0;
140 while (index < tmpfeatures.length) {
141 group = tmpfeatures[index].featureGroup;
142 if (group == null || this.fr.checkGroupVisibility (group, true)) {
143 type = tmpfeatures[index].getType ();
144 if (!visibleChecks.contains (type)) {
145 visibleChecks.addElement (type);
146 }}index++;
147 }
148 }
149 var comps;
150 var cSize = this.featurePanel.getComponentCount ();
151 var check;
152 for (var i = 0; i < cSize; i++) {
153 comps = this.featurePanel.getComponents ();
154 check = comps[i];
155 if (!visibleChecks.contains (check.type)) {
156 this.featurePanel.remove (i);
157 cSize--;
158 i--;
159 }}
160 if (this.fr.getRenderOrder () != null) {
161 var rol = this.fr.getRenderOrder ();
162 for (var ro = rol.size () - 1; ro > -1; ro--) {
163 var item = rol.get (ro);
164 if (!visibleChecks.contains (item)) {
165 continue;
166 }visibleChecks.removeElement (item);
167 this.addCheck (false, item);
168 }
169 }var en = visibleChecks.elements ();
170 while (en.hasMoreElements ()) {
171 this.addCheck (groupsChanged, en.nextElement ().toString ());
172 }
173 this.featurePanel.setLayout ( new java.awt.GridLayout (this.featurePanel.getComponentCount (), 1, 10, 5));
174 this.featurePanel.validate ();
175 if (this.scrollPane != null) {
176 this.scrollPane.validate ();
177 }this.itemStateChanged (null);
178 }, "~B");
179 Clazz.defineMethod (c$, "addCheck", 
180 function (groupsChanged, type) {
181 var addCheck;
182 var comps = this.featurePanel.getComponents ();
183 var check;
184 addCheck = true;
185 for (var i = 0; i < this.featurePanel.getComponentCount (); i++) {
186 check = comps[i];
187 if (check.type.equals (type)) {
188 addCheck = false;
189 break;
190 }}
191 if (addCheck) {
192 var selected = false;
193 if (groupsChanged || this.av.getFeaturesDisplayed ().isVisible (type)) {
194 selected = true;
195 }check = Clazz.innerTypeInstance (jalview.appletgui.FeatureSettings.MyCheckbox, this, null, type, selected, (this.fr.featureLinks != null && this.fr.featureLinks.containsKey (type)), this.fr.getFeatureStyle (type));
196 check.addMouseListener (this);
197 check.addMouseMotionListener (this);
198 check.addItemListener (this);
199 if (groupsChanged) {
200 this.featurePanel.add (check, 0);
201 } else {
202 this.featurePanel.add (check);
203 }}}, "~B,~S");
204 Clazz.overrideMethod (c$, "actionPerformed", 
205 function (evt) {
206 for (var i = 0; i < this.featurePanel.getComponentCount (); i++) {
207 var check = this.featurePanel.getComponent (i);
208 check.setState (!check.getState ());
209 }
210 this.selectionChanged ();
211 }, "java.awt.event.ActionEvent");
212 Clazz.overrideMethod (c$, "itemStateChanged", 
213 function (evt) {
214 this.selectionChanged ();
215 }, "java.awt.event.ItemEvent");
216 Clazz.defineMethod (c$, "selectionChanged", 
217 function () {
218 var comps = this.featurePanel.getComponents ();
219 var cSize = comps.length;
220 var tmp =  Clazz.newArray (cSize, 3, null);
221 var tmpSize = 0;
222 for (var i = 0; i < cSize; i++) {
223 var check = comps[i];
224 tmp[tmpSize][0] = check.type;
225 tmp[tmpSize][1] = this.fr.getFeatureStyle (check.type);
226 tmp[tmpSize][2] =  new Boolean (check.getState ());
227 tmpSize++;
228 }
229 var data =  Clazz.newArray (tmpSize, 3, null);
230 System.arraycopy (tmp, 0, data, 0, tmpSize);
231 this.fr.setFeaturePriority (data);
232 this.ap.paintAlignment (true);
233 });
234 Clazz.overrideMethod (c$, "mousePressed", 
235 function (evt) {
236 this.selectedCheck = evt.getSource ();
237 if (this.fr.featureLinks != null && this.fr.featureLinks.containsKey (this.selectedCheck.type)) {
238 if (evt.getX () > this.selectedCheck.stringWidth + 20) {
239 evt.consume ();
240 }}}, "java.awt.event.MouseEvent");
241 Clazz.overrideMethod (c$, "mouseDragged", 
242 function (evt) {
243 if ((evt.getSource ()).getParent () !== this.featurePanel) {
244 return;
245 }this.dragging = true;
246 }, "java.awt.event.MouseEvent");
247 Clazz.overrideMethod (c$, "mouseReleased", 
248 function (evt) {
249 if ((evt.getSource ()).getParent () !== this.featurePanel) {
250 return;
251 }var comp = null;
252 var target = null;
253 var height = evt.getY () + evt.getComponent ().getLocation ().y;
254 if (height > this.featurePanel.getSize ().height) {
255 comp = this.featurePanel.getComponent (this.featurePanel.getComponentCount () - 1);
256 } else if (height < 0) {
257 comp = this.featurePanel.getComponent (0);
258 } else {
259 comp = this.featurePanel.getComponentAt (evt.getX (), evt.getY () + evt.getComponent ().getLocation ().y);
260 }if (comp != null && Clazz.instanceOf (comp, awt2swing.Checkbox)) {
261 target = comp;
262 }if (this.selectedCheck != null && target != null && this.selectedCheck !== target) {
263 var targetIndex = -1;
264 for (var i = 0; i < this.featurePanel.getComponentCount (); i++) {
265 if (target === this.featurePanel.getComponent (i)) {
266 targetIndex = i;
267 break;
268 }}
269 this.featurePanel.remove (this.selectedCheck);
270 this.featurePanel.add (this.selectedCheck, targetIndex);
271 this.featurePanel.validate ();
272 this.itemStateChanged (null);
273 }}, "java.awt.event.MouseEvent");
274 Clazz.defineMethod (c$, "setUserColour", 
275 function (feature, originalColour) {
276 if (Clazz.instanceOf (originalColour, java.awt.Color) || Clazz.instanceOf (originalColour, jalview.schemes.GraduatedColor)) {
277 this.fr.setColour (feature, originalColour);
278 } else {
279 throw  new Error (jalview.util.MessageManager.getString ("error.implementation_error_unsupported_feature_colour_object"));
280 }this.refreshTable ();
281 }, "~S,~O");
282 Clazz.defineMethod (c$, "refreshTable", 
283 function () {
284 this.featurePanel.removeAll ();
285 this.resetTable (false);
286 this.ap.paintAlignment (true);
287 });
288 Clazz.overrideMethod (c$, "mouseEntered", 
289 function (evt) {
290 }, "java.awt.event.MouseEvent");
291 Clazz.overrideMethod (c$, "mouseExited", 
292 function (evt) {
293 }, "java.awt.event.MouseEvent");
294 Clazz.overrideMethod (c$, "mouseClicked", 
295 function (evt) {
296 var check = evt.getSource ();
297 if ((evt.getModifiers () & 4) != 0) {
298 this.popupSort (check, this.fr.getMinMax (), evt.getX (), evt.getY ());
299 }if (this.fr.featureLinks != null && this.fr.featureLinks.containsKey (check.type)) {
300 if (evt.getX () > check.stringWidth + 20) {
301 evt.consume ();
302 var link = this.fr.featureLinks.get (check.type).toString ();
303 this.ap.alignFrame.showURL (link.substring (link.indexOf ("|") + 1), link.substring (0, link.indexOf ("|")));
304 }}if (check.getParent () !== this.featurePanel) {
305 return;
306 }if (evt.getClickCount () > 1) {
307 var fcol = this.fr.getFeatureStyle (check.type);
308 if (Clazz.instanceOf (fcol, java.awt.Color)) {
309  new jalview.appletgui.UserDefinedColours (this, check.type, fcol);
310 } else {
311  new jalview.appletgui.FeatureColourChooser (this, check.type);
312 check.updateColor (this.fr.getFeatureStyle (check.type));
313 }}}, "java.awt.event.MouseEvent");
314 Clazz.overrideMethod (c$, "mouseMoved", 
315 function (evt) {
316 }, "java.awt.event.MouseEvent");
317 Clazz.overrideMethod (c$, "adjustmentValueChanged", 
318 function (evt) {
319 this.fr.setTransparency ((100 - this.transparency.getValue ()) / 100);
320 this.ap.seqPanel.seqCanvas.repaint ();
321 }, "java.awt.event.AdjustmentEvent");
322 c$.$FeatureSettings$MyCheckbox$ = function () {
323 Clazz.pu$h ();
324 c$ = Clazz.decorateAsClass (function () {
325 Clazz.prepareCallback (this, arguments);
326 this.type = null;
327 this.stringWidth = 0;
328 this.hasLink = false;
329 this.gcol = null;
330 this.col = null;
331 Clazz.instantialize (this, arguments);
332 }, jalview.appletgui.FeatureSettings, "MyCheckbox", awt2swing.Checkbox);
333 Clazz.defineMethod (c$, "updateColor", 
334 function (a) {
335 if (Clazz.instanceOf (a, java.awt.Color)) {
336 this.col = a;
337 this.gcol = null;
338 } else if (Clazz.instanceOf (a, jalview.schemes.GraduatedColor)) {
339 this.gcol = a;
340 this.col = null;
341 } else {
342 throw  new Error (jalview.util.MessageManager.getString ("error.invalid_colour_for_mycheckbox"));
343 }if (this.col != null) {
344 this.setBackground (this.col);
345 } else {
346 var b = this.type;
347 if (this.gcol.getThreshType () != -1) {
348 b += " " + ((this.gcol.getThreshType () == 1) ? "(>)" : "(<)");
349 }if (this.gcol.isColourByLabel ()) {
350 this.setBackground (java.awt.Color.white);
351 b += " (by Label)";
352 } else {
353 this.setBackground (this.gcol.getMinColor ());
354 }this.setLabel (b);
355 }this.repaint ();
356 }, "~O");
357 Clazz.makeConstructor (c$, 
358 function (a, b, c) {
359 Clazz.superConstructor (this, jalview.appletgui.FeatureSettings.MyCheckbox, [a, b]);
360 this.type = a;
361 var d = this.b$["jalview.appletgui.FeatureSettings"].av.nullFrame.getFontMetrics (this.b$["jalview.appletgui.FeatureSettings"].av.nullFrame.getFont ());
362 this.stringWidth = d.stringWidth (a);
363 this.hasLink = c;
364 }, "~S,~B,~B");
365 Clazz.makeConstructor (c$, 
366 function (a, b, c, d) {
367 this.construct (a, b, c);
368 this.updateColor (d);
369 }, "~S,~B,~B,~O");
370 Clazz.defineMethod (c$, "PaintComponent", 
371 function (a) {
372 var b = this.getSize ();
373 if (this.gcol != null) {
374 if (this.gcol.isColourByLabel ()) {
375 a.setColor (java.awt.Color.white);
376 a.fillRect (Clazz.doubleToInt (b.width / 2), 0, Clazz.doubleToInt (b.width / 2), b.height);
377 } else {
378 var c = this.gcol.getMaxColor ();
379 a.setColor (c);
380 a.fillRect (Clazz.doubleToInt (b.width / 2), 0, Clazz.doubleToInt (b.width / 2), b.height);
381 }}if (this.hasLink) {
382 a.drawImage (this.b$["jalview.appletgui.FeatureSettings"].linkImage, this.stringWidth + 25, Clazz.doubleToInt ((this.getSize ().height - this.b$["jalview.appletgui.FeatureSettings"].linkImage.getHeight (this)) / 2), this);
383 }}, "java.awt.Graphics");
384 c$ = Clazz.p0p ();
385 };
386 c$.$FeatureSettings$1$ = function () {
387 Clazz.pu$h ();
388 c$ = Clazz.declareAnonymous (jalview.appletgui, "FeatureSettings$1", null, java.awt.event.ItemListener);
389 Clazz.overrideMethod (c$, "itemStateChanged", 
390 function (evt) {
391 var source = evt.getSource ();
392 this.b$["jalview.appletgui.FeatureSettings"].fr.setGroupVisibility (source.getLabel (), source.getState ());
393 this.b$["jalview.appletgui.FeatureSettings"].ap.seqPanel.seqCanvas.repaint ();
394 if (this.b$["jalview.appletgui.FeatureSettings"].ap.overviewPanel != null) {
395 this.b$["jalview.appletgui.FeatureSettings"].ap.overviewPanel.updateOverviewImage ();
396 }this.b$["jalview.appletgui.FeatureSettings"].resetTable (true);
397 return;
398 }, "java.awt.event.ItemEvent");
399 c$ = Clazz.p0p ();
400 };
401 c$.$FeatureSettings$2$ = function () {
402 Clazz.pu$h ();
403 c$ = Clazz.declareAnonymous (jalview.appletgui, "FeatureSettings$2", java.awt.event.WindowAdapter);
404 Clazz.overrideMethod (c$, "windowClosing", 
405 function (e) {
406 if (this.f$.me.av.featureSettings === this.f$.me) {
407 this.f$.me.av.featureSettings = null;
408 this.f$.me.ap = null;
409 this.f$.me.av = null;
410 }}, "java.awt.event.WindowEvent");
411 c$ = Clazz.p0p ();
412 };
413 c$.$FeatureSettings$3$ = function () {
414 Clazz.pu$h ();
415 c$ = Clazz.declareAnonymous (jalview.appletgui, "FeatureSettings$3", null, java.awt.event.ActionListener);
416 Clazz.overrideMethod (c$, "actionPerformed", 
417 function (e) {
418 this.f$.me.ap.alignFrame.avc.sortAlignmentByFeatureScore ( Clazz.newArray (-1, [this.f$.type]));
419 }, "java.awt.event.ActionEvent");
420 c$ = Clazz.p0p ();
421 };
422 c$.$FeatureSettings$4$ = function () {
423 Clazz.pu$h ();
424 c$ = Clazz.declareAnonymous (jalview.appletgui, "FeatureSettings$4", null, java.awt.event.ActionListener);
425 Clazz.overrideMethod (c$, "actionPerformed", 
426 function (e) {
427 this.f$.me.ap.alignFrame.avc.sortAlignmentByFeatureDensity ( Clazz.newArray (-1, [this.f$.type]));
428 }, "java.awt.event.ActionEvent");
429 c$ = Clazz.p0p ();
430 };
431 c$.$FeatureSettings$5$ = function () {
432 Clazz.pu$h ();
433 c$ = Clazz.declareAnonymous (jalview.appletgui, "FeatureSettings$5", null, java.awt.event.ActionListener);
434 Clazz.overrideMethod (c$, "actionPerformed", 
435 function (e) {
436 if (Clazz.instanceOf (this.f$.typeCol, java.awt.Color)) {
437  new jalview.appletgui.FeatureColourChooser (this.f$.me, this.f$.type);
438 this.f$.check.updateColor (this.b$["jalview.appletgui.FeatureSettings"].fr.getFeatureStyle (this.f$.type));
439 } else {
440  new jalview.appletgui.UserDefinedColours (this.f$.me, this.f$.check.type, (this.f$.typeCol));
441 }}, "java.awt.event.ActionEvent");
442 c$ = Clazz.p0p ();
443 };
444 });