Changeset 22547 in osm
- Timestamp:
- 2010-08-03T08:11:51+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/build.xml
r21706 r22547 17 17 ** 18 18 ** To build against the core in ../../core, create a correct manifest and deploy to 19 ** SVN, 19 ** SVN, 20 20 ** set the properties commit.message and plugin.main.version 21 21 ** and run … … 30 30 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 31 31 <property name="ant.build.javac.target" value="1.5"/> 32 33 32 33 34 34 35 35 <property name="commit.message" value="Changed constructor for Plugin" /> 36 <property name="plugin.main.version" value="3 174" />37 36 <property name="plugin.main.version" value="3408" /> 37 38 38 <target name="init"> 39 39 <mkdir dir="${plugin.build.dir}"/> … … 87 87 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/> 88 88 </target> 89 89 90 90 <!-- 91 ************************** Publishing the plugin *********************************** 91 ************************** Publishing the plugin *********************************** 92 92 --> 93 93 <!-- 94 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 94 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 95 95 ** property ${coreversion.info.entry.revision} 96 96 ** … … 104 104 </exec> 105 105 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/> 106 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo> 106 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo> 107 107 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo> 108 108 <delete file="core.info.xml" /> … … 119 119 <arg value="-m '${commit.message}'"/> 120 120 <arg value="."/> 121 </exec> 121 </exec> 122 122 </target> 123 123 … … 131 131 <arg value="up"/> 132 132 <arg value="."/> 133 </exec> 133 </exec> 134 134 <echo>Updating ${plugin.jar} ...</echo> 135 135 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> … … 137 137 <arg value="up"/> 138 138 <arg value="../dist/${plugin.jar}"/> 139 </exec> 139 </exec> 140 140 </target> 141 141 142 142 <!-- 143 ** commits the plugin.jar 143 ** commits the plugin.jar 144 144 --> 145 145 <target name="commit-dist"> 146 146 <echo> 147 147 ***** Properties of published ${plugin.jar} ***** 148 Commit message : '${commit.message}' 148 Commit message : '${commit.message}' 149 149 Plugin-Mainversion: ${plugin.main.version} 150 150 JOSM build version: ${coreversion.info.entry.revision} 151 151 Plugin-Version : ${version.entry.commit.revision} 152 ***** / Properties of published ${plugin.jar} ***** 153 152 ***** / Properties of published ${plugin.jar} ***** 153 154 154 Now commiting ${plugin.jar} ... 155 </echo> 155 </echo> 156 156 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 157 157 <env key="LANG" value="C"/> 158 158 <arg value="-m '${commit.message}'"/> 159 <arg value="commit"/> 159 <arg value="commit"/> 160 160 <arg value="${plugin.jar}"/> 161 </exec> 161 </exec> 162 162 </target> 163 163 164 164 <target name="publish" depends="core-info,commit-current,update-current,clean,dist,commit-dist"> 165 165 </target> -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java
r22153 r22547 5 5 6 6 import java.awt.Color; 7 import java.awt.Component;8 7 import java.awt.Graphics; 9 8 import java.awt.Graphics2D; … … 22 21 import java.util.Vector; 23 22 23 import javax.swing.Action; 24 24 import javax.swing.Icon; 25 25 import javax.swing.ImageIcon; 26 import javax.swing.JMenuItem;27 26 import javax.swing.JOptionPane; 28 27 … … 44 43 public class WMSLayer extends Layer implements ImageObserver { 45 44 46 Component[] component = null;47 48 45 private int lambertZone = -1; 49 46 … … 59 56 */ 60 57 protected final int serializeFormatVersion = 4; 61 58 62 59 public static int currentFormat; 63 60 64 61 private static final int cBBoxForBuildings = 50; // hard coded size of grabbed boxes for building layers 65 62 … … 69 66 70 67 private String location = ""; 71 68 72 69 private String departement = ""; 73 70 … … 88 85 private double rasterRatio; 89 86 90 private JMenuItemsaveAsPng;91 87 private Action saveAsPng; 88 92 89 public boolean adjustModeEnabled; 93 90 … … 106 103 } 107 104 108 public void destroy() { 105 @Override 106 public void destroy() { 109 107 // if the layer is currently saving the images in the cache, wait until it's finished 110 108 if (cacheControl != null) { … … 119 117 System.out.println("Layer "+location+" destroyed"); 120 118 } 121 119 122 120 private static String buildName(String location, String codeCommune, boolean buildingOnly) { 123 String ret = new String(location.toUpperCase());121 String ret = location.toUpperCase(); 124 122 if (codeCommune != null && !codeCommune.equals("")) 125 123 ret += "(" + codeCommune + ")"; … … 136 134 grab(grabber, b, true); 137 135 } 138 136 139 137 public void grab(CadastreGrabber grabber, Bounds b, boolean useFactor) throws IOException { 140 138 cancelled = false; … … 225 223 } else { 226 224 // divide to fixed size squares 227 int cSquare = factor == 4 ? Integer.parseInt(Main.pref.get("cadastrewms.squareSize", "100")) : optionalSize; 225 int cSquare = factor == 4 ? Integer.parseInt(Main.pref.get("cadastrewms.squareSize", "100")) : optionalSize; 228 226 minEast = minEast - minEast % cSquare; 229 227 minNorth = minNorth - minNorth % cSquare; … … 286 284 if (this.adjustModeEnabled) { 287 285 WMSAdjustAction.paintAdjustFrames(g, mv); 288 } 286 } 289 287 } 290 288 … … 303 301 304 302 @Override 305 public Component[] getMenuEntries() {306 saveAsPng = new JMenuItem(new MenuActionSaveRasterAs(this));303 public Action[] getMenuEntries() { 304 saveAsPng = new MenuActionSaveRasterAs(this); 307 305 saveAsPng.setEnabled(isRaster); 308 component = new Component[] { new JMenuItem(LayerListDialog.getInstance().createShowHideLayerAction(this)), 309 new JMenuItem(LayerListDialog.getInstance().createDeleteLayerAction(this)), 310 new JMenuItem(new MenuActionLoadFromCache()), 306 return new Action[] { 307 LayerListDialog.getInstance().createShowHideLayerAction(), 308 LayerListDialog.getInstance().createDeleteLayerAction(), 309 new MenuActionLoadFromCache(), 311 310 saveAsPng, 312 new JMenuItem(new LayerListPopup.InfoAction(this)),311 new LayerListPopup.InfoAction(this), 313 312 314 313 }; 315 return component;316 314 } 317 315 … … 443 441 double ratio = rasterSizeY/rasterSizeX; 444 442 // keep same ratio on screen as WMS bbox (stored in communeBBox) 445 rasterMin = new EastNorth(eaMin.getX(), rasterCenter.getY()-(eaMax.getX()-eaMin.getX())*ratio/2); 446 rasterMax = new EastNorth(eaMax.getX(), rasterCenter.getY()+(eaMax.getX()-eaMin.getX())*ratio/2); 443 rasterMin = new EastNorth(eaMin.getX(), rasterCenter.getY()-(eaMax.getX()-eaMin.getX())*ratio/2); 444 rasterMax = new EastNorth(eaMax.getX(), rasterCenter.getY()+(eaMax.getX()-eaMin.getX())*ratio/2); 447 445 rasterRatio = (rasterMax.getX()-rasterMin.getX())/rasterSizeX; 448 446 } … … 598 596 rasterRatio = (rasterMax.getX()-rasterMin.getX())/(communeBBox.max.getX() - communeBBox.min.getX()); 599 597 } 600 598 601 599 public EastNorthBound getCommuneBBox() { 602 600 return communeBBox; … … 640 638 // double proportion = dst1.distance(dst2)/org1.distance(org2); 641 639 images.get(0).rotate(rasterCenter, angle); 642 this.angle += angle; 640 this.angle += angle; 643 641 } 644 642 -
applications/editors/josm/plugins/graphview/build.xml
r21706 r22547 18 18 ** 19 19 ** To build against the core in ../../core, create a correct manifest and deploy to 20 ** SVN, 20 ** SVN, 21 21 ** set the properties commit.message and plugin.main.version 22 22 ** and run … … 26 26 --> 27 27 <project name="graphview" default="dist" basedir="."> 28 28 29 29 <property name="commit.message" value="prevent stack overflows; closes bug 4695 in JOSM Trac" /> 30 <property name="plugin.main.version" value="3 314" />31 30 <property name="plugin.main.version" value="3408" /> 31 32 32 <property name="josm" location="../../core/dist/josm-custom.jar"/> 33 33 <property name="plugin.build.dir" value="build"/> … … 136 136 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/> 137 137 </target> 138 139 138 139 140 140 <!-- 141 ************************** Publishing the plugin *********************************** 142 --> 143 <!-- 144 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 141 ************************** Publishing the plugin *********************************** 142 --> 143 <!-- 144 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 145 145 ** property ${coreversion.info.entry.revision} 146 146 ** … … 191 191 192 192 <!-- 193 ** commits the plugin.jar 193 ** commits the plugin.jar 194 194 --> 195 195 <target name="commit-dist"> 196 196 <echo> 197 197 ***** Properties of published ${plugin.jar} ***** 198 Commit message : '${commit.message}' 198 Commit message : '${commit.message}' 199 199 Plugin-Mainversion: ${plugin.main.version} 200 200 JOSM build version: ${coreversion.info.entry.revision} 201 201 Plugin-Version : ${version.entry.commit.revision} 202 ***** / Properties of published ${plugin.jar} ***** 203 202 ***** / Properties of published ${plugin.jar} ***** 203 204 204 Now commiting ${plugin.jar} ... 205 205 </echo> -
applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/layer/GraphViewLayer.java
r19054 r22547 3 3 import java.awt.BasicStroke; 4 4 import java.awt.Color; 5 import java.awt.Component;6 5 import java.awt.Graphics; 7 6 import java.awt.Graphics2D; … … 13 12 import java.util.List; 14 13 14 import javax.swing.Action; 15 15 import javax.swing.Icon; 16 import javax.swing.JMenuItem;17 import javax.swing.JSeparator;18 16 19 17 import org.openstreetmap.josm.Main; … … 324 322 325 323 @Override 326 public Component[] getMenuEntries() { 327 return new Component[] { new JMenuItem(LayerListDialog.getInstance().createShowHideLayerAction(this)), 328 new JMenuItem(LayerListDialog.getInstance().createDeleteLayerAction(this)), new JSeparator(), 329 new JMenuItem(new RenameLayerAction(null, this)), new JSeparator(), 330 new JMenuItem(new LayerListPopup.InfoAction(this)) }; 324 public Action[] getMenuEntries() { 325 return new Action[] { 326 LayerListDialog.getInstance().createShowHideLayerAction(), 327 LayerListDialog.getInstance().createDeleteLayerAction(), 328 SeparatorLayerAction.INSTANCE, 329 new RenameLayerAction(null, this), 330 SeparatorLayerAction.INSTANCE, 331 new LayerListPopup.InfoAction(this)}; 331 332 } 332 333 -
applications/editors/josm/plugins/imagewaypoint/build.xml
r19444 r22547 33 33 <property name="commit.message" value="Updated the constructor signature of the plugin main class" /> 34 34 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 35 <property name="plugin.main.version" value=" 2830" />35 <property name="plugin.main.version" value="3408" /> 36 36 37 37 <property name="josm" location="../../core/dist/josm-custom.jar"/> … … 91 91 92 92 <!-- 93 ************************** Publishing the plugin *********************************** 93 ************************** Publishing the plugin *********************************** 94 94 --> 95 95 <!-- 96 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 96 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 97 97 ** property ${coreversion.info.entry.revision} 98 98 ** … … 143 143 144 144 <!-- 145 ** commits the plugin.jar 145 ** commits the plugin.jar 146 146 --> 147 147 <target name="commit-dist"> 148 148 <echo> 149 149 ***** Properties of published ${plugin.jar} ***** 150 Commit message : '${commit.message}' 150 Commit message : '${commit.message}' 151 151 Plugin-Mainversion: ${plugin.main.version} 152 152 JOSM build version: ${coreversion.info.entry.revision} 153 153 Plugin-Version : ${version.entry.commit.revision} 154 ***** / Properties of published ${plugin.jar} ***** 155 154 ***** / Properties of published ${plugin.jar} ***** 155 156 156 Now commiting ${plugin.jar} ... 157 157 </echo> -
applications/editors/josm/plugins/imagewaypoint/src/org/insignificant/josm/plugins/imagewaypoint/ImageWayPointLayer.java
r18595 r22547 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 4 5 import java.awt.Component;6 5 import java.awt.Graphics2D; 7 6 import java.awt.Rectangle; … … 10 9 import java.awt.event.MouseListener; 11 10 11 import javax.swing.Action; 12 12 import javax.swing.Icon; 13 13 … … 51 51 } 52 52 53 private static final class ImageChangeListener implements 54 IImageChangeListener { 55 private final ImageWayPointLayer layer; 56 57 public ImageChangeListener(final ImageWayPointLayer layer) { 58 this.layer = layer; 59 } 60 53 private static final class ImageChangeListener implements IImageChangeListener { 61 54 public final void onAvailableImageEntriesChanged( 62 55 final ImageEntries entries) { … … 80 73 Main.map.mapView.addMouseListener(this.layerMouseListener); 81 74 82 this.imageChangeListener = new ImageChangeListener( this);75 this.imageChangeListener = new ImageChangeListener(); 83 76 ImageEntries.getInstance().addListener(this.imageChangeListener); 84 77 } … … 95 88 96 89 @Override 97 public final Component[] getMenuEntries() {98 return new Component[0];90 public final Action[] getMenuEntries() { 91 return new Action[0]; 99 92 } 100 93 -
applications/editors/josm/plugins/measurement/build.xml
r21706 r22547 18 18 ** 19 19 ** To build against the core in ../../core, create a correct manifest and deploy to 20 ** SVN, 20 ** SVN, 21 21 ** set the properties commit.message and plugin.main.version 22 22 ** and run … … 28 28 29 29 <property name="commit.message" value="Changed the constructor signature of the plugin main class" /> 30 <property name="plugin.main.version" value=" 2907" />30 <property name="plugin.main.version" value="3408" /> 31 31 32 32 … … 87 87 88 88 <!-- 89 ************************** Publishing the plugin *********************************** 89 ************************** Publishing the plugin *********************************** 90 90 --> 91 91 <!-- 92 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 92 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 93 93 ** property ${coreversion.info.entry.revision} 94 94 ** … … 139 139 140 140 <!-- 141 ** commits the plugin.jar 141 ** commits the plugin.jar 142 142 --> 143 143 <target name="commit-dist"> 144 144 <echo> 145 145 ***** Properties of published ${plugin.jar} ***** 146 Commit message : '${commit.message}' 146 Commit message : '${commit.message}' 147 147 Plugin-Mainversion: ${plugin.main.version} 148 148 JOSM build version: ${coreversion.info.entry.revision} 149 149 Plugin-Version : ${version.entry.commit.revision} 150 ***** / Properties of published ${plugin.jar} ***** 151 150 ***** / Properties of published ${plugin.jar} ***** 151 152 152 Now commiting ${plugin.jar} ... 153 153 </echo> -
applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementLayer.java
r19681 r22547 15 15 16 16 import javax.swing.AbstractAction; 17 import javax.swing.Action; 17 18 import javax.swing.Box; 18 19 import javax.swing.DefaultListCellRenderer; … … 24 25 import javax.swing.JLabel; 25 26 import javax.swing.JList; 26 import javax.swing.JMenuItem;27 27 import javax.swing.JOptionPane; 28 import javax.swing.JSeparator;29 28 30 29 import org.openstreetmap.josm.Main; … … 94 93 } 95 94 96 @Override public Component[] getMenuEntries() {97 return new Component[]{98 new JMenuItem(LayerListDialog.getInstance().createShowHideLayerAction(this)),95 @Override public Action[] getMenuEntries() { 96 return new Action[]{ 97 LayerListDialog.getInstance().createShowHideLayerAction(), 99 98 // TODO: implement new JMenuItem(new LayerListDialog.DeleteLayerAction(this)), 100 new JSeparator(),101 new JMenuItem(new GPXLayerImportAction(this)),102 new JSeparator(),103 new JMenuItem(new LayerListPopup.InfoAction(this))};99 SeparatorLayerAction.INSTANCE, 100 new GPXLayerImportAction(this), 101 SeparatorLayerAction.INSTANCE, 102 new LayerListPopup.InfoAction(this)}; 104 103 } 105 104 … … 222 221 } 223 222 224 public static double OldangleBetween(LatLon p1, LatLon p2){223 public static double oldAngleBetween(LatLon p1, LatLon p2){ 225 224 double lat1, lon1, lat2, lon2; 226 225 double dlon, dlat;
Note:
See TracChangeset
for help on using the changeset viewer.