Changeset 32550 in osm for applications/editors/josm/plugins/touchscreenhelper
- Timestamp:
- 2016-07-04T09:26:26+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/touchscreenhelper
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/touchscreenhelper/.project
r32286 r32550 16 16 </arguments> 17 17 </buildCommand> 18 <buildCommand> 19 <name>net.sf.eclipsecs.core.CheckstyleBuilder</name> 20 <arguments> 21 </arguments> 22 </buildCommand> 18 23 </buildSpec> 19 24 <natures> 20 25 <nature>org.eclipse.jdt.core.javanature</nature> 26 <nature>net.sf.eclipsecs.core.CheckstyleNature</nature> 21 27 </natures> 22 28 </projectDescription> -
applications/editors/josm/plugins/touchscreenhelper/src/touchscreenhelper/BrowseAction.java
r31690 r32550 1 // License: GPL. For details, see LICENSE file. 1 2 package touchscreenhelper; 2 3 … … 11 12 import org.openstreetmap.josm.Main; 12 13 import org.openstreetmap.josm.actions.mapmode.MapMode; 14 import org.openstreetmap.josm.data.coor.EastNorth; 13 15 import org.openstreetmap.josm.gui.MapFrame; 14 import org.openstreetmap.josm.data.coor.EastNorth;15 16 import org.openstreetmap.josm.tools.Shortcut; 16 17 … … 28 29 MapFrame.addMapModeChangeListener(this); 29 30 } 30 31 31 32 @Override 32 33 public void mapModeChange(MapMode oldMapMode, MapMode newMapMode) { 33 34 this.oldMapMode = oldMapMode; 34 35 } 35 36 36 37 @Override public void enterMode() { 37 38 super.enterMode(); … … 43 44 protected void doKeyReleaseEvent(KeyEvent evt) { 44 45 if (evt.getKeyCode() == getShortcut().getKeyStroke().getKeyCode()) { 45 if (oldMapMode !=null && !(oldMapMode instanceof BrowseAction))46 if (oldMapMode != null && !(oldMapMode instanceof BrowseAction)) 46 47 Main.map.selectMapMode(oldMapMode); 47 48 } … … 58 59 } 59 60 61 @Override 60 62 public void mouseDragged(MouseEvent e) { 61 63 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. 1 2 package touchscreenhelper; 2 3 3 4 // Thanks to http://www.arco.in-berlin.de/keyevent.html 4 5 // (code simplified here) 5 6 6 7 7 import java.awt.AWTEvent; … … 12 12 import java.awt.event.KeyEvent; 13 13 import java.util.TreeSet; 14 14 15 import javax.swing.Timer; 16 17 import org.openstreetmap.josm.Main; 15 18 16 19 public class TimedKeyReleaseListener implements AWTEventListener { … … 18 21 private Timer timer; 19 22 protected KeyEvent releaseEvent; 20 23 21 24 public TimedKeyReleaseListener() { 22 25 timer = new Timer(0, new ActionListener() { … … 29 32 } 30 33 }); 31 34 32 35 try { 33 36 Toolkit.getDefaultToolkit().addAWTEventListener(this, 34 37 AWTEvent.KEY_EVENT_MASK); 35 38 } catch (SecurityException ex) { 39 Main.error(ex); 36 40 } 37 41 } 42 38 43 @Override 39 44 public void eventDispatched(AWTEvent event) { … … 57 62 } 58 63 } 59 60 64 61 65 public void stop() { … … 63 67 Toolkit.getDefaultToolkit().removeAWTEventListener(this); 64 68 } catch (SecurityException ex) { 69 Main.error(ex); 65 70 } 66 71 } 67 72 68 69 73 protected void doKeyReleaseEvent(KeyEvent evt) { 70 74 } -
applications/editors/josm/plugins/touchscreenhelper/src/touchscreenhelper/TouchScreenHelperPlugin.java
r23193 r32550 1 // License: GPL. For details, see LICENSE file. 1 2 package touchscreenhelper; 2 3 3 4 import org.openstreetmap.josm.Main; 5 import org.openstreetmap.josm.gui.IconToggleButton; 4 6 import org.openstreetmap.josm.gui.MapFrame; 5 import org.openstreetmap.josm.gui.IconToggleButton;6 7 import org.openstreetmap.josm.plugins.Plugin; 7 8 import org.openstreetmap.josm.plugins.PluginInformation; … … 11 12 super(info); 12 13 } 13 @Override public void mapFrameInitialized(MapFrame oldFrame, 14 15 @Override 16 public void mapFrameInitialized(MapFrame oldFrame, 14 17 MapFrame newFrame) { 15 18 if (oldFrame == null && newFrame != null) {
Note:
See TracChangeset
for help on using the changeset viewer.