1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.schemes; |
22 |
|
|
23 |
|
import jalview.api.AlignViewportI; |
24 |
|
import jalview.datamodel.AnnotatedCollectionI; |
25 |
|
import jalview.datamodel.SequenceCollectionI; |
26 |
|
import jalview.datamodel.SequenceI; |
27 |
|
|
28 |
|
import java.awt.Color; |
29 |
|
import java.util.Map; |
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
@author |
37 |
|
|
|
|
| 0% |
Uncovered Elements: 23 (23) |
Complexity: 11 |
Complexity Density: 1.1 |
|
38 |
|
public class IdColourScheme implements ColourSchemeI |
39 |
|
{ |
40 |
|
AlignViewportI view = null; |
41 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
42 |
0 |
public IdColourScheme()... |
43 |
|
{ |
44 |
|
|
45 |
|
} |
46 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
47 |
0 |
public IdColourScheme(AlignViewportI view, AnnotatedCollectionI coll)... |
48 |
|
{ |
49 |
0 |
this.view = view; |
50 |
|
} |
51 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
52 |
0 |
@Override... |
53 |
|
public String getSchemeName() |
54 |
|
{ |
55 |
0 |
return JalviewColourScheme.IdColour.toString(); |
56 |
|
} |
57 |
|
|
58 |
|
|
59 |
|
|
60 |
|
|
61 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
62 |
0 |
@Override... |
63 |
|
public ColourSchemeI getInstance(AlignViewportI view, |
64 |
|
AnnotatedCollectionI coll) |
65 |
|
{ |
66 |
0 |
return new IdColourScheme(view, coll); |
67 |
|
} |
68 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
69 |
0 |
@Override... |
70 |
|
public void alignmentChanged(AnnotatedCollectionI alignment, |
71 |
|
Map<SequenceI, SequenceCollectionI> hiddenReps) |
72 |
|
{ |
73 |
|
} |
74 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 3 |
Complexity Density: 0.75 |
|
75 |
0 |
@Override... |
76 |
|
public Color findColour(char symbol, int position, SequenceI seq, |
77 |
|
String consensusResidue, float pid) |
78 |
|
{ |
79 |
|
|
80 |
|
|
81 |
|
|
82 |
|
|
83 |
0 |
if (view == null) |
84 |
|
{ |
85 |
0 |
return Color.WHITE; |
86 |
|
} |
87 |
0 |
Color col = view.getSequenceColour(seq); |
88 |
0 |
return Color.WHITE.equals(col) ? Color.WHITE : col.darker(); |
89 |
|
} |
90 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
91 |
0 |
@Override... |
92 |
|
public boolean hasGapColour() |
93 |
|
{ |
94 |
0 |
return false; |
95 |
|
} |
96 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
97 |
0 |
@Override... |
98 |
|
public boolean isApplicableTo(AnnotatedCollectionI ac) |
99 |
|
{ |
100 |
0 |
return true; |
101 |
|
} |
102 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
103 |
0 |
@Override... |
104 |
|
public boolean isSimple() |
105 |
|
{ |
106 |
0 |
return false; |
107 |
|
} |
108 |
|
} |