Changeset 17650 in josm for trunk/src/org
- Timestamp:
- 2021-03-23T23:31:54+01:00 (4 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Check.java
r17609 r17650 2 2 package org.openstreetmap.josm.gui.tagging.presets.items; 3 3 4 import java.awt.GridBagLayout;5 import java.awt.event.MouseAdapter;6 import java.awt.event.MouseEvent;7 4 import java.util.ArrayList; 8 5 import java.util.Arrays; … … 10 7 import java.util.List; 11 8 12 import javax.swing.JLabel;13 9 import javax.swing.JPanel; 14 10 … … 17 13 import org.openstreetmap.josm.data.osm.Tag; 18 14 import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetItemGuiSupport; 15 import org.openstreetmap.josm.gui.widgets.IconTextCheckBox; 19 16 import org.openstreetmap.josm.gui.widgets.QuadStateCheckBox; 20 17 import org.openstreetmap.josm.tools.GBC; … … 88 85 89 86 if (icon != null) { 90 JPanel checkPanel = new JPanel(new GridBagLayout()); 91 checkPanel.add(check, GBC.std()); 92 JLabel label = new JLabel(locale_text); 93 addIcon(label); 94 label.addMouseListener(new MouseAdapter() { 95 @Override 96 public void mousePressed(MouseEvent e) { 97 check.getMouseAdapter().mousePressed(e); 98 } 99 }); 100 checkPanel.add(label); 101 checkPanel.add(new JLabel(), GBC.eol().fill()); 87 JPanel checkPanel = IconTextCheckBox.wrap(check, locale_text, getIcon()); 102 88 p.add(checkPanel, GBC.eol()); // Do not fill, see #15104 103 89 } else {
Note:
See TracChangeset
for help on using the changeset viewer.