| | | 1 | if (item.getEmailAddress() != null) {↵
|
| | | 2 | buf.append("<br> eMail: "↵
|
| | | 3 | + convert((String) item.getEmailAddress()));↵
|
| | | 4 | }↵
|
| | | 5 | // TODO ↵
|
1 | if (item.getWebsite() != null) {↵ | | 6 | // if (item.getWebsite() != null) {↵
|
2 | buf.append("<br> Website: "↵ | | 7 | // buf.append("<br> Website: "↵
|
3 | + convert((String) item.getWebsite()));↵ | | 8 | // + convert((String) item.getWebsite()));↵
|
4 | }↵ | | 9 | // }↵
|
5 | buf.append("</body></html>");↵ | | 10 | buf.append("</body></html>");↵
|
|
6 | return buf.toString();↵ | | 11 | return buf.toString();↵
|
7 | }↵ | | 12 | }↵
|
|
8 | public static String createToolTip(GroupModelPartial item) {↵ | | 13 | public static String createToolTip(IGroupItem item) {↵
|
|
9 | StringBuffer buf = new StringBuffer();↵ | | 14 | StringBuffer buf = new StringBuffer();↵
|
|
10 | buf.append("<html><body> Name: " + item.getName());↵ | | 15 | buf.append("<html><body> Name: " + item.getName());↵
|
11 | if (item.getDescription() != null) {↵ | | 16 | if (item.getDescription() != null) {↵
|
12 | buf.append("<br> Description: " + item.getDescription());↵ | | 17 | buf.append("<br> Description: " + item.getDescription());↵
|
13 | }↵ | | 18 | }↵
|
14 | buf.append("</body></html>");↵ | | 19 | buf.append("</body></html>");↵
|
|
15 | return buf.toString();↵ | | 20 | return buf.toString();↵
|
16 | }↵ | | 21 | }↵
|
|
17 | private static String convert(String str) {↵ | | 22 | private static String convert(String str) {↵
|
18 | if (str == null) {↵ | | 23 | if (str == null) {↵
|
19 | return "";↵ | | 24 | return "";↵
|
20 | }↵ | | 25 | }↵
|
|
21 | StringBuffer result = new StringBuffer();↵ | | 26 | StringBuffer result = new StringBuffer();↵
|
22 | int pos = 0;↵ | | 27 | int pos = 0;↵
|
23 | char ch;↵ | | 28 | char ch;↵
|
|
24 | while (pos < str.length()) {↵ | | 29 | while (pos < str.length()) {↵
|
25 | ch = str.charAt(pos);↵ | | 30 | ch = str.charAt(pos);↵
|
|
26 | if (ch == '<') {↵ | | 31 | if (ch == '<') {↵
|
27 | result.append("<");↵ | | 32 | result.append("<");↵
|
28 | } else if (ch == '>') {↵ | | 33 | } else if (ch == '>') {↵
|
29 | result.append(">");↵ | | 34 | result.append(">");↵
|
30 | } else {↵ | | 35 | } else {↵
|
31 | result.append(ch);↵ | | 36 | result.append(ch);↵
|
32 | }↵ | | 37 | }↵
|
|
33 | pos++;↵ | | 38 | pos++;↵
|
34 | }↵ | | 39 | }↵
|
|
35 | return result.toString();↵ | | 40 | return result.toString();↵
|
36 | } | | 41 | }
|