Changeset 17269 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2020-10-26T18:20:09+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java
r17188 r17269 7 7 import java.awt.Component; 8 8 import java.awt.event.ActionEvent; 9 import java.awt.event.KeyEvent; 9 10 import java.awt.event.MouseAdapter; 10 11 import java.awt.event.MouseEvent; 11 import java.awt.event.KeyEvent;12 12 import java.text.DateFormat; 13 13 import java.util.ArrayList; … … 51 51 import org.openstreetmap.josm.tools.ImageProvider; 52 52 import org.openstreetmap.josm.tools.OpenBrowser; 53 import org.openstreetmap.josm.tools.Shortcut; 53 54 import org.openstreetmap.josm.tools.date.DateUtils; 54 import org.openstreetmap.josm.tools.Shortcut;55 55 56 56 /** … … 229 229 } 230 230 231 privatestatic class NoteRenderer implements ListCellRenderer<Note> {231 static class NoteRenderer implements ListCellRenderer<Note> { 232 232 233 233 private final DefaultListCellRenderer defaultListCellRenderer = new DefaultListCellRenderer(); … … 242 242 JLabel jlabel = (JLabel) comp; 243 243 if (fstComment != null) { 244 String text = note.getFirstComment().getText();245 String userName = note.getFirstComment().getUser().getName();244 String text = fstComment.getText(); 245 String userName = fstComment.getUser().getName(); 246 246 if (userName == null || userName.isEmpty()) { 247 247 userName = "<Anonymous>"; … … 249 249 String toolTipText = userName + " @ " + dateFormat.format(note.getCreatedAt()); 250 250 jlabel.setToolTipText(toolTipText); 251 jlabel.setText(note.getId() + ": " +text );251 jlabel.setText(note.getId() + ": " +text.replace("\n\n", "\n").replace("\n", "; ").replace(":; ", ": ")); 252 252 } else { 253 253 jlabel.setToolTipText(null);
Note:
See TracChangeset
for help on using the changeset viewer.