1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.gui; |
22 |
|
|
23 |
|
import jalview.datamodel.AlignmentAnnotation; |
24 |
|
import jalview.datamodel.AlignmentI; |
25 |
|
import jalview.datamodel.SequenceGroup; |
26 |
|
import jalview.util.MessageManager; |
27 |
|
|
28 |
|
import java.awt.BorderLayout; |
29 |
|
import java.awt.Checkbox; |
30 |
|
import java.awt.CheckboxGroup; |
31 |
|
import java.awt.FlowLayout; |
32 |
|
import java.awt.Font; |
33 |
|
import java.awt.GridLayout; |
34 |
|
import java.awt.event.ActionEvent; |
35 |
|
import java.awt.event.ActionListener; |
36 |
|
import java.awt.event.ItemEvent; |
37 |
|
import java.awt.event.ItemListener; |
38 |
|
import java.util.ArrayList; |
39 |
|
import java.util.HashMap; |
40 |
|
import java.util.List; |
41 |
|
import java.util.Map; |
42 |
|
|
43 |
|
import javax.swing.JButton; |
44 |
|
import javax.swing.JInternalFrame; |
45 |
|
import javax.swing.JLayeredPane; |
46 |
|
import javax.swing.JPanel; |
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
@author |
53 |
|
|
54 |
|
|
55 |
|
@SuppressWarnings("serial") |
|
|
| 90.7% |
Uncovered Elements: 21 (227) |
Complexity: 59 |
Complexity Density: 0.38 |
|
56 |
|
public class AnnotationChooser extends JPanel |
57 |
|
{ |
58 |
|
|
59 |
|
private static final Font CHECKBOX_FONT = new Font("Serif", Font.BOLD, |
60 |
|
12); |
61 |
|
|
62 |
|
private static final int MY_FRAME_WIDTH = 600; |
63 |
|
|
64 |
|
private static final int MY_FRAME_HEIGHT = 250; |
65 |
|
|
66 |
|
private JInternalFrame frame; |
67 |
|
|
68 |
|
private AlignmentPanel ap; |
69 |
|
|
70 |
|
private SequenceGroup sg; |
71 |
|
|
72 |
|
|
73 |
|
private boolean[] resetState = null; |
74 |
|
|
75 |
|
|
76 |
|
private boolean showSelected; |
77 |
|
|
78 |
|
|
79 |
|
private boolean applyToSelectedSequences; |
80 |
|
|
81 |
|
|
82 |
|
private boolean applyToUnselectedSequences; |
83 |
|
|
84 |
|
|
85 |
|
private Map<String, String> selectedTypes = new HashMap<>(); |
86 |
|
|
87 |
|
|
88 |
|
|
89 |
|
|
90 |
|
@param |
91 |
|
|
|
|
| 87.5% |
Uncovered Elements: 1 (8) |
Complexity: 2 |
Complexity Density: 0.25 |
|
92 |
17 |
public AnnotationChooser(AlignmentPanel alignPane)... |
93 |
|
{ |
94 |
17 |
super(); |
95 |
17 |
this.ap = alignPane; |
96 |
17 |
this.sg = alignPane.av.getSelectionGroup(); |
97 |
17 |
saveResetState(alignPane.getAlignment()); |
98 |
|
|
99 |
17 |
try |
100 |
|
{ |
101 |
17 |
jbInit(); |
102 |
|
} catch (Exception ex) |
103 |
|
{ |
104 |
0 |
ex.printStackTrace(); |
105 |
|
} |
106 |
17 |
showFrame(); |
107 |
|
} |
108 |
|
|
109 |
|
|
110 |
|
|
111 |
|
|
112 |
|
|
113 |
|
@param |
114 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 2 |
Complexity Density: 0.4 |
|
115 |
17 |
protected void saveResetState(AlignmentI alignment)... |
116 |
|
{ |
117 |
17 |
AlignmentAnnotation[] annotations = alignment.getAlignmentAnnotation(); |
118 |
17 |
final int count = annotations.length; |
119 |
17 |
this.resetState = new boolean[count]; |
120 |
170 |
for (int i = 0; i < count; i++) |
121 |
|
{ |
122 |
153 |
this.resetState[i] = annotations[i].visible; |
123 |
|
} |
124 |
|
} |
125 |
|
|
126 |
|
|
127 |
|
|
128 |
|
|
129 |
|
|
130 |
|
|
131 |
|
|
132 |
|
|
133 |
|
|
134 |
|
|
135 |
|
|
136 |
|
|
137 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
138 |
17 |
protected void jbInit()... |
139 |
|
{ |
140 |
17 |
setLayout(new GridLayout(3, 1)); |
141 |
17 |
add(buildAnnotationTypesPanel()); |
142 |
17 |
add(buildShowHideOptionsPanel()); |
143 |
17 |
add(buildActionButtonsPanel()); |
144 |
17 |
validate(); |
145 |
|
} |
146 |
|
|
147 |
|
|
148 |
|
|
149 |
|
|
150 |
|
@return |
151 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
152 |
17 |
protected JPanel buildAnnotationTypesPanel()... |
153 |
|
{ |
154 |
17 |
JPanel jp = new JPanel(new FlowLayout(FlowLayout.LEFT)); |
155 |
|
|
156 |
17 |
List<String> annotationTypes = getAnnotationTypes( |
157 |
|
this.ap.getAlignment(), true); |
158 |
|
|
159 |
17 |
for (final String type : annotationTypes) |
160 |
|
{ |
161 |
34 |
final Checkbox check = new Checkbox(type); |
162 |
34 |
check.setFont(CHECKBOX_FONT); |
163 |
34 |
check.addItemListener(new ItemListener() |
164 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
165 |
14 |
@Override... |
166 |
|
public void itemStateChanged(ItemEvent evt) |
167 |
|
{ |
168 |
14 |
if (evt.getStateChange() == ItemEvent.SELECTED) |
169 |
|
{ |
170 |
10 |
AnnotationChooser.this.selectedTypes.put(type, type); |
171 |
|
} |
172 |
|
else |
173 |
|
{ |
174 |
4 |
AnnotationChooser.this.selectedTypes.remove(type); |
175 |
|
} |
176 |
14 |
changeTypeSelected_actionPerformed(type); |
177 |
|
} |
178 |
|
}); |
179 |
34 |
jp.add(check); |
180 |
|
} |
181 |
17 |
return jp; |
182 |
|
} |
183 |
|
|
184 |
|
|
185 |
|
|
186 |
|
|
187 |
|
|
188 |
|
|
189 |
|
|
190 |
|
|
191 |
|
|
192 |
|
|
193 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
194 |
8 |
protected void changeApplyTo_actionPerformed()... |
195 |
|
{ |
196 |
8 |
setAnnotationVisibility(true); |
197 |
|
|
198 |
|
|
199 |
|
|
200 |
8 |
ap.updateAnnotation(); |
201 |
|
|
202 |
|
|
203 |
|
|
204 |
|
|
205 |
8 |
this.ap.paintAlignment(true, false); |
206 |
|
} |
207 |
|
|
208 |
|
|
209 |
|
|
210 |
|
|
211 |
|
|
212 |
|
|
213 |
|
|
214 |
|
|
215 |
|
|
216 |
|
|
217 |
|
@param |
218 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 5 |
Complexity Density: 0.83 |
|
219 |
14 |
protected void changeTypeSelected_actionPerformed(String type)... |
220 |
|
{ |
221 |
14 |
boolean typeSelected = this.selectedTypes.containsKey(type); |
222 |
14 |
for (AlignmentAnnotation aa : this.ap.getAlignment() |
223 |
|
.getAlignmentAnnotation()) |
224 |
|
{ |
225 |
126 |
if (aa.sequenceRef != null && type.equals(aa.label) |
226 |
|
&& isInActionScope(aa)) |
227 |
|
{ |
228 |
22 |
aa.visible = typeSelected ? this.showSelected : !this.showSelected; |
229 |
|
} |
230 |
|
} |
231 |
14 |
ap.updateAnnotation(); |
232 |
|
|
233 |
|
|
234 |
|
|
235 |
|
|
236 |
14 |
this.ap.paintAlignment(true, false); |
237 |
|
} |
238 |
|
|
239 |
|
|
240 |
|
|
241 |
|
|
242 |
|
|
243 |
|
|
244 |
|
|
245 |
|
|
246 |
|
@param |
247 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
248 |
11 |
protected void changeShowHide_actionPerformed()... |
249 |
|
{ |
250 |
11 |
setAnnotationVisibility(false); |
251 |
|
|
252 |
11 |
this.ap.updateAnnotation(); |
253 |
|
|
254 |
11 |
this.ap.paintAlignment(true, false); |
255 |
|
} |
256 |
|
|
257 |
|
|
258 |
|
|
259 |
|
|
260 |
|
@param |
261 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
262 |
19 |
protected void setAnnotationVisibility(boolean updateAllRows)... |
263 |
|
{ |
264 |
19 |
for (AlignmentAnnotation aa : this.ap.getAlignment() |
265 |
|
.getAlignmentAnnotation()) |
266 |
|
{ |
267 |
171 |
if (aa.sequenceRef != null) |
268 |
|
{ |
269 |
76 |
setAnnotationVisibility(aa, updateAllRows); |
270 |
|
} |
271 |
|
} |
272 |
|
} |
273 |
|
|
274 |
|
|
275 |
|
|
276 |
|
|
277 |
|
|
278 |
|
|
279 |
|
|
280 |
|
|
281 |
|
|
282 |
|
|
283 |
|
|
284 |
|
|
285 |
|
|
286 |
|
|
287 |
|
@param |
288 |
|
@param |
289 |
|
|
|
|
| 81.8% |
Uncovered Elements: 2 (11) |
Complexity: 4 |
Complexity Density: 0.8 |
|
290 |
76 |
protected void setAnnotationVisibility(AlignmentAnnotation aa,... |
291 |
|
boolean updateAllRows) |
292 |
|
{ |
293 |
76 |
if (this.selectedTypes.containsKey(aa.label)) |
294 |
|
{ |
295 |
4 |
if (isInActionScope(aa)) |
296 |
|
{ |
297 |
3 |
aa.visible = this.showSelected; |
298 |
|
} |
299 |
1 |
else if (updateAllRows) |
300 |
|
{ |
301 |
0 |
aa.visible = !this.showSelected; |
302 |
|
} |
303 |
|
} |
304 |
|
|
305 |
|
|
306 |
|
} |
307 |
|
|
308 |
|
|
309 |
|
|
310 |
|
|
311 |
|
|
312 |
|
|
313 |
|
|
314 |
|
|
315 |
|
|
316 |
|
@param |
317 |
|
@return |
318 |
|
|
|
|
| 89.5% |
Uncovered Elements: 2 (19) |
Complexity: 7 |
Complexity Density: 0.78 |
|
319 |
42 |
protected boolean isInActionScope(AlignmentAnnotation aa)... |
320 |
|
{ |
321 |
42 |
boolean result = false; |
322 |
42 |
if (this.applyToSelectedSequences && this.applyToUnselectedSequences) |
323 |
|
{ |
324 |
|
|
325 |
18 |
result = true; |
326 |
|
} |
327 |
24 |
else if (this.sg == null) |
328 |
|
{ |
329 |
|
|
330 |
0 |
result = true; |
331 |
|
} |
332 |
24 |
else if (this.sg.getSequences().contains(aa.sequenceRef)) |
333 |
|
{ |
334 |
|
|
335 |
11 |
result = this.applyToSelectedSequences ? true : false; |
336 |
|
} |
337 |
|
else |
338 |
|
{ |
339 |
|
|
340 |
13 |
result = this.applyToUnselectedSequences ? true : false; |
341 |
|
} |
342 |
42 |
return result; |
343 |
|
} |
344 |
|
|
345 |
|
|
346 |
|
|
347 |
|
|
348 |
|
|
349 |
|
|
350 |
|
|
351 |
|
|
352 |
|
@param |
353 |
|
@param |
354 |
|
@return |
355 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (11) |
Complexity: 4 |
Complexity Density: 0.57 |
|
356 |
19 |
public static List<String> getAnnotationTypes(AlignmentI alignment,... |
357 |
|
boolean sequenceSpecificOnly) |
358 |
|
{ |
359 |
19 |
List<String> result = new ArrayList<>(); |
360 |
19 |
for (AlignmentAnnotation aa : alignment.getAlignmentAnnotation()) |
361 |
|
{ |
362 |
171 |
if (!sequenceSpecificOnly || aa.sequenceRef != null) |
363 |
|
{ |
364 |
81 |
String label = aa.label; |
365 |
81 |
if (!result.contains(label)) |
366 |
|
{ |
367 |
43 |
result.add(label); |
368 |
|
} |
369 |
|
} |
370 |
|
} |
371 |
19 |
return result; |
372 |
|
} |
373 |
|
|
374 |
|
|
375 |
|
|
376 |
|
|
377 |
|
|
378 |
|
|
379 |
|
|
380 |
|
|
381 |
|
@return |
382 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 1 |
Complexity Density: 0.14 |
|
383 |
18 |
protected JPanel buildShowHideOptionsPanel()... |
384 |
|
{ |
385 |
18 |
JPanel jp = new JPanel(); |
386 |
18 |
jp.setLayout(new BorderLayout()); |
387 |
|
|
388 |
18 |
JPanel showHideOptions = buildShowHidePanel(); |
389 |
18 |
jp.add(showHideOptions, BorderLayout.CENTER); |
390 |
|
|
391 |
18 |
JPanel applyToOptions = buildApplyToOptionsPanel(); |
392 |
18 |
jp.add(applyToOptions, BorderLayout.SOUTH); |
393 |
|
|
394 |
18 |
return jp; |
395 |
|
} |
396 |
|
|
397 |
|
|
398 |
|
|
399 |
|
|
400 |
|
|
401 |
|
|
402 |
|
|
403 |
|
|
404 |
|
|
405 |
|
@return |
406 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (20) |
Complexity: 1 |
Complexity Density: 0.05 |
|
407 |
20 |
protected JPanel buildApplyToOptionsPanel()... |
408 |
|
{ |
409 |
20 |
final boolean wholeAlignment = this.sg == null; |
410 |
20 |
JPanel applyToOptions = new JPanel(new FlowLayout(FlowLayout.LEFT)); |
411 |
20 |
CheckboxGroup actingOn = new CheckboxGroup(); |
412 |
|
|
413 |
20 |
String forAll = MessageManager.getString("label.all_sequences"); |
414 |
20 |
final Checkbox allSequences = new Checkbox(forAll, actingOn, |
415 |
|
wholeAlignment); |
416 |
20 |
allSequences.addItemListener(new ItemListener() |
417 |
|
{ |
|
|
| 83.3% |
Uncovered Elements: 1 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
418 |
5 |
@Override... |
419 |
|
public void itemStateChanged(ItemEvent evt) |
420 |
|
{ |
421 |
5 |
if (evt.getStateChange() == ItemEvent.SELECTED) |
422 |
|
{ |
423 |
5 |
AnnotationChooser.this.setApplyToSelectedSequences(true); |
424 |
5 |
AnnotationChooser.this.setApplyToUnselectedSequences(true); |
425 |
5 |
AnnotationChooser.this.changeApplyTo_actionPerformed(); |
426 |
|
} |
427 |
|
} |
428 |
|
}); |
429 |
20 |
applyToOptions.add(allSequences); |
430 |
|
|
431 |
20 |
String forSelected = MessageManager |
432 |
|
.getString("label.selected_sequences"); |
433 |
20 |
final Checkbox selectedSequences = new Checkbox(forSelected, actingOn, |
434 |
|
!wholeAlignment); |
435 |
20 |
selectedSequences.setEnabled(!wholeAlignment); |
436 |
20 |
selectedSequences.addItemListener(new ItemListener() |
437 |
|
{ |
|
|
| 83.3% |
Uncovered Elements: 1 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
438 |
2 |
@Override... |
439 |
|
public void itemStateChanged(ItemEvent evt) |
440 |
|
{ |
441 |
2 |
if (evt.getStateChange() == ItemEvent.SELECTED) |
442 |
|
{ |
443 |
2 |
AnnotationChooser.this.setApplyToSelectedSequences(true); |
444 |
2 |
AnnotationChooser.this.setApplyToUnselectedSequences(false); |
445 |
2 |
AnnotationChooser.this.changeApplyTo_actionPerformed(); |
446 |
|
} |
447 |
|
} |
448 |
|
}); |
449 |
20 |
applyToOptions.add(selectedSequences); |
450 |
|
|
451 |
20 |
String exceptSelected = MessageManager |
452 |
|
.getString("label.except_selected_sequences"); |
453 |
20 |
final Checkbox unselectedSequences = new Checkbox(exceptSelected, |
454 |
|
actingOn, false); |
455 |
20 |
unselectedSequences.setEnabled(!wholeAlignment); |
456 |
20 |
unselectedSequences.addItemListener(new ItemListener() |
457 |
|
{ |
|
|
| 83.3% |
Uncovered Elements: 1 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
458 |
1 |
@Override... |
459 |
|
public void itemStateChanged(ItemEvent evt) |
460 |
|
{ |
461 |
1 |
if (evt.getStateChange() == ItemEvent.SELECTED) |
462 |
|
{ |
463 |
1 |
AnnotationChooser.this.setApplyToSelectedSequences(false); |
464 |
1 |
AnnotationChooser.this.setApplyToUnselectedSequences(true); |
465 |
1 |
AnnotationChooser.this.changeApplyTo_actionPerformed(); |
466 |
|
} |
467 |
|
} |
468 |
|
}); |
469 |
20 |
applyToOptions.add(unselectedSequences); |
470 |
|
|
471 |
|
|
472 |
20 |
this.applyToSelectedSequences = selectedSequences.getState() |
473 |
|
|| allSequences.getState(); |
474 |
20 |
this.applyToUnselectedSequences = unselectedSequences.getState() |
475 |
|
|| allSequences.getState(); |
476 |
|
|
477 |
20 |
return applyToOptions; |
478 |
|
} |
479 |
|
|
480 |
|
|
481 |
|
|
482 |
|
|
483 |
|
|
484 |
|
@return |
485 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (12) |
Complexity: 1 |
Complexity Density: 0.08 |
|
486 |
19 |
protected JPanel buildShowHidePanel()... |
487 |
|
{ |
488 |
19 |
JPanel showHideOptions = new JPanel(new FlowLayout(FlowLayout.LEFT)); |
489 |
19 |
CheckboxGroup showOrHide = new CheckboxGroup(); |
490 |
|
|
491 |
|
|
492 |
|
|
493 |
|
|
494 |
19 |
String showLabel = MessageManager |
495 |
|
.getString("label.show_selected_annotations"); |
496 |
19 |
final Checkbox showOption = new Checkbox(showLabel, showOrHide, false); |
497 |
19 |
showOption.addItemListener(new ItemListener() |
498 |
|
{ |
|
|
| 80% |
Uncovered Elements: 1 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
499 |
4 |
@Override... |
500 |
|
public void itemStateChanged(ItemEvent evt) |
501 |
|
{ |
502 |
4 |
if (evt.getStateChange() == ItemEvent.SELECTED) |
503 |
|
{ |
504 |
4 |
AnnotationChooser.this.setShowSelected(true); |
505 |
4 |
AnnotationChooser.this.changeShowHide_actionPerformed(); |
506 |
|
} |
507 |
|
} |
508 |
|
}); |
509 |
19 |
showHideOptions.add(showOption); |
510 |
|
|
511 |
|
|
512 |
|
|
513 |
|
|
514 |
19 |
String hideLabel = MessageManager |
515 |
|
.getString("label.hide_selected_annotations"); |
516 |
19 |
final Checkbox hideOption = new Checkbox(hideLabel, showOrHide, true); |
517 |
19 |
hideOption.addItemListener(new ItemListener() |
518 |
|
{ |
|
|
| 80% |
Uncovered Elements: 1 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
519 |
7 |
@Override... |
520 |
|
public void itemStateChanged(ItemEvent evt) |
521 |
|
{ |
522 |
7 |
if (evt.getStateChange() == ItemEvent.SELECTED) |
523 |
|
{ |
524 |
7 |
AnnotationChooser.this.setShowSelected(false); |
525 |
7 |
AnnotationChooser.this.changeShowHide_actionPerformed(); |
526 |
|
} |
527 |
|
} |
528 |
|
}); |
529 |
19 |
showHideOptions.add(hideOption); |
530 |
|
|
531 |
|
|
532 |
|
|
533 |
|
|
534 |
19 |
this.showSelected = showOption.getState(); |
535 |
|
|
536 |
19 |
return showHideOptions; |
537 |
|
} |
538 |
|
|
539 |
|
|
540 |
|
|
541 |
|
|
542 |
|
@return |
543 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (11) |
Complexity: 1 |
Complexity Density: 0.09 |
|
544 |
18 |
protected JPanel buildActionButtonsPanel()... |
545 |
|
{ |
546 |
18 |
JPanel jp = new JPanel(); |
547 |
18 |
final Font labelFont = JvSwingUtils.getLabelFont(); |
548 |
|
|
549 |
18 |
JButton ok = new JButton(MessageManager.getString("action.ok")); |
550 |
18 |
ok.setFont(labelFont); |
551 |
18 |
ok.addActionListener(new ActionListener() |
552 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
553 |
0 |
@Override... |
554 |
|
public void actionPerformed(ActionEvent e) |
555 |
|
{ |
556 |
0 |
close_actionPerformed(); |
557 |
|
} |
558 |
|
}); |
559 |
18 |
jp.add(ok); |
560 |
|
|
561 |
18 |
JButton cancel = new JButton(MessageManager.getString("action.cancel")); |
562 |
18 |
cancel.setFont(labelFont); |
563 |
18 |
cancel.addActionListener(new ActionListener() |
564 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
565 |
0 |
@Override... |
566 |
|
public void actionPerformed(ActionEvent e) |
567 |
|
{ |
568 |
0 |
cancel_actionPerformed(); |
569 |
|
} |
570 |
|
}); |
571 |
18 |
jp.add(cancel); |
572 |
|
|
573 |
18 |
return jp; |
574 |
|
} |
575 |
|
|
576 |
|
|
577 |
|
|
578 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
579 |
0 |
protected void cancel_actionPerformed()... |
580 |
|
{ |
581 |
0 |
resetOriginalState(); |
582 |
0 |
this.ap.repaint(); |
583 |
0 |
close_actionPerformed(); |
584 |
|
} |
585 |
|
|
586 |
|
|
587 |
|
|
588 |
|
|
589 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
590 |
1 |
protected void resetOriginalState()... |
591 |
|
{ |
592 |
1 |
int i = 0; |
593 |
1 |
for (AlignmentAnnotation aa : this.ap.getAlignment() |
594 |
|
.getAlignmentAnnotation()) |
595 |
|
{ |
596 |
9 |
aa.visible = this.resetState[i++]; |
597 |
|
} |
598 |
|
} |
599 |
|
|
600 |
|
|
601 |
|
|
602 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 2 |
Complexity Density: 1 |
|
603 |
0 |
protected void close_actionPerformed()... |
604 |
|
{ |
605 |
0 |
try |
606 |
|
{ |
607 |
0 |
this.frame.setClosed(true); |
608 |
|
} catch (Exception exe) |
609 |
|
{ |
610 |
|
} |
611 |
|
} |
612 |
|
|
613 |
|
|
614 |
|
|
615 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
616 |
17 |
private void showFrame()... |
617 |
|
{ |
618 |
17 |
frame = new JInternalFrame(); |
619 |
17 |
frame.setContentPane(this); |
620 |
17 |
frame.setLayer(JLayeredPane.PALETTE_LAYER); |
621 |
17 |
Desktop.addInternalFrame(frame, |
622 |
|
MessageManager.getString("label.choose_annotations"), |
623 |
|
MY_FRAME_WIDTH, MY_FRAME_HEIGHT, true); |
624 |
|
} |
625 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
626 |
11 |
protected void setShowSelected(boolean showSelected)... |
627 |
|
{ |
628 |
11 |
this.showSelected = showSelected; |
629 |
|
} |
630 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
631 |
8 |
protected void setApplyToSelectedSequences(... |
632 |
|
boolean applyToSelectedSequences) |
633 |
|
{ |
634 |
8 |
this.applyToSelectedSequences = applyToSelectedSequences; |
635 |
|
} |
636 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
637 |
8 |
protected void setApplyToUnselectedSequences(... |
638 |
|
boolean applyToUnselectedSequences) |
639 |
|
{ |
640 |
8 |
this.applyToUnselectedSequences = applyToUnselectedSequences; |
641 |
|
} |
642 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
643 |
2 |
protected boolean isShowSelected()... |
644 |
|
{ |
645 |
2 |
return showSelected; |
646 |
|
} |
647 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
648 |
3 |
protected boolean isApplyToSelectedSequences()... |
649 |
|
{ |
650 |
3 |
return applyToSelectedSequences; |
651 |
|
} |
652 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
653 |
3 |
protected boolean isApplyToUnselectedSequences()... |
654 |
|
{ |
655 |
3 |
return applyToUnselectedSequences; |
656 |
|
} |
657 |
|
|
658 |
|
} |