1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
package org.devacfr.maven.skins.reflow.model; |
20 |
|
|
21 |
|
import javax.annotation.Nonnull; |
22 |
|
import javax.annotation.Nullable; |
23 |
|
|
24 |
|
import com.google.common.base.Strings; |
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
@author |
30 |
|
@since |
31 |
|
|
|
|
| 84% |
Uncovered Elements: 4 (25) |
Complexity: 9 |
Complexity Density: 0,69 |
|
32 |
|
public abstract class BsComponent extends Component { |
33 |
|
|
34 |
|
|
35 |
|
private final String component; |
36 |
|
|
37 |
|
|
38 |
|
private String theme = "light"; |
39 |
|
|
40 |
|
|
41 |
|
private String background = "light"; |
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
@param |
47 |
|
|
48 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
49 |
62 |
public BsComponent(final String component) {... |
50 |
62 |
this.component = component; |
51 |
|
} |
52 |
|
|
|
|
| 71,4% |
Uncovered Elements: 4 (14) |
Complexity: 4 |
Complexity Density: 0,5 |
|
53 |
8 |
@Override... |
54 |
|
@Nonnull |
55 |
|
public String getCssClass() { |
56 |
8 |
String css = ""; |
57 |
8 |
if (!Strings.isNullOrEmpty(getTheme())) { |
58 |
8 |
css += component + "-" + getTheme() + " "; |
59 |
|
} |
60 |
8 |
if (!Strings.isNullOrEmpty(getBackground())) { |
61 |
8 |
css += "bg-" + getBackground() + " "; |
62 |
|
} |
63 |
8 |
if (!Strings.isNullOrEmpty(super.getCssClass())) { |
64 |
0 |
css += super.getCssClass(); |
65 |
|
} |
66 |
8 |
return css.trim(); |
67 |
|
} |
68 |
|
|
69 |
|
|
70 |
|
@return@link |
71 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
72 |
16 |
public String getTheme() {... |
73 |
16 |
return theme; |
74 |
|
} |
75 |
|
|
76 |
|
|
77 |
|
@param |
78 |
|
|
79 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
80 |
48 |
protected void setTheme(@Nullable final String theme) {... |
81 |
48 |
this.theme = theme; |
82 |
|
} |
83 |
|
|
84 |
|
|
85 |
|
@return@link |
86 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
87 |
16 |
public String getBackground() {... |
88 |
16 |
return background; |
89 |
|
} |
90 |
|
|
91 |
|
|
92 |
|
@param |
93 |
|
|
94 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
95 |
48 |
protected void setBackground(@Nullable final String background) {... |
96 |
48 |
this.background = background; |
97 |
|
} |
98 |
|
} |