Changeset 34545 in osm for applications
- Timestamp:
- 2018-08-18T19:32:21+02:00 (6 years ago)
- Location:
- applications/editors/josm/plugins/pointInfo
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/pointInfo/build.xml
r34216 r34545 5 5 <property name="commit.message" value="PointInfo: Adds a link to photo metadata in Catastro module. Patch by Javier Sánchez Portero."/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value="1 2666"/>7 <property name="plugin.main.version" value="14153"/> 8 8 9 9 <!-- plugin can load at runtime --> -
applications/editors/josm/plugins/pointInfo/src/org/openstreetmap/josm/plugins/pointinfo/PointInfoAction.java
r34168 r34545 21 21 import org.openstreetmap.josm.data.coor.LatLon; 22 22 import org.openstreetmap.josm.gui.MainApplication; 23 import org.openstreetmap.josm.gui.MapFrame;24 23 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 25 24 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 26 25 import org.openstreetmap.josm.gui.util.GuiHelper; 27 import org.openstreetmap.josm.plugins.pointinfo.AbstractPointInfoModule;28 26 import org.openstreetmap.josm.tools.ImageProvider; 29 27 import org.openstreetmap.josm.tools.Logging; -
applications/editors/josm/plugins/pointInfo/src/org/openstreetmap/josm/plugins/pointinfo/PointInfoPlugin.java
r34168 r34545 8 8 import java.util.List; 9 9 10 import org.openstreetmap.josm.Main;11 10 import org.openstreetmap.josm.data.coor.LatLon; 12 import org.openstreetmap.josm.gui.preferences.PreferenceSetting;13 11 import org.openstreetmap.josm.gui.MainApplication; 14 12 import org.openstreetmap.josm.gui.MainMenu; 13 import org.openstreetmap.josm.gui.preferences.PreferenceSetting; 15 14 import org.openstreetmap.josm.plugins.Plugin; 16 15 import org.openstreetmap.josm.plugins.PluginInformation; 16 import org.openstreetmap.josm.plugins.pointinfo.catastro.CatastroModule; 17 17 import org.openstreetmap.josm.plugins.pointinfo.ruian.RuianModule; 18 import org.openstreetmap.josm. plugins.pointinfo.catastro.CatastroModule;18 import org.openstreetmap.josm.spi.preferences.Config; 19 19 20 20 /** … … 71 71 AbstractPointInfoModule module; 72 72 module = null; 73 if ( Main.pref.getBoolean("plugin.pointinfo.automode", true)) {73 if (Config.getPref().getBoolean("plugin.pointinfo.automode", true)) { 74 74 ReverseRecord r = ReverseFinder.queryNominatim(pos); 75 75 Iterator i = modules.values().iterator(); … … 81 81 } 82 82 } else { 83 module = modules.get( Main.pref.get("plugin.pointinfo.module", "RUIAN"));83 module = modules.get(Config.getPref().get("plugin.pointinfo.module", "RUIAN")); 84 84 } 85 85 if (module == null) { -
applications/editors/josm/plugins/pointInfo/src/org/openstreetmap/josm/plugins/pointinfo/PointInfoPreference.java
r34216 r34545 13 13 import javax.swing.JPanel; 14 14 15 import org.openstreetmap.josm.Main;16 15 import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting; 17 16 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane; 17 import org.openstreetmap.josm.spi.preferences.Config; 18 18 import org.openstreetmap.josm.tools.GBC; 19 19 … … 42 42 JPanel panel = new JPanel(new GridBagLayout()); 43 43 // autoMode 44 autoMode.setSelected( Main.pref.getBoolean("plugin.pointinfo.automode", false));44 autoMode.setSelected(Config.getPref().getBoolean("plugin.pointinfo.automode", false)); 45 45 autoMode.setToolTipText(tr("Try to guess the appropriate module from the location." 46 46 + " If it fails, use the module selected below.")); … … 50 50 module.addItem(modName); 51 51 } 52 module.setSelectedItem( Main.pref.get("plugin.pointinfo.module", "RUIAN"));52 module.setSelectedItem(Config.getPref().get("plugin.pointinfo.module", "RUIAN")); 53 53 module.setToolTipText(tr("The module called to get the point information.")); 54 54 panel.add(new JLabel(tr("Module")), GBC.std()); … … 60 60 @Override 61 61 public boolean ok() { 62 Main.pref.putBoolean("plugin.pointinfo.automode", autoMode.isSelected());63 Main.pref.put("plugin.pointinfo.module", (String) module.getSelectedItem());62 Config.getPref().putBoolean("plugin.pointinfo.automode", autoMode.isSelected()); 63 Config.getPref().put("plugin.pointinfo.module", (String) module.getSelectedItem()); 64 64 return false; 65 65 } -
applications/editors/josm/plugins/pointInfo/src/org/openstreetmap/josm/plugins/pointinfo/ReverseFinder.java
r34216 r34545 4 4 import java.io.ByteArrayInputStream; 5 5 import java.io.IOException; 6 import java.net.URL; 6 7 import java.nio.charset.StandardCharsets; 7 import java.net.URL;8 8 import java.util.Locale; 9 9 -
applications/editors/josm/plugins/pointInfo/src/org/openstreetmap/josm/plugins/pointinfo/ruian/RuianModule.java
r34168 r34545 5 5 6 6 import org.openstreetmap.josm.data.coor.LatLon; 7 import org.openstreetmap.josm.plugins.pointinfo.AbstractPointInfoModule; 7 8 import org.openstreetmap.josm.tools.HttpClient; 8 9 import org.openstreetmap.josm.tools.Logging; 9 10 import org.openstreetmap.josm.plugins.pointinfo.AbstractPointInfoModule;11 10 12 11 /** -
applications/editors/josm/plugins/pointInfo/src/org/openstreetmap/josm/plugins/pointinfo/ruian/RuianRecord.java
r33615 r34545 10 10 import java.util.Collection; 11 11 import java.util.LinkedList; 12 import java.util.logging.Level; 12 13 13 14 import javax.json.Json; … … 20 21 import org.openstreetmap.josm.command.Command; 21 22 import org.openstreetmap.josm.command.SequenceCommand; 23 import org.openstreetmap.josm.data.UndoRedoHandler; 22 24 import org.openstreetmap.josm.data.coor.LatLon; 23 25 import org.openstreetmap.josm.data.osm.Node; … … 25 27 import org.openstreetmap.josm.data.osm.Tag; 26 28 import org.openstreetmap.josm.data.osm.TagCollection; 29 import org.openstreetmap.josm.gui.MainApplication; 27 30 import org.openstreetmap.josm.gui.datatransfer.ClipboardUtils; 28 import org.openstreetmap.josm.gui.MainApplication;29 31 import org.openstreetmap.josm.plugins.pointinfo.PointInfoUtils; 30 32 import org.openstreetmap.josm.tools.Logging; 31 import java.util.logging.Level;32 33 33 34 /** … … 851 852 // Near address places 852 853 if (!m_adresni_mista.isEmpty() && m_objekt_ruian_id == 0) { 853 String x , x_name;854 String x; 854 855 r.append("<i><u>Adresní místa v okolí</u></i><br/>") 855 856 .append("<table>"); 856 857 for (int i = 0; i < m_adresni_mista.size(); i++) { 857 858 x = ""; 858 x_name = "";859 859 if (m_adresni_mista.get(i).getCisloTyp().equals("Číslo evidenční")) { 860 860 x = "ev."; … … 863 863 if (!m_adresni_mista.get(i).getCisloOrientacni().isEmpty()) { 864 864 x += "/" + m_adresni_mista.get(i).getCisloOrientacni(); 865 x_name += "/orientační";866 865 } 867 866 r.append("<tr><td bgcolor=#e5e5ff>"); … … 1125 1124 tc.applyTo(coll); 1126 1125 1127 MainApplication.undoRedo.add(new SequenceCommand(tr("Add new address point"), commands));1126 UndoRedoHandler.getInstance().add(new SequenceCommand(tr("Add new address point"), commands)); 1128 1127 } 1129 1128
Note:
See TracChangeset
for help on using the changeset viewer.