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