Ignore:
Timestamp:
2016-07-04T09:26:26+02:00 (8 years ago)
Author:
donvip
Message:

checkstyle

Location:
applications/editors/josm/plugins/touchscreenhelper/src/touchscreenhelper
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/touchscreenhelper/src/touchscreenhelper/BrowseAction.java

    r31690 r32550  
     1// License: GPL. For details, see LICENSE file.
    12package touchscreenhelper;
    23
     
    1112import org.openstreetmap.josm.Main;
    1213import org.openstreetmap.josm.actions.mapmode.MapMode;
     14import org.openstreetmap.josm.data.coor.EastNorth;
    1315import org.openstreetmap.josm.gui.MapFrame;
    14 import org.openstreetmap.josm.data.coor.EastNorth;
    1516import org.openstreetmap.josm.tools.Shortcut;
    1617
     
    2829        MapFrame.addMapModeChangeListener(this);
    2930    }
    30    
     31
    3132    @Override
    3233    public void mapModeChange(MapMode oldMapMode, MapMode newMapMode) {
    3334        this.oldMapMode = oldMapMode;
    3435    }
    35    
     36
    3637    @Override public void enterMode() {
    3738        super.enterMode();
     
    4344            protected void doKeyReleaseEvent(KeyEvent evt) {
    4445                if (evt.getKeyCode() == getShortcut().getKeyStroke().getKeyCode()) {
    45                     if (oldMapMode!=null && !(oldMapMode instanceof BrowseAction))
     46                    if (oldMapMode != null && !(oldMapMode instanceof BrowseAction))
    4647                    Main.map.selectMapMode(oldMapMode);
    4748                }
     
    5859    }
    5960
     61    @Override
    6062    public void mouseDragged(MouseEvent e) {
    6163        if ((e.getModifiersEx() & MouseEvent.BUTTON1_DOWN_MASK) !=
  • applications/editors/josm/plugins/touchscreenhelper/src/touchscreenhelper/TimedKeyReleaseListener.java

    r31690 r32550  
     1// License: GPL. For details, see LICENSE file.
    12package touchscreenhelper;
    23
    34// Thanks to http://www.arco.in-berlin.de/keyevent.html
    45// (code simplified here)
    5 
    66
    77import java.awt.AWTEvent;
     
    1212import java.awt.event.KeyEvent;
    1313import java.util.TreeSet;
     14
    1415import javax.swing.Timer;
     16
     17import org.openstreetmap.josm.Main;
    1518
    1619public class TimedKeyReleaseListener implements AWTEventListener {
     
    1821    private Timer timer;
    1922    protected KeyEvent releaseEvent;
    20    
     23
    2124    public TimedKeyReleaseListener() {
    2225        timer = new Timer(0, new ActionListener() {
     
    2932            }
    3033        });
    31        
     34
    3235        try {
    3336            Toolkit.getDefaultToolkit().addAWTEventListener(this,
    3437                    AWTEvent.KEY_EVENT_MASK);
    3538        } catch (SecurityException ex) {
     39            Main.error(ex);
    3640        }
    3741    }
     42
    3843    @Override
    3944    public void eventDispatched(AWTEvent event) {
     
    5762        }
    5863    }
    59    
    6064
    6165    public void stop() {
     
    6367            Toolkit.getDefaultToolkit().removeAWTEventListener(this);
    6468        } catch (SecurityException ex) {
     69            Main.error(ex);
    6570        }
    6671    }
    6772
    68    
    6973    protected void doKeyReleaseEvent(KeyEvent evt) {
    7074    }
  • applications/editors/josm/plugins/touchscreenhelper/src/touchscreenhelper/TouchScreenHelperPlugin.java

    r23193 r32550  
     1// License: GPL. For details, see LICENSE file.
    12package touchscreenhelper;
    23
    34import org.openstreetmap.josm.Main;
     5import org.openstreetmap.josm.gui.IconToggleButton;
    46import org.openstreetmap.josm.gui.MapFrame;
    5 import org.openstreetmap.josm.gui.IconToggleButton;
    67import org.openstreetmap.josm.plugins.Plugin;
    78import org.openstreetmap.josm.plugins.PluginInformation;
     
    1112        super(info);
    1213    }
    13     @Override public void mapFrameInitialized(MapFrame oldFrame,
     14
     15    @Override
     16    public void mapFrameInitialized(MapFrame oldFrame,
    1417        MapFrame newFrame) {
    1518        if (oldFrame == null && newFrame != null) {
Note: See TracChangeset for help on using the changeset viewer.