1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.io; |
22 |
|
|
23 |
|
import jalview.api.FeatureColourI; |
24 |
|
import jalview.schemes.FeatureColour; |
25 |
|
import jalview.schemes.FeatureSettingsAdapter; |
26 |
|
|
27 |
|
import java.awt.Color; |
28 |
|
|
29 |
|
import mc_view.PDBChain; |
30 |
|
|
|
|
| 0% |
Uncovered Elements: 28 (28) |
Complexity: 9 |
Complexity Density: 0.64 |
|
31 |
|
public class PDBFeatureSettings extends FeatureSettingsAdapter |
32 |
|
{ |
33 |
|
|
34 |
|
private static final String FEATURE_INSERTION = "INSERTION"; |
35 |
|
|
36 |
|
private static final String FEATURE_RES_NUM = PDBChain.RESNUM_FEATURE; |
37 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
38 |
0 |
@Override... |
39 |
|
public boolean isFeatureHidden(String type) |
40 |
|
{ |
41 |
0 |
return type.equalsIgnoreCase(FEATURE_RES_NUM); |
42 |
|
} |
43 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
44 |
0 |
@Override... |
45 |
|
public FeatureColourI getFeatureColour(String type) |
46 |
|
{ |
47 |
0 |
if (type.equalsIgnoreCase(FEATURE_INSERTION)) |
48 |
|
{ |
49 |
0 |
return new FeatureColour() |
50 |
|
{ |
51 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
52 |
0 |
@Override... |
53 |
|
public Color getColour() |
54 |
|
{ |
55 |
0 |
return Color.RED; |
56 |
|
} |
57 |
|
}; |
58 |
|
} |
59 |
0 |
return null; |
60 |
|
} |
61 |
|
|
62 |
|
|
63 |
|
|
64 |
|
|
|
|
| 0% |
Uncovered Elements: 17 (17) |
Complexity: 5 |
Complexity Density: 0.56 |
|
65 |
0 |
@Override... |
66 |
|
public int compare(String feature1, String feature2) |
67 |
|
{ |
68 |
0 |
if (feature1.equalsIgnoreCase(FEATURE_INSERTION)) |
69 |
|
{ |
70 |
0 |
return +1; |
71 |
|
} |
72 |
0 |
if (feature2.equalsIgnoreCase(FEATURE_INSERTION)) |
73 |
|
{ |
74 |
0 |
return -1; |
75 |
|
} |
76 |
0 |
if (feature1.equalsIgnoreCase(FEATURE_RES_NUM)) |
77 |
|
{ |
78 |
0 |
return +1; |
79 |
|
} |
80 |
0 |
if (feature2.equalsIgnoreCase(FEATURE_RES_NUM)) |
81 |
|
{ |
82 |
0 |
return -1; |
83 |
|
} |
84 |
0 |
return 0; |
85 |
|
} |
86 |
|
} |