Changeset 11924 in osm for applications/editors/josm/plugins/lakewalker
- Timestamp:
- 2008-11-14T12:04:03+01:00 (16 years ago)
- Location:
- applications/editors/josm/plugins/lakewalker
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/lakewalker/build.xml
r9876 r11924 59 59 <attribute name="Plugin-Description" value="Interface to Lakewalker module" /> 60 60 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 61 <attribute name="Plugin-Mainversion" value="1065"/> 61 62 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 62 63 <attribute name="Author" value="Brent Easton <b.easton@uws.edu.au>, Jason Reid <jrreid@ucalgary.ca>"/> -
applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerAction.java
r11920 r11924 33 33 import org.openstreetmap.josm.command.Command; 34 34 import org.openstreetmap.josm.command.SequenceCommand; 35 import org.openstreetmap.josm.tools.ShortCut; 35 36 36 37 import org.xml.sax.SAXException; … … 54 55 55 56 public LakewalkerAction(String name) { 56 super(name, "lakewalker-sml", tr("Lake Walker."), KeyEvent.VK_L, KeyEvent.CTRL_MASK 57 | KeyEvent.SHIFT_MASK, true); 57 super(name, "lakewalker-sml", tr("Lake Walker."), 58 ShortCut.registerShortCut("tools:lakewalker", tr("Tool: {0}", tr("Lake Walker")), 59 KeyEvent.VK_L, ShortCut.GROUP_EDIT, ShortCut.SHIFT_DEFAULT), true); 58 60 this.name = name; 59 61 setEnabled(true); … … 61 63 62 64 public void actionPerformed(ActionEvent e) { 65 if(Main.map == null || Main.map.mapView == null) 66 return; 63 67 64 68 Main.map.mapView.setCursor(oldCursor); … … 150 154 */ 151 155 152 setStatus( "Running vertex reduction...");156 setStatus(tr("Running vertex reduction...")); 153 157 154 158 nodelist = lw.vertexReduce(nodelist, epsilon); 155 159 156 System.out.println("After vertex reduction "+nodelist.size()+" nodes remain.");160 //System.out.println("After vertex reduction "+nodelist.size()+" nodes remain."); 157 161 158 162 /** … … 160 164 */ 161 165 162 setStatus( "Running Douglas-Peucker approximation...");166 setStatus(tr("Running Douglas-Peucker approximation...")); 163 167 164 168 nodelist = lw.douglasPeucker(nodelist, epsilon); 165 169 166 System.out.println("After Douglas-Peucker approximation "+nodelist.size()+" nodes remain.");170 //System.out.println("After Douglas-Peucker approximation "+nodelist.size()+" nodes remain."); 167 171 168 172 /** … … 170 174 */ 171 175 172 setStatus( "Removing duplicate nodes...");176 setStatus(tr("Removing duplicate nodes...")); 173 177 174 178 nodelist = lw.duplicateNodeRemove(nodelist); 175 179 176 System.out.println("After removing duplicate nodes, "+nodelist.size()+" nodes remain.");180 //System.out.println("After removing duplicate nodes, "+nodelist.size()+" nodes remain."); 177 181 178 182 -
applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerPlugin.java
r6949 r11924 16 16 */ 17 17 public class LakewalkerPlugin extends Plugin { 18 public LakewalkerPlugin() { 19 Main.main.menu.add(Main.main.menu.toolsMenu, new LakewalkerAction(tr("Lake Walker"))); 20 } 18 21 19 public static final String VERSION = "0.4";20 21 protected String name;22 protected String name2;23 24 public LakewalkerPlugin() {25 name = tr("Lake Walker");26 name2 = tr("Lake Walker (Old)");27 JMenu toolsMenu = null;28 for (int i = 0; i < Main.main.menu.getMenuCount() && toolsMenu == null; i++) {29 JMenu menu = Main.main.menu.getMenu(i);30 String name = menu.getText();31 if (name != null && name.equals(tr("Tools"))) {32 toolsMenu = menu;33 }34 }35 36 if (toolsMenu == null) {37 toolsMenu = new JMenu(name);38 toolsMenu.add(new JMenuItem(new LakewalkerActionOld(name2)));39 toolsMenu.add(new JMenuItem(new LakewalkerAction(name)));40 Main.main.menu.add(toolsMenu, 2);41 }42 else {43 toolsMenu.addSeparator();44 toolsMenu.add(new JMenuItem(new LakewalkerAction(name)));45 toolsMenu.add(new JMenuItem(new LakewalkerActionOld(name2)));46 }47 48 }49 50 22 public PreferenceSetting getPreferenceSetting() 51 23 { -
applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerWMS.java
r11920 r11924 1 1 package org.openstreetmap.josm.plugins.lakewalker; 2 3 import static org.openstreetmap.josm.tools.I18n.tr; 2 4 3 5 import org.openstreetmap.josm.Main; … … 41 43 public BufferedImage getTile(int x, int y) throws LakewalkerException { 42 44 String status = getStatus(); 43 setStatus( "Downloading image tile...");45 setStatus(tr("Downloading image tile...")); 44 46 45 47 String layer = "global_mosaic_base"; … … 144 146 145 147 if(this.image == null){ 146 throw new LakewalkerException( "Could not acquire image");148 throw new LakewalkerException(tr("Could not acquire image")); 147 149 } 148 150
Note:
See TracChangeset
for help on using the changeset viewer.