Ignore:
Timestamp:
2015-03-09T08:46:22+01:00 (9 years ago)
Author:
Don-vip
Message:

fix Sonar issue squid:ModifiersOrderCheck - Modifiers should be declared in the correct order

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/PresetLabel.java

    r7937 r8130  
    22package org.openstreetmap.josm.gui.tagging;
    33
    4 import javax.swing.JLabel;
    54import java.awt.Cursor;
    65import java.awt.Font;
     
    109import java.util.Collections;
    1110
     11import javax.swing.JLabel;
     12
    1213public class PresetLabel extends JLabel {
    1314
    1415    protected final TaggingPreset t;
    1516
     17    /**
     18     * Constructs a new {@code PresetLabel}.
     19     * @param t the tagging preset
     20     */
    1621    public PresetLabel(TaggingPreset t) {
    1722        super(t.getName() + " …");
     
    2631     */
    2732    public static class PresetLabelMouseListener implements MouseListener {
    28         final protected JLabel label;
    29         final protected Font hover;
    30         final protected Font normal;
     33        protected final JLabel label;
     34        protected final Font hover;
     35        protected final Font normal;
    3136
     37        /**
     38         * Constructs a new {@code PresetLabelMouseListener}.
     39         * @param lbl Label to highlight
     40         */
    3241        public PresetLabelMouseListener(JLabel lbl) {
    3342            label = lbl;
     
    3645            hover = normal.deriveFont(Collections.singletonMap(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_LOW_DOTTED));
    3746        }
     47
    3848        @Override
    39         public void mouseClicked(MouseEvent arg0) {
     49        public void mouseClicked(MouseEvent e) {
     50            // Do nothing
    4051        }
    4152
    4253        @Override
    43         public void mouseEntered(MouseEvent arg0) {
     54        public void mouseEntered(MouseEvent e) {
    4455            label.setFont(hover);
    4556        }
     57
    4658        @Override
    47         public void mouseExited(MouseEvent arg0) {
     59        public void mouseExited(MouseEvent e) {
    4860            label.setFont(normal);
    4961        }
     62
    5063        @Override
    51         public void mousePressed(MouseEvent arg0) {}
     64        public void mousePressed(MouseEvent e) {
     65            // Do nothing
     66        }
     67
    5268        @Override
    53         public void mouseReleased(MouseEvent arg0) {}
     69        public void mouseReleased(MouseEvent e) {
     70            // Do nothing
     71        }
    5472    }
    5573}
Note: See TracChangeset for help on using the changeset viewer.