Changeset 24112 in osm for applications/editors/josm/plugins/FixAddresses/src
- Timestamp:
- 2010-11-07T15:16:46+01:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/FixAddressesPlugin.java
r24088 r24112 15 15 16 16 import org.openstreetmap.josm.Main; 17 import org.openstreetmap.josm.gui.IconToggleButton; 18 import org.openstreetmap.josm.gui.MapFrame; 17 19 import org.openstreetmap.josm.plugins.Plugin; 18 20 import org.openstreetmap.josm.plugins.PluginInformation; 21 import org.openstreetmap.josm.plugins.fixAddresses.gui.IncompleteAddressesDialog; 19 22 20 23 /** … … 22 25 */ 23 26 public class FixAddressesPlugin extends Plugin { 27 private static IncompleteAddressesDialog incompleteAddrDlg; 24 28 25 29 /** … … 29 33 public FixAddressesPlugin(PluginInformation info) { 30 34 super(info); 35 36 // Create action for edit... 37 FixUnresolvedStreetsAction action = new FixUnresolvedStreetsAction(); 38 SelectIncompleteAddressesAction incAddrAction = new SelectIncompleteAddressesAction(); 31 39 32 // Create action for edit...33 FixUnresolvedStreetsAction action = new FixUnresolvedStreetsAction();34 SelectIncompleteAddressesAction incAddrAction = new SelectIncompleteAddressesAction();35 40 // ... and add it to the tools menu in main 36 41 Main.main.menu.toolsMenu.addSeparator(); 37 42 Main.main.menu.toolsMenu.add(action); 38 43 Main.main.menu.toolsMenu.add(incAddrAction); 44 45 // Create dialog 46 39 47 } 40 48 49 /* (non-Javadoc) 50 * @see org.openstreetmap.josm.plugins.Plugin#mapFrameInitialized(org.openstreetmap.josm.gui.MapFrame, org.openstreetmap.josm.gui.MapFrame) 51 */ 52 @Override 53 public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) { 54 // TODO Auto-generated method stub 55 super.mapFrameInitialized(oldFrame, newFrame); 56 57 if (newFrame != null) { 58 incompleteAddrDlg = new IncompleteAddressesDialog(); 59 FixAddressesMapMode faMode = new FixAddressesMapMode(Main.map); 60 IconToggleButton faModeButton = new IconToggleButton(faMode); 61 faModeButton.setVisible(true); 62 newFrame.addToggleDialog(incompleteAddrDlg); 63 } 64 } 65 66 67 68 /** 69 * @return the incompleteAddrDlg 70 */ 71 protected static IncompleteAddressesDialog getIncompleteAddrDlg() { 72 return incompleteAddrDlg; 73 } 41 74 } -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/FixUnresolvedStreetsAction.java
r24088 r24112 34 34 Shortcut.GROUP_MENU, InputEvent.ALT_DOWN_MASK 35 35 | InputEvent.SHIFT_DOWN_MASK), false); 36 setEnabled(false);37 36 38 addressEditContainer = new AddressEditContainer();39 37 setEnabled(false); 38 addressEditContainer = new AddressEditContainer(); 40 39 DataSet.addSelectionListener(this); 41 40 } -
applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/IncompleteAddressesTableModel.java
r24091 r24112 76 76 return aNode.getPostCode(); 77 77 case 4: 78 aNode.getStreetName();78 return aNode.getStreetName(); 79 79 default: 80 80 throw new RuntimeException("Invalid column index: " + column);
Note:
See TracChangeset
for help on using the changeset viewer.