Changeset 135 in josm
- Timestamp:
- 2006-08-15T17:55:31+02:00 (18 years ago)
- Files:
-
- 9 added
- 1 deleted
- 4 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
.classpath
r111 r135 2 2 <classpath> 3 3 <classpathentry kind="src" path="src"/> 4 <classpathentry including="images/" excluding="po/org/|po/" kind="src" path=""/> 4 <classpathentry kind="src" path="test"/> 5 <classpathentry excluding="po/|src/|test/" including="images/" kind="src" path=""/> 5 6 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> 6 <classpathentry sourcepath="JUNIT_SRC_HOME/junitsrc.zip " kind="var" path="JUNIT_HOME/junit.jar"/>7 <classpathentry kind="var" path="JUNIT_HOME/junit.jar" sourcepath="JUNIT_SRC_HOME/junitsrc.zip"/> 7 8 <classpathentry kind="lib" path="lib/MinML2.jar"/> 8 9 <classpathentry kind="lib" path="lib/metadata-extractor-2.3.1.jar"/> -
build.xml
r134 r135 31 31 </target> 32 32 33 <target name="dist" depends="compile ,gettext">33 <target name="dist" depends="compile"> 34 34 <!-- jars --> 35 35 <unjar src="${lib}/MinML2.jar" dest="${build}" /> -
src/org/openstreetmap/josm/actions/GroupAction.java
r101 r135 3 3 import java.awt.event.ActionEvent; 4 4 import java.awt.event.ActionListener; 5 import java.awt.event.KeyEvent; 5 6 import java.beans.PropertyChangeEvent; 6 7 import java.beans.PropertyChangeListener; … … 8 9 import java.util.List; 9 10 11 import javax.swing.AbstractAction; 10 12 import javax.swing.Action; 11 13 import javax.swing.Icon; … … 30 32 private PropertyChangeListener forwardActiveListener = new PropertyChangeListener(){ 31 33 public void propertyChange(PropertyChangeEvent evt) { 32 if (evt.getPropertyName().equals("active")) {34 if (evt.getPropertyName().equals("active")) 33 35 putValue("active", evt.getNewValue()); 34 if (evt.getNewValue() == Boolean.FALSE)35 cycle = false;36 }37 36 } 38 37 }; 39 public boolean cycle;40 38 41 39 protected void setCurrent(int current) { … … 53 51 String idName = getClass().getName(); 54 52 Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(shortCut, modifiers), idName); 55 53 Main.contentPane.getActionMap().put(idName, this); 56 54 shortCutName = ShortCutLabel.name(shortCut, modifiers); 57 addPropertyChangeListener(new PropertyChangeListener(){ 58 public void propertyChange(PropertyChangeEvent evt) { 59 if (evt.getPropertyName().equals("active") && evt.getNewValue() == Boolean.FALSE) 60 cycle = false; 61 } 55 Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(shortCut, KeyEvent.SHIFT_DOWN_MASK), idName+".cycle"); 56 Main.contentPane.getActionMap().put(idName+".cycle", new AbstractAction(){ 57 public void actionPerformed(ActionEvent e) { 58 setCurrent((current+1)%actions.size()); 59 actions.get(current).actionPerformed(e); 60 } 62 61 }); 63 62 } … … 68 67 b.setSelected(!b.isSelected()); 69 68 openPopup(b); 70 } else { 71 if (cycle) 72 setCurrent((current+1)%actions.size()); 73 else 74 cycle = true; 69 } else 75 70 actions.get(current).actionPerformed(e); 76 }77 71 } 78 72 -
src/org/openstreetmap/josm/gui/MapMover.java
r102 r135 32 32 } 33 33 public void actionPerformed(ActionEvent e) { 34 if (action.equals("+") || action.equals("-")) { 34 System.out.println("e="+e.toString()+" action="+e.getActionCommand()); 35 if (action.equals(".") || action.equals(",")) { 35 36 Point mouse = nc.getMousePosition(); 36 37 if (mouse == null) 37 38 mouse = new Point((int)nc.getBounds().getCenterX(), (int)nc.getBounds().getCenterY()); 38 MouseWheelEvent we = new MouseWheelEvent(nc, e.getID(), e.getWhen(), e.getModifiers(), mouse.x, mouse.y, 0, false, MouseWheelEvent.WHEEL_UNIT_SCROLL, 1, action.equals(" +") ? -1 : 1);39 MouseWheelEvent we = new MouseWheelEvent(nc, e.getID(), e.getWhen(), e.getModifiers(), mouse.x, mouse.y, 0, false, MouseWheelEvent.WHEEL_UNIT_SCROLL, 1, action.equals(",") ? -1 : 1); 39 40 mouseWheelMoved(we); 40 41 } else { … … 78 79 nc.addMouseWheelListener(this); 79 80 80 String[] n = {" +","-","up","right","down","left"};81 int[] k = {KeyEvent.VK_ PLUS, KeyEvent.VK_MINUS, KeyEvent.VK_UP, KeyEvent.VK_RIGHT, KeyEvent.VK_DOWN, KeyEvent.VK_LEFT};81 String[] n = {",",".","up","right","down","left"}; 82 int[] k = {KeyEvent.VK_COMMA, KeyEvent.VK_PERIOD, KeyEvent.VK_UP, KeyEvent.VK_RIGHT, KeyEvent.VK_DOWN, KeyEvent.VK_LEFT}; 82 83 83 84 for (int i = 0; i < n.length; ++i) { -
test/org/openstreetmap/josm/data/osm/visitor/MergeVisitorTest.java
r132 r135 1 package org.openstreetmap.josm. test;1 package org.openstreetmap.josm.data.osm.visitor; 2 2 3 3 import java.util.Date; … … 12 12 import org.openstreetmap.josm.data.osm.Way; 13 13 import org.openstreetmap.josm.data.osm.visitor.MergeVisitor; 14 import org.openstreetmap.josm.test .framework.Bug;15 import org.openstreetmap.josm.test .framework.DataSetTestCaseHelper;14 import org.openstreetmap.josm.testframework.Bug; 15 import org.openstreetmap.josm.testframework.DataSetTestCaseHelper; 16 16 17 17 public class MergeVisitorTest extends TestCase { -
test/org/openstreetmap/josm/testframework/Bug.java
r132 r135 1 package org.openstreetmap.josm.test .framework;1 package org.openstreetmap.josm.testframework; 2 2 3 3 /** -
test/org/openstreetmap/josm/testframework/DataSetTestCaseHelper.java
r132 r135 1 package org.openstreetmap.josm.test .framework;1 package org.openstreetmap.josm.testframework; 2 2 3 3 import java.util.Arrays;
Note:
See TracChangeset
for help on using the changeset viewer.