diff --git a/src/org/openstreetmap/josm/gui/dialogs/properties/PresetListPanel.java b/src/org/openstreetmap/josm/gui/dialogs/properties/PresetListPanel.java
index 3165798..f8bf80f 100644
|
a
|
b
|
import java.awt.Font;
|
| 7 | 7 | import java.awt.GridBagLayout; |
| 8 | 8 | import java.awt.event.MouseEvent; |
| 9 | 9 | import java.awt.event.MouseListener; |
| | 10 | import java.awt.font.TextAttribute; |
| 10 | 11 | import java.util.Collection; |
| | 12 | import java.util.Collections; |
| | 13 | import java.util.Hashtable; |
| 11 | 14 | import java.util.List; |
| 12 | 15 | import java.util.Map; |
| 13 | 16 | |
| | 17 | import javax.swing.Action; |
| | 18 | import javax.swing.Icon; |
| 14 | 19 | import javax.swing.JLabel; |
| 15 | 20 | import javax.swing.JPanel; |
| 16 | 21 | |
| … |
… |
public class PresetListPanel extends JPanel {
|
| 41 | 46 | */ |
| 42 | 47 | private static class PresetLabelML implements MouseListener { |
| 43 | 48 | final JLabel label; |
| 44 | | final Font bold; |
| | 49 | final Font hover; |
| 45 | 50 | final Font normal; |
| 46 | 51 | final TaggingPreset tag; |
| 47 | 52 | final PresetHandler presetHandler; |
| … |
… |
public class PresetListPanel extends JPanel {
|
| 51 | 56 | label = lbl; |
| 52 | 57 | lbl.setCursor(new Cursor(Cursor.HAND_CURSOR)); |
| 53 | 58 | normal = label.getFont(); |
| 54 | | bold = normal.deriveFont(normal.getStyle() ^ Font.BOLD); |
| | 59 | hover = normal.deriveFont(Collections.singletonMap(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_LOW_DOTTED)); |
| 55 | 60 | tag = t; |
| 56 | 61 | this.presetHandler = presetHandler; |
| 57 | 62 | } |
| … |
… |
public class PresetListPanel extends JPanel {
|
| 67 | 72 | |
| 68 | 73 | } |
| 69 | 74 | public void mouseEntered(MouseEvent arg0) { |
| 70 | | label.setFont(bold); |
| | 75 | label.setFont(hover); |
| 71 | 76 | } |
| 72 | 77 | public void mouseExited(MouseEvent arg0) { |
| 73 | 78 | label.setFont(normal); |
| … |
… |
public class PresetListPanel extends JPanel {
|
| 133 | 138 | continue; |
| 134 | 139 | } |
| 135 | 140 | |
| 136 | | JLabel lbl = new JLabel(t.getName()); |
| | 141 | JLabel lbl = new JLabel(t.getName() + " …"); |
| | 142 | lbl.setIcon((Icon) t.getValue(Action.SMALL_ICON)); |
| 137 | 143 | lbl.addMouseListener(new PresetLabelML(lbl, t, presetHandler)); |
| 138 | 144 | add(lbl, GBC.eol().fill(GBC.HORIZONTAL)); |
| 139 | 145 | } |