1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.workers; |
22 |
|
|
23 |
|
import java.awt.Color; |
24 |
|
|
25 |
|
import jalview.api.AlignViewportI; |
26 |
|
import jalview.api.AlignmentViewPanel; |
27 |
|
import jalview.bin.Jalview; |
28 |
|
import jalview.datamodel.AlignmentAnnotation; |
29 |
|
import jalview.datamodel.Annotation; |
30 |
|
import jalview.gui.AlignFrame; |
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
|
|
| 0% |
Uncovered Elements: 21 (21) |
Complexity: 7 |
Complexity Density: 0.58 |
|
45 |
|
public class AlignmentAnnotationFactory |
46 |
|
{ |
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
@param |
51 |
|
|
52 |
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 2 |
Complexity Density: 0.4 |
|
53 |
0 |
public static void newCalculator(FeatureSetCounterI counter)... |
54 |
|
{ |
55 |
0 |
AlignmentViewPanel currentAlignFrame = Jalview.getInstance() |
56 |
|
.getCurrentAlignFrame().alignPanel; |
57 |
0 |
if (currentAlignFrame == null) |
58 |
|
{ |
59 |
0 |
jalview.bin.Console.errPrintln( |
60 |
|
"Can't register calculator as no alignment window has focus"); |
61 |
0 |
return; |
62 |
|
} |
63 |
0 |
new ColumnCounterSetWorker(currentAlignFrame.getAlignViewport(), |
64 |
|
currentAlignFrame, counter); |
65 |
|
} |
66 |
|
|
67 |
|
|
68 |
|
|
69 |
|
|
70 |
|
@param |
71 |
|
|
72 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
73 |
0 |
public static void newCalculator(AnnotationProviderI calculator)... |
74 |
|
{ |
75 |
|
|
76 |
|
|
77 |
0 |
AlignFrame currentAlignFrame = Jalview.getInstance() |
78 |
|
.getCurrentAlignFrame(); |
79 |
0 |
if (currentAlignFrame != null) |
80 |
|
{ |
81 |
0 |
new AnnotationWorker(currentAlignFrame.getViewport(), |
82 |
|
currentAlignFrame.getAlignPanels().get(0), calculator); |
83 |
|
} |
84 |
|
else |
85 |
|
{ |
86 |
0 |
jalview.bin.Console.errPrintln( |
87 |
|
"Can't register calculator as no alignment window has focus"); |
88 |
|
} |
89 |
|
} |
90 |
|
|
91 |
|
|
92 |
|
|
93 |
|
|
94 |
|
@param |
95 |
|
@param |
96 |
|
@param |
97 |
|
|
98 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
99 |
0 |
public static void newCalculator(AlignViewportI viewport,... |
100 |
|
AlignmentViewPanel panel, AnnotationProviderI calculator) |
101 |
|
{ |
102 |
0 |
new AnnotationWorker(viewport, panel, calculator); |
103 |
|
} |
104 |
|
|
105 |
|
|
106 |
|
|
107 |
|
|
108 |
|
@param |
109 |
|
@param |
110 |
|
@param |
111 |
|
@param |
112 |
|
@param |
113 |
|
@return |
114 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
115 |
0 |
public static Annotation newAnnotation(String displayChar, String desc,... |
116 |
|
char secondaryStructure, float val, Color color) |
117 |
|
{ |
118 |
0 |
return new Annotation(displayChar, desc, secondaryStructure, val, |
119 |
|
color); |
120 |
|
} |
121 |
|
|
122 |
|
|
123 |
|
|
124 |
|
|
125 |
|
@param |
126 |
|
@param |
127 |
|
@param |
128 |
|
@return |
129 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
130 |
0 |
public static AlignmentAnnotation newAlignmentAnnotation(String name,... |
131 |
|
String desc, Annotation[] anns) |
132 |
|
{ |
133 |
0 |
return new AlignmentAnnotation(name, desc, anns); |
134 |
|
} |
135 |
|
} |