Changeset 5862 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2013-04-14T19:39:16+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/OsmPrimitivRenderer.java
r4209 r5862 5 5 6 6 import javax.swing.DefaultListCellRenderer; 7 import javax.swing.ImageIcon; 7 8 import javax.swing.JLabel; 8 9 import javax.swing.JList; … … 12 13 import javax.swing.table.TableCellRenderer; 13 14 15 import org.openstreetmap.josm.Main; 14 16 import org.openstreetmap.josm.data.osm.OsmPrimitive; 15 17 import org.openstreetmap.josm.data.osm.history.HistoryOsmPrimitive; … … 68 70 if (def != null && value != null && def instanceof JLabel) { 69 71 ((JLabel)def).setText(getComponentText(value)); 70 ((JLabel)def).setIcon(ImageProvider.get(value.getDisplayType())); 72 ImageIcon icon = ImageProvider.get(value.getDisplayType()); 73 if (icon != null) { 74 ((JLabel)def).setIcon(icon); 75 } else { 76 Main.warn("Null icon for "+value.getDisplayType()); 77 } 71 78 ((JLabel)def).setToolTipText(getComponentToolTipText(value)); 72 79 }
Note:
See TracChangeset
for help on using the changeset viewer.