Changeset 1654 in josm for trunk/src/org/openstreetmap/josm/gui/conflict/nodes/NodeListTableCellRenderer.java
- Timestamp:
- 2009-06-07T23:22:54+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/conflict/nodes/NodeListTableCellRenderer.java
r1650 r1654 81 81 } 82 82 83 83 /** 84 * build the tool tip text for an {@see OsmPrimitive}. It consist of the formatted 85 * key/value pairs for this primitive. 86 * 87 * @param primitive 88 * @return the tool tip text 89 */ 84 90 public String buildToolTipText(OsmPrimitive primitive) { 85 91 StringBuilder sb = new StringBuilder(); 92 86 93 sb.append("<html>"); 94 // show the id 95 // 87 96 sb.append("<strong>id</strong>=") 88 97 .append(primitive.id) 89 98 .append("<br>"); 99 100 // show the key/value-pairs, sorted by key 101 // 90 102 ArrayList<String> keyList = new ArrayList<String>(primitive.keySet()); 91 103 Collections.sort(keyList); … … 99 111 .append("</strong>") 100 112 .append("="); 113 // make sure long values are split into several rows. Otherwise 114 // the tool tip window can become to wide 115 // 101 116 String value = primitive.get(key); 102 117 while(value.length() != 0) { … … 121 136 setForeground(Color.BLACK); 122 137 } 123 124 125 138 126 139 /**
Note:
See TracChangeset
for help on using the changeset viewer.