1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.icon; |
21 |
|
|
22 |
|
import java.util.ArrayList; |
23 |
|
import java.util.HashMap; |
24 |
|
import java.util.List; |
25 |
|
import java.util.Map; |
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
@since |
31 |
|
@version |
32 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (36) |
Complexity: 18 |
Complexity Density: 1 |
|
33 |
|
public class IconSet |
34 |
|
{ |
35 |
|
private String name; |
36 |
|
|
37 |
|
private Map<String, Icon> iconMap = new HashMap<>(); |
38 |
|
|
39 |
|
private String css; |
40 |
|
|
41 |
|
private String ssx; |
42 |
|
|
43 |
|
private String jsx; |
44 |
|
|
45 |
|
private String renderWiki; |
46 |
|
|
47 |
|
private String renderHTML; |
48 |
|
|
49 |
|
private IconType type; |
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
@param |
54 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
55 |
66 |
public IconSet(String name)... |
56 |
|
{ |
57 |
66 |
this.name = name; |
58 |
|
} |
59 |
|
|
60 |
|
|
61 |
|
@param |
62 |
|
@return |
63 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
64 |
2720 |
public Icon getIcon(String name)... |
65 |
|
{ |
66 |
2720 |
return iconMap.get(name); |
67 |
|
} |
68 |
|
|
69 |
|
|
70 |
|
|
71 |
|
@param |
72 |
|
@param |
73 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
74 |
31920 |
public void addIcon(String name, Icon icon)... |
75 |
|
{ |
76 |
31920 |
iconMap.put(name, icon); |
77 |
|
} |
78 |
|
|
79 |
|
|
80 |
|
@return |
81 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
82 |
5 |
public String getName()... |
83 |
|
{ |
84 |
5 |
return name; |
85 |
|
} |
86 |
|
|
87 |
|
|
88 |
|
|
89 |
|
@param |
90 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
91 |
1 |
public void setName(String name)... |
92 |
|
{ |
93 |
1 |
this.name = name; |
94 |
|
} |
95 |
|
|
96 |
|
|
97 |
|
@return |
98 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
99 |
2686 |
public String getCss()... |
100 |
|
{ |
101 |
2686 |
return css; |
102 |
|
} |
103 |
|
|
104 |
|
|
105 |
|
|
106 |
|
@param |
107 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
108 |
4 |
public void setCss(String css)... |
109 |
|
{ |
110 |
4 |
this.css = css; |
111 |
|
} |
112 |
|
|
113 |
|
|
114 |
|
@return |
115 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
116 |
2694 |
public String getSsx()... |
117 |
|
{ |
118 |
2694 |
return ssx; |
119 |
|
} |
120 |
|
|
121 |
|
|
122 |
|
|
123 |
|
@param |
124 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
125 |
5 |
public void setSsx(String ssx)... |
126 |
|
{ |
127 |
5 |
this.ssx = ssx; |
128 |
|
} |
129 |
|
|
130 |
|
|
131 |
|
@return |
132 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
133 |
2694 |
public String getJsx()... |
134 |
|
{ |
135 |
2694 |
return jsx; |
136 |
|
} |
137 |
|
|
138 |
|
|
139 |
|
|
140 |
|
@param |
141 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
142 |
5 |
public void setJsx(String jsx)... |
143 |
|
{ |
144 |
5 |
this.jsx = jsx; |
145 |
|
} |
146 |
|
|
147 |
|
|
148 |
|
@return |
149 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
150 |
149 |
public String getRenderWiki()... |
151 |
|
{ |
152 |
149 |
return renderWiki; |
153 |
|
} |
154 |
|
|
155 |
|
|
156 |
|
|
157 |
|
@param |
158 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
159 |
34 |
public void setRenderWiki(String renderWiki)... |
160 |
|
{ |
161 |
34 |
this.renderWiki = renderWiki; |
162 |
|
} |
163 |
|
|
164 |
|
|
165 |
|
@return |
166 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
167 |
2537 |
public String getRenderHTML()... |
168 |
|
{ |
169 |
2537 |
return renderHTML; |
170 |
|
} |
171 |
|
|
172 |
|
|
173 |
|
|
174 |
|
@param |
175 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
176 |
33 |
public void setRenderHTML(String renderHTML)... |
177 |
|
{ |
178 |
33 |
this.renderHTML = renderHTML; |
179 |
|
} |
180 |
|
|
181 |
|
|
182 |
|
@return |
183 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
184 |
2 |
public IconType getType()... |
185 |
|
{ |
186 |
2 |
return type; |
187 |
|
} |
188 |
|
|
189 |
|
|
190 |
|
|
191 |
|
@param |
192 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
193 |
32 |
public void setType(IconType type)... |
194 |
|
{ |
195 |
32 |
this.type = type; |
196 |
|
} |
197 |
|
|
198 |
|
|
199 |
|
@return |
200 |
|
@since |
201 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
202 |
2 |
public List<String> getIconNames()... |
203 |
|
{ |
204 |
2 |
return new ArrayList<>(iconMap.keySet()); |
205 |
|
} |
206 |
|
} |