Changeset 22549 in osm
- Timestamp:
- 2010-08-03T08:17:26+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/piclayer/build.xml
r21706 r22549 24 24 25 25 <property name="commit.message" value="Changed the constructor signature of the plugin main class" /> 26 <property name="plugin.main.version" value=" 2830" />26 <property name="plugin.main.version" value="3408" /> 27 27 28 28 <!-- … … 138 138 139 139 <!-- 140 ************************** Publishing the plugin *********************************** 141 --> 142 <!-- 143 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 140 ************************** Publishing the plugin *********************************** 141 --> 142 <!-- 143 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 144 144 ** property ${coreversion.info.entry.revision} 145 145 ** … … 190 190 191 191 <!-- 192 ** commits the plugin.jar 192 ** commits the plugin.jar 193 193 --> 194 194 <target name="commit-dist"> 195 195 <echo> 196 196 ***** Properties of published ${plugin.jar} ***** 197 Commit message : '${commit.message}' 197 Commit message : '${commit.message}' 198 198 Plugin-Mainversion: ${plugin.main.version} 199 199 JOSM build version: ${coreversion.info.entry.revision} 200 200 Plugin-Version : ${version.entry.commit.revision} 201 ***** / Properties of published ${plugin.jar} ***** 202 201 ***** / Properties of published ${plugin.jar} ***** 202 203 203 Now commiting ${plugin.jar} ... 204 204 </echo> -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/NewLayerFromClipboardAction.java
r20217 r22549 51 51 // Add layer only if successfully initialized 52 52 try { 53 layer. Initialize();53 layer.initialize(); 54 54 } 55 55 catch (IOException e) { -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/NewLayerFromFileAction.java
r20217 r22549 91 91 // Add layer only if successfully initialized 92 92 try { 93 layer. Initialize();93 layer.initialize(); 94 94 } 95 95 catch (IOException e) { -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerAbstract.java
r20217 r22549 29 29 import java.awt.Image; 30 30 import java.awt.Toolkit; 31 import java.awt.event.ActionEvent; 31 32 import java.awt.image.BufferedImage; 32 33 import java.io.IOException; 34 import java.util.List; 33 35 import java.util.Properties; 34 36 37 import javax.swing.AbstractAction; 38 import javax.swing.Action; 35 39 import javax.swing.Icon; 36 40 import javax.swing.ImageIcon; 37 41 import javax.swing.JMenu; 38 import javax.swing.JMenuItem;39 import javax.swing.JSeparator;40 42 41 43 import org.openstreetmap.josm.Main; … … 69 71 // The scale that was set on the map during image creation 70 72 private double m_initial_scale = 0; 71 // Popup menu items72 private Component m_popupmenu[] = null;73 73 // Layer icon 74 74 private Icon m_layericon = null; … … 93 93 m_counter++; 94 94 95 // Create popup menu96 // Reset submenu97 JMenu reset_submenu = new JMenu(tr("Reset"));98 reset_submenu.add( new ResetPictureAllAction( this ) );99 reset_submenu.addSeparator();100 reset_submenu.add( new ResetPicturePositionAction( this ) );101 reset_submenu.add( new ResetPictureAngleAction( this ) );102 reset_submenu.add( new ResetPictureScaleAction( this ) );103 // Main menu104 m_popupmenu = new Component[]{105 reset_submenu,106 new JSeparator(),107 new JMenuItem( new SavePictureCalibrationAction(this)),108 new JMenuItem( new LoadPictureCalibrationAction(this)),109 };110 111 95 // Load layer icon 112 96 m_layericon = new ImageIcon(Toolkit.getDefaultToolkit().createImage(PicLayerAbstract.class.getResource("/images/layericon.png"))); … … 117 101 * initial parameters. Throws exception if something fails. 118 102 */ 119 public void Initialize() throws IOException {103 public void initialize() throws IOException { 120 104 121 105 // Create image … … 165 149 166 150 @Override 167 public Component[] getMenuEntries() { 168 return m_popupmenu; 151 public Action[] getMenuEntries() { 152 // Main menu 153 return new Action[] { 154 new ResetSubmenuAction(), 155 SeparatorLayerAction.INSTANCE, 156 new SavePictureCalibrationAction(this), 157 new LoadPictureCalibrationAction(this), 158 }; 169 159 } 170 160 … … 189 179 public void paint(Graphics2D g2, MapView mv, Bounds bounds) { 190 180 191 if ( m_image != null && g2 instanceof Graphics2D) {181 if ( m_image != null) { 192 182 193 183 // Position image at the right graphical place … … 320 310 Main.map.mapView.repaint(); 321 311 } 312 313 private class ResetSubmenuAction extends AbstractAction implements LayerAction { 314 315 public ResetSubmenuAction() { 316 super(tr("Reset")); 317 } 318 319 public void actionPerformed(ActionEvent e) { 320 } 321 322 public Component createMenuComponent() { 323 JMenu reset_submenu = new JMenu(this); 324 reset_submenu.add( new ResetPictureAllAction( PicLayerAbstract.this ) ); 325 reset_submenu.addSeparator(); 326 reset_submenu.add( new ResetPicturePositionAction( PicLayerAbstract.this ) ); 327 reset_submenu.add( new ResetPictureAngleAction( PicLayerAbstract.this ) ); 328 reset_submenu.add( new ResetPictureScaleAction( PicLayerAbstract.this ) ); 329 return reset_submenu; 330 } 331 332 public boolean supportLayers(List<Layer> layers) { 333 return layers.size() == 1 && layers.get(0) instanceof PicLayerAbstract; 334 } 335 336 } 322 337 } -
applications/editors/josm/plugins/routes/build.xml
r20427 r22549 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="3 116" />30 <property name="plugin.main.version" value="3408" /> 31 31 32 32 <property name="josm" location="../../core/dist/josm-custom.jar"/> -
applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/RouteLayer.java
r19532 r22549 2 2 3 3 import java.awt.Color; 4 import java.awt.Component;5 4 import java.awt.Graphics2D; 6 5 import java.awt.Stroke; … … 8 7 import java.util.List; 9 8 9 import javax.swing.Action; 10 10 import javax.swing.Icon; 11 11 … … 73 73 74 74 @Override 75 public Component[] getMenuEntries() {76 return new Component[0];75 public Action[] getMenuEntries() { 76 return new Action[0]; 77 77 } 78 78 -
applications/editors/josm/plugins/routing/build.xml
r21706 r22549 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=" 2830" />30 <property name="plugin.main.version" value="3408" /> 31 31 32 32 <!-- Define some properties --> … … 106 106 107 107 <!-- 108 ************************** Publishing the plugin *********************************** 109 --> 110 <!-- 111 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 108 ************************** Publishing the plugin *********************************** 109 --> 110 <!-- 111 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 112 112 ** property ${coreversion.info.entry.revision} 113 113 ** … … 158 158 159 159 <!-- 160 ** commits the plugin.jar 160 ** commits the plugin.jar 161 161 --> 162 162 <target name="commit-dist"> 163 163 <echo> 164 164 ***** Properties of published ${plugin.jar} ***** 165 Commit message : '${commit.message}' 165 Commit message : '${commit.message}' 166 166 Plugin-Mainversion: ${plugin.main.version} 167 167 JOSM build version: ${coreversion.info.entry.revision} 168 168 Plugin-Version : ${version.entry.commit.revision} 169 ***** / Properties of published ${plugin.jar} ***** 170 169 ***** / Properties of published ${plugin.jar} ***** 170 171 171 Now commiting ${plugin.jar} ... 172 172 </echo> -
applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingLayer.java
r18962 r22549 30 30 import java.awt.BasicStroke; 31 31 import java.awt.Color; 32 import java.awt.Component;33 32 import java.awt.Graphics; 34 33 import java.awt.Graphics2D; … … 39 38 import java.util.List; 40 39 40 import javax.swing.Action; 41 41 import javax.swing.Icon; 42 import javax.swing.JMenuItem;43 import javax.swing.JSeparator;44 42 45 43 import org.apache.log4j.Logger; … … 182 180 */ 183 181 @Override 184 public Component[] getMenuEntries() {185 Collection< Component> components = new ArrayList<Component>();186 components.add( new JMenuItem(LayerListDialog.getInstance().createShowHideLayerAction(this)));182 public Action[] getMenuEntries() { 183 Collection<Action> components = new ArrayList<Action>(); 184 components.add(LayerListDialog.getInstance().createShowHideLayerAction()); 187 185 // components.add(new JMenuItem(new LayerListDialog.ShowHideMarkerText(this))); 188 components.add( new JMenuItem(LayerListDialog.getInstance().createDeleteLayerAction(this)));189 components.add( new JSeparator());190 components.add(new JMenuItem(new RenameLayerAction(getAssociatedFile(), this)));191 components.add( new JSeparator());192 components.add(new JMenuItem(new LayerListPopup.InfoAction(this)));193 return components.toArray(new Component[0]);186 components.add(LayerListDialog.getInstance().createDeleteLayerAction()); 187 components.add(SeparatorLayerAction.INSTANCE); 188 components.add(new RenameLayerAction(getAssociatedFile(), this)); 189 components.add(SeparatorLayerAction.INSTANCE); 190 components.add(new LayerListPopup.InfoAction(this)); 191 return components.toArray(new Action[0]); 194 192 } 195 193 -
applications/editors/josm/plugins/walkingpapers/build.xml
r21706 r22549 14 14 ** 15 15 ** To build against the core in ../../core, create a correct manifest and deploy to 16 ** SVN, 16 ** SVN, 17 17 ** set the properties commit.message and plugin.main.version 18 18 ** and run … … 23 23 <project name="walkingpapers" default="dist" basedir="."> 24 24 25 <!-- 26 ** update before publishing 25 <!-- 26 ** update before publishing 27 27 --> 28 28 <property name="commit.message" value="Changed the constructor signature of the plugin main class" /> 29 <property name="plugin.main.version" value=" 2830" />29 <property name="plugin.main.version" value="3408" /> 30 30 31 31 32 32 <property name="josm" location="../../core/dist/josm-custom.jar"/> 33 33 <property name="plugin.dist.dir" value="../../dist"/> … … 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/walkingpapers/src/org/openstreetmap/josm/plugins/walkingpapers/WalkingPapersLayer.java
r19074 r22549 4 4 5 5 import java.awt.Color; 6 import java.awt.Component;7 6 import java.awt.Graphics2D; 8 7 import java.awt.Image; … … 14 13 import java.util.TreeSet; 15 14 15 import javax.swing.Action; 16 16 import javax.swing.Icon; 17 import javax.swing.JMenuItem;18 import javax.swing.JSeparator;19 17 20 18 import org.openstreetmap.josm.Main; … … 119 117 } 120 118 121 class TileTimeComp implements Comparator<WalkingPapersTile> {119 static class TileTimeComp implements Comparator<WalkingPapersTile> { 122 120 public int compare(WalkingPapersTile s1, WalkingPapersTile s2) { 123 121 long t1 = s1.access_time(); … … 349 347 350 348 @Override 351 public Component[] getMenuEntries() {352 return new Component[] {353 new JMenuItem(LayerListDialog.getInstance().createShowHideLayerAction(this)),354 new JMenuItem(LayerListDialog.getInstance().createDeleteLayerAction(this)),355 new JSeparator(),349 public Action[] getMenuEntries() { 350 return new Action[] { 351 LayerListDialog.getInstance().createShowHideLayerAction(), 352 LayerListDialog.getInstance().createDeleteLayerAction(), 353 SeparatorLayerAction.INSTANCE, 356 354 // color, 357 355 // new JMenuItem(new RenameLayerAction(associatedFile, this)), 358 new JSeparator(),359 new JMenuItem(new LayerListPopup.InfoAction(this)) };356 SeparatorLayerAction.INSTANCE, 357 new LayerListPopup.InfoAction(this) }; 360 358 } 361 359
Note:
See TracChangeset
for help on using the changeset viewer.