diff --git a/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java b/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
index 07cabc76a..8c4601232 100644
|
a
|
b
|
import org.openstreetmap.josm.tools.CheckParameterUtil;
|
| 34 | 34 | import org.openstreetmap.josm.tools.ImageProvider; |
| 35 | 35 | import org.openstreetmap.josm.tools.ImageProvider.ImageSizes; |
| 36 | 36 | import org.openstreetmap.josm.tools.Logging; |
| | 37 | import org.openstreetmap.josm.tools.Platform; |
| 37 | 38 | import org.openstreetmap.josm.tools.MultiMap; |
| 38 | 39 | import org.openstreetmap.josm.tools.StreamUtils; |
| 39 | 40 | import org.openstreetmap.josm.tools.Utils; |
| … |
… |
public class ImageryInfo extends
|
| 705 | 706 | |
| 706 | 707 | /** |
| 707 | 708 | * Returns a tool tip text for display. |
| 708 | | * @return The text |
| | 709 | * @return The text, which is a plain-text string for the Mac and HTML for other platforms. |
| 709 | 710 | * @since 8065 |
| 710 | 711 | */ |
| 711 | 712 | @Override |
| 712 | 713 | public String getToolTipText() { |
| 713 | 714 | StringBuilder res = new StringBuilder(getName()); |
| 714 | | boolean html = false; |
| 715 | 715 | String dateStr = getDate(); |
| 716 | 716 | if (dateStr != null && !dateStr.isEmpty()) { |
| 717 | 717 | res.append("<br>").append(tr("Date of imagery: {0}", dateStr)); |
| 718 | | html = true; |
| 719 | 718 | } |
| 720 | 719 | if (category != null && category.getDescription() != null) { |
| 721 | 720 | res.append("<br>").append(tr("Imagery category: {0}", category.getDescription())); |
| 722 | | html = true; |
| 723 | 721 | } |
| 724 | 722 | if (bestMarked) { |
| 725 | 723 | res.append("<br>").append(tr("This imagery is marked as best in this region in other editors.")); |
| 726 | | html = true; |
| 727 | 724 | } |
| 728 | 725 | if (overlay) { |
| 729 | 726 | res.append("<br>").append(tr("This imagery is an overlay.")); |
| 730 | | html = true; |
| 731 | 727 | } |
| 732 | 728 | String desc = getDescription(); |
| 733 | 729 | if (desc != null && !desc.isEmpty()) { |
| 734 | 730 | res.append("<br>").append(Utils.escapeReservedCharactersHTML(desc)); |
| 735 | | html = true; |
| 736 | 731 | } |
| 737 | | if (html) { |
| 738 | | res.insert(0, "<html>").append("</html>"); |
| | 732 | if (Platform.OSX.equals(Platform.determinePlatform())) { |
| | 733 | return res.toString().replaceAll("<br>", "\n"); |
| | 734 | } else { |
| | 735 | if (res.length() > 0) { |
| | 736 | return res.insert(0, "<html>").append("</html>").toString(); |
| | 737 | } else { |
| | 738 | return null; |
| | 739 | } |
| 739 | 740 | } |
| 740 | | return res.toString(); |
| 741 | 741 | } |
| 742 | 742 | |
| 743 | 743 | /** |