Changeset 12939 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2017-10-08T00:21:17+02:00 (7 years ago)
Author:
Don-vip
Message:

fix #15177 - Query changesets: Make JMultilineLabel clickable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanel.java

    r12846 r12939  
    1010import java.awt.event.ItemEvent;
    1111import java.awt.event.ItemListener;
     12import java.awt.event.MouseAdapter;
     13import java.awt.event.MouseEvent;
    1214import java.util.EnumMap;
    1315import java.util.Map;
     
    6062            rbQueries.put(q, rb);
    6163            bgQueries.add(rb);
    62             lblQueries.put(q, new JMultilineLabel(""));
     64            JMultilineLabel lbl = new JMultilineLabel("");
     65            lbl.addMouseListener(new MouseAdapter() {
     66                @Override
     67                public void mouseClicked(MouseEvent e) {
     68                    if (rb.isEnabled()) {
     69                        rb.setSelected(true);
     70                    }
     71                }
     72            });
     73            lblQueries.put(q, lbl);
    6374        }
    6475
Note: See TracChangeset for help on using the changeset viewer.