Last change
on this file since 193 was
193,
checked in by Maciej Komosinski, 10 years ago
|
Set svn:eol-style native for all textual files
|
-
Property svn:eol-style set to
native
|
File size:
478 bytes
|
Rev | Line | |
---|
[84] | 1 | package com.framsticks.util.swing; |
---|
| 2 | |
---|
| 3 | public class TooltipConstructor { |
---|
| 4 | |
---|
| 5 | protected final StringBuilder builder = new StringBuilder(); |
---|
| 6 | |
---|
| 7 | public TooltipConstructor() { |
---|
| 8 | builder.append("<html>"); |
---|
| 9 | } |
---|
| 10 | |
---|
| 11 | public final TooltipConstructor append(String header, Object value) { |
---|
| 12 | if (value != null) { |
---|
| 13 | builder.append(header).append(": ").append(value).append("<br/>"); |
---|
| 14 | } |
---|
| 15 | return this; |
---|
| 16 | } |
---|
| 17 | |
---|
| 18 | public final String build() { |
---|
| 19 | builder.append("</html>"); |
---|
| 20 | return builder.toString(); |
---|
| 21 | } |
---|
| 22 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.