Changeset 2017 in josm
- Timestamp:
- 2009-08-30T19:07:24+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 1 deleted
- 147 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r1990 r2017 42 42 import org.openstreetmap.josm.gui.MainMenu; 43 43 import org.openstreetmap.josm.gui.MapFrame; 44 import org.openstreetmap.josm.gui.OptionPaneUtil;45 44 import org.openstreetmap.josm.gui.SplashScreen; 46 45 import org.openstreetmap.josm.gui.dialogs.LayerListDialog; … … 286 285 Main.proj = (Projection)Class.forName(name).newInstance(); 287 286 } catch (final Exception e) { 288 OptionPaneUtil.showMessageDialog(287 JOptionPane.showMessageDialog( 289 288 Main.parent, 290 289 tr("The projection {0} could not be activated. Using Mercator", name), … … 438 437 final Bounds b = OsmUrlToBounds.parse(s); 439 438 if (b == null) { 440 OptionPaneUtil.showMessageDialog(439 JOptionPane.showMessageDialog( 441 440 Main.parent, 442 441 tr("Ignoring malformed URL: \"{0}\"", s), … … 456 455 main.menu.openFile.openFile(new File(new URI(s))); 457 456 } catch (URISyntaxException e) { 458 OptionPaneUtil.showMessageDialog(457 JOptionPane.showMessageDialog( 459 458 Main.parent, 460 459 tr("Ignoring malformed file URL: \"{0}\"", s), -
trunk/src/org/openstreetmap/josm/actions/AboutAction.java
r2008 r2017 15 15 import java.net.MalformedURLException; 16 16 import java.net.URL; 17 import java.util.Properties; 17 18 import java.util.regex.Matcher; 18 19 import java.util.regex.Pattern; 19 import java.util.Properties;20 20 21 21 import javax.swing.BorderFactory; … … 32 32 import org.openstreetmap.josm.tools.ImageProvider; 33 33 import org.openstreetmap.josm.tools.LanguageInfo; 34 import org.openstreetmap.josm.tools.Shortcut; 34 35 import org.openstreetmap.josm.tools.UrlLabel; 35 import org.openstreetmap.josm.tools.Shortcut;36 36 37 37 /** -
trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java
r1847 r2017 13 13 import org.openstreetmap.josm.Main; 14 14 import org.openstreetmap.josm.data.osm.OsmPrimitive; 15 import org.openstreetmap.josm.gui.OptionPaneUtil;16 15 import org.openstreetmap.josm.tools.OpenBrowser; 17 16 import org.openstreetmap.josm.tools.Shortcut; … … 59 58 60 59 if (primitivesToShow.isEmpty()) { 61 OptionPaneUtil.showMessageDialog(60 JOptionPane.showMessageDialog( 62 61 Main.parent, 63 62 tr("Please select at least one already uploaded node, way, or relation."), -
trunk/src/org/openstreetmap/josm/actions/AbstractMergeAction.java
r1890 r2017 19 19 import org.openstreetmap.josm.Main; 20 20 import org.openstreetmap.josm.gui.ExtendedDialog; 21 import org.openstreetmap.josm.gui.OptionPaneUtil;22 21 import org.openstreetmap.josm.gui.layer.Layer; 23 22 import org.openstreetmap.josm.tools.GBC; … … 82 81 83 82 protected void warnNoTargetLayersForSourceLayer(Layer sourceLayer) { 84 OptionPaneUtil.showMessageDialog(Main.parent,83 JOptionPane.showMessageDialog(Main.parent, 85 84 tr("<html>There are no layers the source layer<br>''{0}''<br>could be merged to.</html>"), 86 85 tr("No target layers"), JOptionPane.WARNING_MESSAGE); -
trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java
r1947 r2017 22 22 import org.openstreetmap.josm.data.osm.OsmPrimitive; 23 23 import org.openstreetmap.josm.data.osm.Way; 24 import org.openstreetmap.josm.gui.OptionPaneUtil;25 24 import org.openstreetmap.josm.tools.Shortcut; 26 25 … … 134 133 135 134 if (nodes.size() < 4) { 136 OptionPaneUtil.showMessageDialog(135 JOptionPane.showMessageDialog( 137 136 Main.parent, 138 137 tr("Please select at least four nodes."), -
trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java
r1862 r2017 18 18 import org.openstreetmap.josm.data.osm.OsmPrimitive; 19 19 import org.openstreetmap.josm.data.osm.Way; 20 import org.openstreetmap.josm.gui.OptionPaneUtil;21 20 import org.openstreetmap.josm.tools.Shortcut; 22 21 … … 61 60 } 62 61 if (nodes.size() < 3) { 63 OptionPaneUtil.showMessageDialog(62 JOptionPane.showMessageDialog( 64 63 Main.parent, 65 64 tr("Please select at least three nodes."), -
trunk/src/org/openstreetmap/josm/actions/ApiPreconditionChecker.java
r1885 r2017 16 16 import org.openstreetmap.josm.data.osm.Way; 17 17 import org.openstreetmap.josm.gui.ExceptionDialogUtil; 18 import org.openstreetmap.josm.gui.OptionPaneUtil;19 18 import org.openstreetmap.josm.io.OsmApi; 20 19 import org.openstreetmap.josm.io.OsmApiInitializationException; … … 49 48 total = add.size() + update.size() + delete.size(); 50 49 if(total > maxElements) { 51 OptionPaneUtil.showMessageDialog(50 JOptionPane.showMessageDialog( 52 51 Main.parent, 53 52 tr("Current number of changes exceeds the max. number of changes, current is {0}, max is {1}", … … 84 83 continue; 85 84 } 86 OptionPaneUtil.showMessageDialog(Main.parent,85 JOptionPane.showMessageDialog(Main.parent, 87 86 tr("Length of value for tag ''{0}'' on primitive {1} exceeds the max. allowed length {2}. Values length is {3}.", 88 87 e.getKey(), Long.toString(osmPrimitive.id), 255, e.getValue().length() … … 100 99 if (osmPrimitive instanceof Way && 101 100 ((Way)osmPrimitive).getNodesCount() > maxNodes) { 102 OptionPaneUtil.showMessageDialog(101 JOptionPane.showMessageDialog( 103 102 Main.parent, 104 103 tr("{0} nodes in way {1} exceed the max. allowed number of nodes {2}", -
trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
r1953 r2017 17 17 import org.openstreetmap.josm.data.osm.OsmPrimitive; 18 18 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 19 import org.openstreetmap.josm.gui.OptionPaneUtil;20 19 import org.openstreetmap.josm.gui.dialogs.LayerListDialog; 21 20 import org.openstreetmap.josm.gui.layer.Layer; … … 121 120 } 122 121 if (sel.isEmpty()) { 123 OptionPaneUtil.showMessageDialog(122 JOptionPane.showMessageDialog( 124 123 Main.parent, 125 124 (mode.equals("selection") ? tr("Nothing selected to zoom to.") : tr("No conflicts to zoom to")), -
trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
r1951 r2017 38 38 import org.openstreetmap.josm.data.osm.Way; 39 39 import org.openstreetmap.josm.gui.ExtendedDialog; 40 import org.openstreetmap.josm.gui.OptionPaneUtil;41 40 import org.openstreetmap.josm.tools.GBC; 42 41 import org.openstreetmap.josm.tools.Pair; … … 68 67 69 68 if (selectedWays.size() < 2) { 70 OptionPaneUtil.showMessageDialog(69 JOptionPane.showMessageDialog( 71 70 Main.parent, 72 71 tr("Please select at least two ways to combine."), … … 160 159 nodeList = (List<Node>) secondTry; 161 160 } else { 162 OptionPaneUtil.showMessageDialog(161 JOptionPane.showMessageDialog( 163 162 Main.parent, 164 163 secondTry, // FIXME: not sure whether this fits in a dialog -
trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java
r1910 r2017 24 24 import org.openstreetmap.josm.data.osm.Way; 25 25 import org.openstreetmap.josm.data.osm.visitor.CollectBackReferencesVisitor; 26 import org.openstreetmap.josm.gui.OptionPaneUtil;27 26 import org.openstreetmap.josm.tools.Shortcut; 28 27 … … 201 200 202 201 if (sUnder == 0) { 203 OptionPaneUtil.showMessageDialog(202 JOptionPane.showMessageDialog( 204 203 Main.parent, 205 204 tr("Those nodes are not in a circle. Aborting."), … … 262 261 263 262 } else { 264 OptionPaneUtil.showMessageDialog(263 JOptionPane.showMessageDialog( 265 264 Main.parent, 266 265 tr("Please select exactly two or three nodes or one way with exactly two or three nodes."), -
trunk/src/org/openstreetmap/josm/actions/DistributeAction.java
r1862 r2017 18 18 import org.openstreetmap.josm.data.osm.OsmPrimitive; 19 19 import org.openstreetmap.josm.data.osm.Way; 20 import org.openstreetmap.josm.gui.OptionPaneUtil;21 20 import org.openstreetmap.josm.tools.Shortcut; 22 21 … … 60 59 61 60 if (nodes.size() < 3) { 62 OptionPaneUtil.showMessageDialog(61 JOptionPane.showMessageDialog( 63 62 Main.parent, 64 63 tr("Please select at least three nodes."), -
trunk/src/org/openstreetmap/josm/actions/DownloadAction.java
r1847 r2017 13 13 14 14 import org.openstreetmap.josm.Main; 15 import org.openstreetmap.josm.gui.OptionPaneUtil;16 15 import org.openstreetmap.josm.gui.download.DownloadDialog; 17 16 import org.openstreetmap.josm.gui.download.DownloadDialog.DownloadTask; … … 71 70 } 72 71 if (!finish) { 73 OptionPaneUtil.showMessageDialog(72 JOptionPane.showMessageDialog( 74 73 Main.parent, 75 74 tr("Please select at least one task to download"), -
trunk/src/org/openstreetmap/josm/actions/DownloadReferrersAction.java
r1990 r2017 9 9 import java.util.Collection; 10 10 11 import javax.swing.JDialog;12 11 import javax.swing.JOptionPane; 13 12 import javax.swing.SwingUtilities; 14 13 15 14 import org.openstreetmap.josm.Main; 16 import org.openstreetmap.josm.data.SelectionChangedListener;17 15 import org.openstreetmap.josm.data.osm.DataSet; 18 16 import org.openstreetmap.josm.data.osm.OsmPrimitive; 19 17 import org.openstreetmap.josm.data.osm.visitor.MergeVisitor; 20 18 import org.openstreetmap.josm.gui.DefaultNameFormatter; 21 import org.openstreetmap.josm.gui.OptionPaneUtil;22 19 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 23 import org.openstreetmap.josm.gui.layer.Layer;24 20 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 25 import org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener;26 21 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 27 22 import org.openstreetmap.josm.io.OsmApi; … … 87 82 msg = lastException.toString(); 88 83 } 89 OptionPaneUtil.showMessageDialog(84 JOptionPane.showMessageDialog( 90 85 Main.map, 91 86 msg, … … 123 118 return; 124 119 Main.map.mapView.getEditLayer().getConflicts().add(visitor.getConflicts()); 125 OptionPaneUtil.showMessageDialog(120 JOptionPane.showMessageDialog( 126 121 Main.parent, 127 122 tr("There were {0} conflicts during import.", -
trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java
r1949 r2017 13 13 14 14 import org.openstreetmap.josm.Main; 15 import org.openstreetmap.josm.gui.OptionPaneUtil;16 15 import org.openstreetmap.josm.gui.layer.GpxLayer; 17 16 import org.openstreetmap.josm.gui.layer.Layer; … … 45 44 GpxLayer layer = getLayer(); 46 45 if (layer == null) { 47 OptionPaneUtil.showMessageDialog(46 JOptionPane.showMessageDialog( 48 47 Main.parent, 49 48 tr("Nothing to export. Get some data first."), -
trunk/src/org/openstreetmap/josm/actions/HelpAction.java
r1847 r2017 30 30 31 31 import org.openstreetmap.josm.Main; 32 import org.openstreetmap.josm.gui.OptionPaneUtil;33 32 import org.openstreetmap.josm.tools.ImageProvider; 34 33 import org.openstreetmap.josm.tools.LanguageInfo; … … 111 110 } else if (tr("Edit").equals(e.getActionCommand())) { 112 111 if (!url.startsWith(baseurl)) { 113 OptionPaneUtil.showMessageDialog(112 JOptionPane.showMessageDialog( 114 113 Main.parent, 115 114 tr("Can only edit help pages from JOSM Online Help"), -
trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
r1951 r2017 38 38 import org.openstreetmap.josm.data.osm.visitor.CollectBackReferencesVisitor; 39 39 import org.openstreetmap.josm.gui.ExtendedDialog; 40 import org.openstreetmap.josm.gui.OptionPaneUtil;41 40 import org.openstreetmap.josm.tools.GBC; 42 41 import org.openstreetmap.josm.tools.Pair; … … 74 73 75 74 if (selectedNodes.size() < 2) { 76 OptionPaneUtil.showMessageDialog(75 JOptionPane.showMessageDialog( 77 76 Main.parent, 78 77 tr("Please select at least two nodes to merge."), … … 250 249 w.visit(backRefs); 251 250 if (!backRefs.data.isEmpty()) { 252 OptionPaneUtil.showMessageDialog(251 JOptionPane.showMessageDialog( 253 252 Main.parent, 254 253 tr("Cannot merge nodes: " + -
trunk/src/org/openstreetmap/josm/actions/MergeSelectionAction.java
r1890 r2017 8 8 import java.util.List; 9 9 10 import org.openstreetmap.josm.Main;11 10 import org.openstreetmap.josm.data.osm.DataSet; 12 11 import org.openstreetmap.josm.data.osm.visitor.MergeSourceBuildingVisitor; -
trunk/src/org/openstreetmap/josm/actions/MirrorAction.java
r1862 r2017 19 19 import org.openstreetmap.josm.data.osm.OsmPrimitive; 20 20 import org.openstreetmap.josm.data.osm.Way; 21 import org.openstreetmap.josm.gui.OptionPaneUtil;22 21 import org.openstreetmap.josm.tools.Shortcut; 23 22 … … 50 49 51 50 if (nodes.size() == 0) { 52 OptionPaneUtil.showMessageDialog(51 JOptionPane.showMessageDialog( 53 52 Main.parent, 54 53 tr("Please select at least one node or way."), -
trunk/src/org/openstreetmap/josm/actions/MoveAction.java
r1847 r2017 17 17 import org.openstreetmap.josm.data.osm.OsmPrimitive; 18 18 import org.openstreetmap.josm.data.osm.visitor.AllNodesVisitor; 19 import org.openstreetmap.josm.gui.OptionPaneUtil;20 19 import org.openstreetmap.josm.tools.Shortcut; 21 20 … … 103 102 // Revert move 104 103 ((MoveCommand) c).moveAgain(-distx, -disty); 105 OptionPaneUtil.showMessageDialog(104 JOptionPane.showMessageDialog( 106 105 Main.parent, 107 106 tr("Cannot move objects outside of the world."), -
trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java
r1879 r2017 13 13 14 14 import org.openstreetmap.josm.Main; 15 import org.openstreetmap.josm.gui.OptionPaneUtil;16 15 import org.openstreetmap.josm.io.FileImporter; 17 16 import org.openstreetmap.josm.tools.Shortcut; … … 55 54 } catch (IOException x) { 56 55 x.printStackTrace(); 57 OptionPaneUtil.showMessageDialog(56 JOptionPane.showMessageDialog( 58 57 Main.parent, 59 58 tr("<html>Could not read file ''{0}\''. Error is: <br>{1}</html>", file.getName(), x.getMessage()), -
trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
r2014 r2017 23 23 import org.openstreetmap.josm.data.osm.Way; 24 24 import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil; 25 import org.openstreetmap.josm.gui.OptionPaneUtil;26 25 import org.openstreetmap.josm.tools.Shortcut; 27 26 … … 60 59 if(osm instanceof Node) { 61 60 if(dirnodes.size() == 2) { 62 OptionPaneUtil.showMessageDialog(61 JOptionPane.showMessageDialog( 63 62 Main.parent, 64 63 tr("Only two nodes allowed"), … … 73 72 // Check if selection consists now only of ways 74 73 if (!(osm instanceof Way)) { 75 OptionPaneUtil.showMessageDialog(74 JOptionPane.showMessageDialog( 76 75 Main.parent, 77 76 tr("Selection must consist only of ways."), … … 85 84 Way way = (Way)osm; 86 85 if ((way.getNodesCount() < 5) || !way.isClosed()) { 87 OptionPaneUtil.showMessageDialog(86 JOptionPane.showMessageDialog( 88 87 Main.parent, 89 88 tr("Please select one or more closed ways of at least four nodes."), … … 137 136 // Check, if selection held neither none nor two nodes 138 137 if(dirnodes.size() == 1) { 139 OptionPaneUtil.showMessageDialog(138 JOptionPane.showMessageDialog( 140 139 Main.parent, 141 140 tr("Only one node selected"), -
trunk/src/org/openstreetmap/josm/actions/RenameLayerAction.java
r1987 r2017 15 15 16 16 import org.openstreetmap.josm.Main; 17 import org.openstreetmap.josm.gui.OptionPaneUtil;18 17 import org.openstreetmap.josm.gui.layer.Layer; 19 18 import org.openstreetmap.josm.tools.ImageProvider; … … 89 88 nameText = newFile.getName(); 90 89 } else { 91 OptionPaneUtil.showMessageDialog(90 JOptionPane.showMessageDialog( 92 91 Main.parent, 93 92 tr("Could not rename file ''{0}''", file.getPath()), -
trunk/src/org/openstreetmap/josm/actions/ReverseWayAction.java
r1862 r2017 23 23 import org.openstreetmap.josm.data.osm.OsmPrimitive; 24 24 import org.openstreetmap.josm.data.osm.Way; 25 import org.openstreetmap.josm.gui.OptionPaneUtil;26 25 import org.openstreetmap.josm.tools.Shortcut; 27 26 … … 46 45 } 47 46 if (sel.isEmpty()) { 48 OptionPaneUtil.showMessageDialog(47 JOptionPane.showMessageDialog( 49 48 Main.parent, 50 49 tr("Please select at least one way."), -
trunk/src/org/openstreetmap/josm/actions/SaveAction.java
r1808 r2017 8 8 9 9 import org.openstreetmap.josm.Main; 10 import org.openstreetmap.josm.gui.ExtendedDialog; 11 import org.openstreetmap.josm.gui.layer.GpxLayer; 10 12 import org.openstreetmap.josm.gui.layer.Layer; 11 import org.openstreetmap.josm.gui.layer.GpxLayer;12 import org.openstreetmap.josm.gui.ExtendedDialog;13 13 import org.openstreetmap.josm.tools.Shortcut; 14 14 -
trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java
r1949 r2017 16 16 import org.openstreetmap.josm.data.osm.OsmPrimitive; 17 17 import org.openstreetmap.josm.gui.ExtendedDialog; 18 import org.openstreetmap.josm.gui.OptionPaneUtil;19 18 import org.openstreetmap.josm.gui.layer.GpxLayer; 20 19 import org.openstreetmap.josm.gui.layer.Layer; … … 67 66 } 68 67 if (!exported) { 69 OptionPaneUtil.showMessageDialog(Main.parent, tr("No Exporter found! Nothing saved."), tr("Warning"),68 JOptionPane.showMessageDialog(Main.parent, tr("No Exporter found! Nothing saved."), tr("Warning"), 70 69 JOptionPane.WARNING_MESSAGE); 71 70 return false; … … 90 89 public boolean checkSaveConditions(Layer layer) { 91 90 if (layer == null) { 92 OptionPaneUtil.showMessageDialog(91 JOptionPane.showMessageDialog( 93 92 Main.parent, 94 93 tr("Internal Error: cannot check conditions for no layer. Please report this as a bug."), … … 99 98 } 100 99 if (Main.map == null) { 101 OptionPaneUtil.showMessageDialog(100 JOptionPane.showMessageDialog( 102 101 Main.parent, 103 102 tr("No document open so nothing to save."), -
trunk/src/org/openstreetmap/josm/actions/SaveAsAction.java
r1879 r2017 7 7 import java.io.File; 8 8 9 import org.openstreetmap.josm.Main;10 9 import org.openstreetmap.josm.gui.layer.Layer; 11 10 import org.openstreetmap.josm.tools.Shortcut; -
trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
r1990 r2017 32 32 import org.openstreetmap.josm.data.osm.visitor.Visitor; 33 33 import org.openstreetmap.josm.gui.DefaultNameFormatter; 34 import org.openstreetmap.josm.gui.OptionPaneUtil;35 34 import org.openstreetmap.josm.tools.Shortcut; 36 35 … … 66 65 67 66 if (!checkSelection(selection)) { 68 OptionPaneUtil.showMessageDialog(67 JOptionPane.showMessageDialog( 69 68 Main.parent, 70 69 tr("The current selection cannot be used for splitting."), … … 123 122 } 124 123 if (wayOccurenceCounter.isEmpty()) { 125 OptionPaneUtil.showMessageDialog(Main.parent,124 JOptionPane.showMessageDialog(Main.parent, 126 125 trn("The selected node is not in the middle of any way.", 127 126 "The selected nodes are not in the middle of any way.", … … 135 134 if (entry.getValue().equals(selectedNodes.size())) { 136 135 if (selectedWay != null) { 137 OptionPaneUtil.showMessageDialog(Main.parent,136 JOptionPane.showMessageDialog(Main.parent, 138 137 trn("There is more than one way using the node you selected. Please select the way also.", 139 138 "There is more than one way using the nodes you selected. Please select the way also.", … … 148 147 149 148 if (selectedWay == null) { 150 OptionPaneUtil.showMessageDialog(Main.parent,149 JOptionPane.showMessageDialog(Main.parent, 151 150 tr("The selected nodes do not share the same way."), 152 151 tr("Warning"), … … 163 162 } 164 163 if (!nds.isEmpty()) { 165 OptionPaneUtil.showMessageDialog(Main.parent,164 JOptionPane.showMessageDialog(Main.parent, 166 165 trn("The selected way does not contain the selected node.", 167 166 "The selected way does not contain all the selected nodes.", … … 233 232 && !nodeSet.contains(wayChunks.get(0).get(0))) { 234 233 if (wayChunks.size() == 2) { 235 OptionPaneUtil.showMessageDialog(234 JOptionPane.showMessageDialog( 236 235 Main.parent, 237 236 tr("You must select two or more nodes to split a circular way."), … … 248 247 if (wayChunks.size() < 2) { 249 248 if(wayChunks.get(0).get(0) == wayChunks.get(0).get(wayChunks.get(0).size()-1)) { 250 OptionPaneUtil.showMessageDialog(249 JOptionPane.showMessageDialog( 251 250 Main.parent, 252 251 tr("You must select two or more nodes to split a circular way."), … … 254 253 JOptionPane.WARNING_MESSAGE); 255 254 } else { 256 OptionPaneUtil.showMessageDialog(255 JOptionPane.showMessageDialog( 257 256 Main.parent, 258 257 tr("The way cannot be split at the selected nodes. (Hint: Select nodes in the middle of the way.)"), … … 342 341 } 343 342 if(warnmerole) { 344 OptionPaneUtil.showMessageDialog(343 JOptionPane.showMessageDialog( 345 344 Main.parent, 346 345 tr("<html>A role based relation membership was copied to all new ways.<br>You should verify this and correct it when necessary.</html>"), … … 348 347 JOptionPane.WARNING_MESSAGE); 349 348 } else if(warnme) { 350 OptionPaneUtil.showMessageDialog(349 JOptionPane.showMessageDialog( 351 350 Main.parent, 352 351 tr("<html>A relation membership was copied to all new ways.<br>You should verify this and correct it when necessary.</html>"), -
trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java
r1938 r2017 27 27 import org.openstreetmap.josm.data.osm.Way; 28 28 import org.openstreetmap.josm.gui.MapView; 29 import org.openstreetmap.josm.gui.OptionPaneUtil;30 29 import org.openstreetmap.josm.tools.Shortcut; 31 30 … … 132 131 133 132 if(errMsg != null) { 134 OptionPaneUtil.showMessageDialog(133 JOptionPane.showMessageDialog( 135 134 Main.parent, 136 135 errMsg, -
trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java
r1898 r2017 20 20 import org.openstreetmap.josm.data.osm.visitor.MergeVisitor; 21 21 import org.openstreetmap.josm.gui.ExceptionDialogUtil; 22 import org.openstreetmap.josm.gui.OptionPaneUtil;23 22 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 24 23 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; … … 116 115 Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected(); 117 116 if (selection.size() == 0) { 118 OptionPaneUtil.showMessageDialog(117 JOptionPane.showMessageDialog( 119 118 Main.parent, 120 119 tr("There are no selected primitives to update."), -
trunk/src/org/openstreetmap/josm/actions/audio/AudioFasterAction.java
r1169 r2017 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import org.openstreetmap.josm.tools.Shortcut;6 5 7 6 import java.awt.event.KeyEvent; 7 8 import org.openstreetmap.josm.tools.Shortcut; 8 9 9 10 public class AudioFasterAction extends AudioFastSlowAction { -
trunk/src/org/openstreetmap/josm/actions/audio/AudioSlowerAction.java
r1169 r2017 5 5 6 6 import java.awt.event.KeyEvent; 7 7 8 import org.openstreetmap.josm.tools.Shortcut; 8 9 -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTaskList.java
r1979 r2017 20 20 import org.openstreetmap.josm.data.osm.DataSet; 21 21 import org.openstreetmap.josm.data.osm.OsmPrimitive; 22 import org.openstreetmap.josm.gui.OptionPaneUtil;23 22 import org.openstreetmap.josm.gui.download.DownloadDialog.DownloadTask; 24 23 import org.openstreetmap.josm.gui.layer.Layer; … … 105 104 106 105 if(! errors.equals("")) { 107 OptionPaneUtil.showMessageDialog(106 JOptionPane.showMessageDialog( 108 107 Main.parent, 109 108 "<html>"+tr("The following errors occurred during mass download:{0}", errors) … … 187 186 ); 188 187 189 int ret = OptionPaneUtil.showOptionDialog(188 int ret =JOptionPane.showOptionDialog( 190 189 Main.parent, 191 190 message, … … 193 192 JOptionPane.YES_NO_OPTION, 194 193 JOptionPane.WARNING_MESSAGE, 194 null, 195 195 options, 196 196 options[0] 197 197 ); 198 198 switch(ret) { 199 case JOptionPane.CLOSED_OPTION: return;200 case JOptionPane.NO_OPTION: return;201 case JOptionPane.YES_OPTION: updatePotentiallyDeletedPrimitives(potentiallyDeleted); break;199 case JOptionPane.CLOSED_OPTION: return; 200 case JOptionPane.NO_OPTION: return; 201 case JOptionPane.YES_OPTION: updatePotentiallyDeletedPrimitives(potentiallyDeleted); break; 202 202 } 203 203 } -
trunk/src/org/openstreetmap/josm/actions/mapmode/MapMode.java
r1677 r2017 10 10 import org.openstreetmap.josm.Main; 11 11 import org.openstreetmap.josm.actions.JosmAction; 12 import org.openstreetmap.josm.gui.MapFrame; 12 13 import org.openstreetmap.josm.gui.layer.Layer; 13 import org.openstreetmap.josm.gui.MapFrame;14 14 import org.openstreetmap.josm.tools.ImageProvider; 15 15 import org.openstreetmap.josm.tools.Shortcut; -
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r1935 r2017 41 41 import org.openstreetmap.josm.gui.MapFrame; 42 42 import org.openstreetmap.josm.gui.MapView; 43 import org.openstreetmap.josm.gui.OptionPaneUtil;44 43 import org.openstreetmap.josm.gui.SelectionManager; 45 44 import org.openstreetmap.josm.gui.SelectionManager.SelectionEnded; … … 247 246 ((MoveCommand) c).moveAgain(-dx, -dy); 248 247 249 OptionPaneUtil.showMessageDialog(248 JOptionPane.showMessageDialog( 250 249 Main.parent, 251 250 tr("Cannot move objects outside of the world."), -
trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
r1988 r2017 23 23 import org.openstreetmap.josm.data.osm.OsmPrimitive; 24 24 import org.openstreetmap.josm.gui.ExtendedDialog; 25 import org.openstreetmap.josm.gui.OptionPaneUtil;26 25 import org.openstreetmap.josm.tools.GBC; 27 26 import org.openstreetmap.josm.tools.Shortcut; … … 48 47 return; 49 48 if (Main.map == null) { 50 OptionPaneUtil.showMessageDialog(49 JOptionPane.showMessageDialog( 51 50 Main.parent, 52 51 tr("Can't search because there is no loaded data."), … … 200 199 } 201 200 Main.map.statusLine.setHelpText(msg); 202 OptionPaneUtil.showMessageDialog(201 JOptionPane.showMessageDialog( 203 202 Main.parent, 204 203 msg, … … 210 209 } 211 210 } catch (SearchCompiler.ParseError e) { 212 OptionPaneUtil.showMessageDialog(211 JOptionPane.showMessageDialog( 213 212 Main.parent, 214 213 e.getMessage(), -
trunk/src/org/openstreetmap/josm/actions/search/SelectionWebsiteLoader.java
r1857 r2017 20 20 import org.openstreetmap.josm.Main; 21 21 import org.openstreetmap.josm.data.osm.OsmPrimitive; 22 import org.openstreetmap.josm.gui.OptionPaneUtil;23 22 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 24 23 import org.openstreetmap.josm.io.OsmIdReader; … … 60 59 } catch (IOException e) { 61 60 e.printStackTrace(); 62 OptionPaneUtil.showMessageDialog(61 JOptionPane.showMessageDialog( 63 62 Main.parent, 64 63 tr("Could not read from URL: \"{0}\"",url), … … 68 67 } catch (SAXException e) { 69 68 e.printStackTrace(); 70 OptionPaneUtil.showMessageDialog(69 JOptionPane.showMessageDialog( 71 70 Main.parent, 72 71 tr("Parsing error in URL: \"{0}\"",url), … … 78 77 if (e.getCause() != null) { 79 78 if (e.getCause() instanceof IOException ) { 80 OptionPaneUtil.showMessageDialog(79 JOptionPane.showMessageDialog( 81 80 Main.parent, tr("Could not read from URL: \"{0}\"",url), 82 81 tr("Error"), JOptionPane.ERROR_MESSAGE); 83 82 } else if (e.getCause() instanceof SAXException) { 84 OptionPaneUtil.showMessageDialog(Main.parent,tr("Parsing error in URL: \"{0}\"",url),83 JOptionPane.showMessageDialog(Main.parent,tr("Parsing error in URL: \"{0}\"",url), 85 84 tr("Error"), JOptionPane.ERROR_MESSAGE); 86 85 } 87 86 } else { 88 OptionPaneUtil.showMessageDialog(Main.parent,tr("Error while communicating with server.",url),87 JOptionPane.showMessageDialog(Main.parent,tr("Error while communicating with server.",url), 89 88 tr("Error"), JOptionPane.ERROR_MESSAGE); 90 89 } -
trunk/src/org/openstreetmap/josm/command/ConflictAddCommand.java
r1990 r2017 16 16 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 17 17 import org.openstreetmap.josm.gui.DefaultNameFormatter; 18 import org.openstreetmap.josm.gui.OptionPaneUtil;19 18 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 20 19 import org.openstreetmap.josm.tools.ImageProvider; … … 29 28 30 29 protected void warnBecauseOfDoubleConflict() { 31 OptionPaneUtil.showMessageDialog(30 JOptionPane.showMessageDialog( 32 31 Main.parent, 33 32 tr("<html>Layer ''{0}'' already has a conflict for primitive<br>" -
trunk/src/org/openstreetmap/josm/command/MoveCommand.java
r1936 r2017 2 2 package org.openstreetmap.josm.command; 3 3 4 import static org.openstreetmap.josm.tools.I18n.tr;5 4 import static org.openstreetmap.josm.tools.I18n.trn; 6 5 -
trunk/src/org/openstreetmap/josm/command/RotateCommand.java
r1936 r2017 1 1 package org.openstreetmap.josm.command; 2 2 3 import static org.openstreetmap.josm.tools.I18n.tr;4 3 import static org.openstreetmap.josm.tools.I18n.trn; 5 4 -
trunk/src/org/openstreetmap/josm/command/TagConflictResolveCommand.java
r1989 r2017 2 2 package org.openstreetmap.josm.command; 3 3 4 import static org.openstreetmap.josm.tools.I18n.marktr; 4 5 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.tools.I18n.marktr;6 6 7 7 import java.util.Collection; -
trunk/src/org/openstreetmap/josm/command/UndeletePrimitivesCommand.java
r1750 r2017 12 12 import javax.swing.tree.MutableTreeNode; 13 13 14 import org.openstreetmap.josm.Main;15 14 import org.openstreetmap.josm.data.osm.OsmPrimitive; 16 import org.openstreetmap.josm.gui.layer.OsmDataLayer;17 15 import org.openstreetmap.josm.tools.ImageProvider; 18 16 -
trunk/src/org/openstreetmap/josm/command/VersionConflictResolveCommand.java
r1989 r2017 2 2 package org.openstreetmap.josm.command; 3 3 4 import static org.openstreetmap.josm.tools.I18n.marktr; 4 5 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.tools.I18n.marktr;6 6 7 7 import java.util.Collection; -
trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java
r1990 r2017 30 30 import org.openstreetmap.josm.gui.DefaultNameFormatter; 31 31 import org.openstreetmap.josm.gui.JMultilineLabel; 32 import org.openstreetmap.josm.gui.OptionPaneUtil;33 32 import org.openstreetmap.josm.tools.GBC; 34 33 import org.openstreetmap.josm.tools.ImageProvider; … … 140 139 } 141 140 142 int answer = OptionPaneUtil.showOptionDialog(141 int answer = JOptionPane.showOptionDialog( 143 142 Main.parent, 144 143 p, … … 146 145 JOptionPane.YES_NO_CANCEL_OPTION, 147 146 JOptionPane.PLAIN_MESSAGE, 147 null, 148 148 applicationOptions, 149 149 applicationOptions[0] -
trunk/src/org/openstreetmap/josm/data/Bounds.java
r1724 r2017 5 5 6 6 import org.openstreetmap.josm.data.coor.LatLon; 7 import org.openstreetmap.josm.data.projection.Projection;8 7 9 8 /** -
trunk/src/org/openstreetmap/josm/data/DataSetChecker.java
r1857 r2017 9 9 import org.openstreetmap.josm.Main; 10 10 import org.openstreetmap.josm.data.osm.OsmPrimitive; 11 import org.openstreetmap.josm.gui.OptionPaneUtil;12 11 import org.openstreetmap.josm.gui.layer.Layer; 13 12 import org.openstreetmap.josm.gui.layer.OsmDataLayer; … … 28 27 // FIXME: better message 29 28 // FIXME: translate message and title 30 OptionPaneUtil.showMessageDialog(29 JOptionPane.showMessageDialog( 31 30 Main.parent, 32 31 "cross references", … … 43 42 OsmDataLayer l = (OsmDataLayer)Main.map.mapView.getActiveLayer(); 44 43 if (l.data != Main.main.getCurrentDataSet()) { 45 OptionPaneUtil.showMessageDialog(44 JOptionPane.showMessageDialog( 46 45 Main.parent, 47 46 "Main.ds / active layer mismatch", … … 53 52 } 54 53 55 OptionPaneUtil.showMessageDialog(54 JOptionPane.showMessageDialog( 56 55 Main.parent, "working", "", JOptionPane.INFORMATION_MESSAGE); 57 56 } -
trunk/src/org/openstreetmap/josm/data/Preferences.java
r1857 r2017 30 30 import org.openstreetmap.josm.Main; 31 31 import org.openstreetmap.josm.actions.AboutAction; 32 import org.openstreetmap.josm.data.projection.Mercator;33 import org.openstreetmap.josm.gui.OptionPaneUtil;34 32 import org.openstreetmap.josm.gui.preferences.ProxyPreferences; 35 33 import org.openstreetmap.josm.tools.ColorHelper; … … 335 333 if (prefDir.exists()) { 336 334 if(!prefDir.isDirectory()) { 337 OptionPaneUtil.showMessageDialog(335 JOptionPane.showMessageDialog( 338 336 Main.parent, 339 337 tr("Cannot open preferences directory: {0}",Main.pref.getPreferencesDir()), … … 360 358 e1.printStackTrace(); 361 359 String backup = getPreferencesDir() + "preferences.bak"; 362 OptionPaneUtil.showMessageDialog(360 JOptionPane.showMessageDialog( 363 361 Main.parent, 364 362 tr("Preferences file had errors. Making backup of old one to {0}.", backup), -
trunk/src/org/openstreetmap/josm/data/ProjectionBounds.java
r1724 r2017 1 1 // License: GPL. Copyright 2007 by Immanuel Scholz and others 2 2 package org.openstreetmap.josm.data; 3 4 import java.awt.geom.Rectangle2D;5 3 6 4 import org.openstreetmap.josm.data.coor.EastNorth; -
trunk/src/org/openstreetmap/josm/data/ServerSidePreferences.java
r1879 r2017 12 12 import java.io.StringReader; 13 13 import java.net.HttpURLConnection; 14 import java.net.URLConnection;15 14 import java.net.MalformedURLException; 16 15 import java.net.URL; 16 import java.net.URLConnection; 17 17 import java.util.Collection; 18 18 import java.util.Collections; … … 25 25 26 26 import org.openstreetmap.josm.Main; 27 import org.openstreetmap.josm.gui.OptionPaneUtil;28 27 import org.openstreetmap.josm.io.OsmConnection; 29 28 import org.openstreetmap.josm.io.XmlWriter; … … 84 83 con.getInputStream().close(); 85 84 con.disconnect(); 86 OptionPaneUtil.showMessageDialog(85 JOptionPane.showMessageDialog( 87 86 Main.parent, 88 87 tr("Preferences stored on {0}", u.getHost()), … … 92 91 } catch (Exception e) { 93 92 e.printStackTrace(); 94 OptionPaneUtil.showMessageDialog(93 JOptionPane.showMessageDialog( 95 94 Main.parent, 96 95 tr("Could not upload preferences. Reason: {0}", e.getMessage()), … … 108 107 } catch (MalformedURLException e) { 109 108 e.printStackTrace(); 110 OptionPaneUtil.showMessageDialog(109 JOptionPane.showMessageDialog( 111 110 Main.parent, 112 111 tr("Could not load preferences from server."), -
trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java
r1857 r2017 2 2 package org.openstreetmap.josm.data.conflict; 3 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 4 6 import java.util.ArrayList; 5 import static org.openstreetmap.josm.tools.I18n.tr;6 7 7 import java.util.Collection; 8 8 import java.util.HashSet; -
trunk/src/org/openstreetmap/josm/data/coor/LatLon.java
r1990 r2017 5 5 import static org.openstreetmap.josm.tools.I18n.tr; 6 6 7 import java.text.DecimalFormat; 8 import java.text.NumberFormat; 9 10 import org.openstreetmap.josm.Main; 7 11 import org.openstreetmap.josm.data.Bounds; 8 12 import org.openstreetmap.josm.data.projection.Projection; 9 import org.openstreetmap.josm.Main;10 11 import java.text.DecimalFormat;12 import java.text.NumberFormat;13 13 14 14 /** -
trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java
r1998 r2017 9 9 10 10 import org.openstreetmap.josm.data.Bounds; 11 import org.openstreetmap.josm.data.coor.LatLon;12 11 13 12 /** -
trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java
r1724 r2017 4 4 package org.openstreetmap.josm.data.gpx; 5 5 6 import java.util.Date;7 6 import java.awt.Color; 8 7 9 import org.openstreetmap.josm.Main;10 8 import org.openstreetmap.josm.data.coor.CachedLatLon; 11 9 import org.openstreetmap.josm.data.coor.EastNorth; 12 10 import org.openstreetmap.josm.data.coor.LatLon; 13 import org.openstreetmap.josm.data.projection.Projection;14 11 import org.openstreetmap.josm.tools.DateUtils; 15 12 -
trunk/src/org/openstreetmap/josm/data/osm/Node.java
r1997 r2017 1 1 // License: GPL. Copyright 2007 by Immanuel Scholz and others 2 2 package org.openstreetmap.josm.data.osm; 3 4 import java.util.Locale;5 3 6 4 import org.openstreetmap.josm.data.coor.CachedLatLon; … … 8 6 import org.openstreetmap.josm.data.coor.LatLon; 9 7 import org.openstreetmap.josm.data.osm.visitor.Visitor; 10 import static org.openstreetmap.josm.tools.I18n.tr;11 8 12 9 /** -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r1990 r2017 241 241 /** 242 242 * The key/value list for this primitive. 243 * @deprecated This field will became private or protected in future, use api instead 244 */ 245 @Deprecated 246 public Map<String, String> keys; 243 * 244 */ 245 private Map<String, String> keys; 247 246 248 247 /** -
trunk/src/org/openstreetmap/josm/data/osm/Relation.java
r1997 r2017 1 1 package org.openstreetmap.josm.data.osm; 2 3 import static org.openstreetmap.josm.tools.I18n.tr;4 2 5 3 import java.util.ArrayList; -
trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java
r2008 r2017 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.data.osm; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 3 5 4 6 import java.util.ArrayList; … … 10 12 import java.util.Set; 11 13 import java.util.Map.Entry; 12 13 import static org.openstreetmap.josm.tools.I18n.tr;14 14 15 15 /** -
trunk/src/org/openstreetmap/josm/data/osm/Way.java
r1997 r2017 1 1 // License: GPL. Copyright 2007 by Immanuel Scholz and others 2 2 package org.openstreetmap.josm.data.osm; 3 4 import static org.openstreetmap.josm.tools.I18n.tr;5 import static org.openstreetmap.josm.tools.I18n.trn;6 3 7 4 import java.util.ArrayList; 8 5 import java.util.Arrays; 9 6 import java.util.Collection; 10 import java.util.HashSet;11 7 import java.util.List; 12 8 … … 25 21 * All way nodes in this way 26 22 * 27 * @deprecated This public field will become private or protected in the future. 28 * Use the new public API instead. 29 */ 30 @Deprecated 31 public final List<Node> nodes = new ArrayList<Node>(); 23 */ 24 private final List<Node> nodes = new ArrayList<Node>(); 32 25 33 26 /** -
trunk/src/org/openstreetmap/josm/data/osm/history/History.java
r1670 r2017 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.data.osm.history; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 3 5 4 6 import java.util.ArrayList; … … 8 10 import java.util.List; 9 11 import java.util.NoSuchElementException; 10 import static org.openstreetmap.josm.tools.I18n.tr;11 12 12 13 public class History{ -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java
r1709 r2017 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.data.osm.history; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 3 5 4 6 import java.util.Collections; … … 8 10 9 11 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 10 11 import static org.openstreetmap.josm.tools.I18n.tr;12 12 13 13 /** -
trunk/src/org/openstreetmap/josm/data/osm/history/RelationMember.java
r1670 r2017 2 2 package org.openstreetmap.josm.data.osm.history; 3 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 4 6 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 5 import static org.openstreetmap.josm.tools.I18n.tr;6 7 7 8 /** -
trunk/src/org/openstreetmap/josm/data/osm/visitor/Visitor.java
r1523 r2017 3 3 4 4 import org.openstreetmap.josm.data.osm.Changeset; 5 import org.openstreetmap.josm.data.osm.Node; 5 6 import org.openstreetmap.josm.data.osm.Relation; 6 import org.openstreetmap.josm.data.osm.Node;7 7 import org.openstreetmap.josm.data.osm.Way; 8 8 -
trunk/src/org/openstreetmap/josm/data/projection/Epsg4326.java
r1823 r2017 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import org.openstreetmap.josm.data.Bounds; 7 import org.openstreetmap.josm.data.coor.EastNorth; 6 8 import org.openstreetmap.josm.data.coor.LatLon; 7 import org.openstreetmap.josm.data.coor.EastNorth;8 import org.openstreetmap.josm.data.Bounds;9 import org.openstreetmap.josm.data.ProjectionBounds;10 9 11 10 /** -
trunk/src/org/openstreetmap/josm/data/projection/Lambert.java
r1947 r2017 10 10 11 11 import org.openstreetmap.josm.Main; 12 import org.openstreetmap.josm.data.Bounds; 12 13 import org.openstreetmap.josm.data.coor.EastNorth; 13 14 import org.openstreetmap.josm.data.coor.LatLon; 14 import org.openstreetmap.josm.data.Bounds;15 import org.openstreetmap.josm.gui.OptionPaneUtil;16 15 17 16 public class Lambert implements Projection { … … 108 107 } else if (layoutZone != currentZone) { 109 108 if (farawayFromLambertZoneFrance(lt,lg)) { 110 OptionPaneUtil.showMessageDialog(Main.parent,109 JOptionPane.showMessageDialog(Main.parent, 111 110 tr("IMPORTANT : data positioned far away from\n" 112 111 + "the current Lambert zone limits.\n" -
trunk/src/org/openstreetmap/josm/data/projection/LambertEST.java
r1823 r2017 7 7 import static org.openstreetmap.josm.tools.I18n.tr; 8 8 9 import org.openstreetmap.josm.data.Bounds; 9 10 import org.openstreetmap.josm.data.coor.EastNorth; 10 11 import org.openstreetmap.josm.data.coor.LatLon; 11 import org.openstreetmap.josm.data.Bounds;12 import org.openstreetmap.josm.data.ProjectionBounds;13 12 14 13 public class LambertEST implements Projection { -
trunk/src/org/openstreetmap/josm/data/projection/Mercator.java
r1823 r2017 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import org.openstreetmap.josm.data.Bounds; 6 7 import org.openstreetmap.josm.data.coor.EastNorth; 7 8 import org.openstreetmap.josm.data.coor.LatLon; 8 import org.openstreetmap.josm.data.Bounds;9 import org.openstreetmap.josm.data.ProjectionBounds;10 9 11 10 /** -
trunk/src/org/openstreetmap/josm/data/projection/Projection.java
r1929 r2017 2 2 package org.openstreetmap.josm.data.projection; 3 3 4 import org.openstreetmap.josm.data.Bounds; 4 5 import org.openstreetmap.josm.data.coor.EastNorth; 5 6 import org.openstreetmap.josm.data.coor.LatLon; 6 import org.openstreetmap.josm.data.Bounds;7 7 8 8 /** -
trunk/src/org/openstreetmap/josm/data/projection/SwissGrid.java
r1823 r2017 5 5 import static org.openstreetmap.josm.tools.I18n.tr; 6 6 7 import org.openstreetmap.josm. Main;7 import org.openstreetmap.josm.data.Bounds; 8 8 import org.openstreetmap.josm.data.coor.EastNorth; 9 9 import org.openstreetmap.josm.data.coor.LatLon; 10 import org.openstreetmap.josm.data.Bounds;11 import org.openstreetmap.josm.data.ProjectionBounds;12 10 13 11 /** -
trunk/src/org/openstreetmap/josm/data/projection/UTM.java
r1823 r2017 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import org.openstreetmap.josm.data.Bounds; 7 import org.openstreetmap.josm.data.coor.EastNorth; 6 8 import org.openstreetmap.josm.data.coor.LatLon; 7 import org.openstreetmap.josm.data.coor.EastNorth;8 import org.openstreetmap.josm.data.Bounds;9 import org.openstreetmap.josm.data.ProjectionBounds;10 9 11 10 /** -
trunk/src/org/openstreetmap/josm/gui/BookmarkList.java
r1865 r2017 42 42 } catch (IOException e) { 43 43 e.printStackTrace(); 44 OptionPaneUtil.showMessageDialog(44 JOptionPane.showMessageDialog( 45 45 Main.parent, 46 46 tr("<html>Could not read bookmarks.<br>{0}</html>", e.getMessage()), … … 62 62 Main.pref.saveBookmarks(bookmarks); 63 63 } catch (IOException e) { 64 OptionPaneUtil.showMessageDialog(64 JOptionPane.showMessageDialog( 65 65 Main.parent, 66 66 tr("<html>Could not write bookmark.<br>{0}</html>", e.getMessage()), -
trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java
r1940 r2017 89 89 return DIALOG_DISABLED_OPTION; 90 90 MessagePanel pnl = new MessagePanel(preferenceKey, message); 91 int ret = OptionPaneUtil.showOptionDialog(parent, pnl, title, optionType, messageType,options,defaultOption);91 int ret = JOptionPane.showOptionDialog(parent, pnl, title, optionType, messageType, null,options,defaultOption); 92 92 pnl.remeberDialogShowingEnabled(); 93 93 return ret; … … 128 128 return true; 129 129 MessagePanel pnl = new MessagePanel(preferenceKey, message); 130 boolean ret = OptionPaneUtil.showConfirmationDialog(parent, pnl, title, optionType, messageType, trueOption);130 int ret = JOptionPane.showConfirmDialog(parent, pnl, title, optionType, messageType); 131 131 pnl.remeberDialogShowingEnabled(); 132 return ret ;132 return ret == trueOption; 133 133 } 134 134 … … 155 155 return; 156 156 MessagePanel pnl = new MessagePanel(preferenceKey, message); 157 OptionPaneUtil.showMessageDialog(parent, pnl, title, messageType);157 JOptionPane.showMessageDialog(parent, pnl, title, messageType); 158 158 pnl.remeberDialogShowingEnabled(); 159 159 } -
trunk/src/org/openstreetmap/josm/gui/FileDrop.java
r1975 r2017 11 11 12 12 import org.openstreetmap.josm.actions.OpenFileAction; 13 14 import org.openstreetmap.josm.gui.FileDrop.TransferableObject; 13 15 14 16 /** -
trunk/src/org/openstreetmap/josm/gui/JMultilineLabel.java
r1864 r2017 15 15 import java.awt.font.LineBreakMeasurer; 16 16 import java.awt.font.TextAttribute; 17 import java.awt.font.TextLayout; 17 18 import java.text.AttributedCharacterIterator; 18 19 import java.text.AttributedString; 19 import java.awt.font.TextLayout;20 20 21 21 import javax.swing.JComponent; -
trunk/src/org/openstreetmap/josm/gui/MainApplet.java
r1849 r2017 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.applet.AppletContext; 6 7 import java.applet.AppletStub; 7 import java.applet.AppletContext;8 8 import java.awt.GridBagLayout; 9 9 import java.awt.event.ActionEvent; -
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r1802 r2017 21 21 import org.openstreetmap.josm.plugins.PluginHandler; 22 22 import org.openstreetmap.josm.tools.BugReportExceptionHandler; 23 import org.openstreetmap.josm.tools.I18n; 23 24 import org.openstreetmap.josm.tools.ImageProvider; 24 import org.openstreetmap.josm.tools.I18n;25 25 26 26 /** -
trunk/src/org/openstreetmap/josm/gui/MapFrame.java
r2012 r2017 22 22 import org.openstreetmap.josm.actions.mapmode.SelectAction; 23 23 import org.openstreetmap.josm.actions.mapmode.ZoomAction; 24 import org.openstreetmap.josm.gui.ScrollViewport;25 24 import org.openstreetmap.josm.gui.dialogs.CommandStackDialog; 26 25 import org.openstreetmap.josm.gui.dialogs.ConflictDialog; -
trunk/src/org/openstreetmap/josm/gui/MapScaler.java
r1908 r2017 13 13 import org.openstreetmap.josm.Main; 14 14 import org.openstreetmap.josm.actions.HelpAction.Helpful; 15 import org.openstreetmap.josm.data.coor.LatLon;16 15 17 16 public class MapScaler extends JComponent implements Helpful { -
trunk/src/org/openstreetmap/josm/gui/MapSlider.java
r1823 r2017 10 10 11 11 import org.openstreetmap.josm.actions.HelpAction.Helpful; 12 import org.openstreetmap.josm.data.coor.EastNorth;13 12 import org.openstreetmap.josm.data.ProjectionBounds; 14 import org.openstreetmap.josm.Main;15 13 16 14 class MapSlider extends JSlider implements PropertyChangeListener, ChangeListener, Helpful { -
trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java
r1987 r2017 1 1 // License: GPL. Copyright 2007 by Immanuel Scholz and others 2 2 package org.openstreetmap.josm.gui; 3 4 import static org.openstreetmap.josm.tools.I18n.tr;5 3 6 4 import java.awt.Dialog; -
trunk/src/org/openstreetmap/josm/gui/SideButton.java
r1790 r2017 2 2 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 5 import java.awt.Image; 6 import java.awt.Insets; 4 7 import java.awt.event.ActionListener; 5 import java.awt.Insets; 6 import java.awt.Image; 8 7 9 import javax.swing.Action; 10 import javax.swing.ImageIcon; 8 11 import javax.swing.JButton; 9 import javax.swing.ImageIcon;10 12 11 13 import org.openstreetmap.josm.Main; -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModel.java
r1954 r2017 27 27 import org.openstreetmap.josm.data.osm.RelationMember; 28 28 import org.openstreetmap.josm.data.osm.Way; 29 import org.openstreetmap.josm.gui.OptionPaneUtil;30 29 import org.openstreetmap.josm.gui.conflict.pair.MergeDecisionType; 31 30 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; … … 213 212 public LatLon getMergedCoords() { 214 213 switch(coordMergeDecision) { 215 case KEEP_MINE: return myCoords;216 case KEEP_THEIR: return theirCoords;217 case UNDECIDED: return null;214 case KEEP_MINE: return myCoords; 215 case KEEP_THEIR: return theirCoords; 216 case UNDECIDED: return null; 218 217 } 219 218 // should not happen … … 247 246 public Boolean getMergedDeletedState() { 248 247 switch(deletedMergeDecision) { 249 case KEEP_MINE: return myDeletedState;250 case KEEP_THEIR: return theirDeletedState;251 case UNDECIDED: return null;248 case KEEP_MINE: return myDeletedState; 249 case KEEP_THEIR: return theirDeletedState; 250 case UNDECIDED: return null; 252 251 } 253 252 // should not happen … … 280 279 public Boolean getMergedVisibleState() { 281 280 switch(visibleMergeDecision) { 282 case KEEP_MINE: return myVisibleState;283 case KEEP_THEIR: return theirVisibleState;284 case UNDECIDED: return null;281 case KEEP_MINE: return myVisibleState; 282 case KEEP_THEIR: return theirVisibleState; 283 case UNDECIDED: return null; 285 284 } 286 285 // should not happen … … 418 417 String msg = e.getMessage() != null ? e.getMessage() : e.toString(); 419 418 msg = msg.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">"); 420 OptionPaneUtil.showMessageDialog(419 JOptionPane.showMessageDialog( 421 420 Main.parent, 422 421 tr("<html>An error occurred while communicating with the server<br>" … … 469 468 tr("No, cancel operation") 470 469 }; 471 int ret = OptionPaneUtil.showOptionDialog(470 int ret = JOptionPane.showOptionDialog( 472 471 Main.parent, 473 472 tr("<html>There are {0} additional nodes used by way {1}<br>" … … 479 478 JOptionPane.YES_NO_OPTION, 480 479 JOptionPane.QUESTION_MESSAGE, 480 null, 481 481 options, 482 482 options[0] … … 484 484 485 485 switch(ret) { 486 case JOptionPane.CLOSED_OPTION: return false;487 case JOptionPane.YES_OPTION: return true;488 case JOptionPane.NO_OPTION: return false;486 case JOptionPane.CLOSED_OPTION: return false; 487 case JOptionPane.YES_OPTION: return true; 488 case JOptionPane.NO_OPTION: return false; 489 489 } 490 490 return false; … … 497 497 tr("No, cancel operation") 498 498 }; 499 int ret = OptionPaneUtil.showOptionDialog(499 int ret = JOptionPane.showOptionDialog( 500 500 Main.parent, 501 501 tr("<html>There are {0} additional primitives referred to by relation {1}<br>" … … 507 507 JOptionPane.YES_NO_OPTION, 508 508 JOptionPane.QUESTION_MESSAGE, 509 null, 509 510 options, 510 511 options[0] … … 512 513 513 514 switch(ret) { 514 case JOptionPane.CLOSED_OPTION: return false;515 case JOptionPane.YES_OPTION: return true;516 case JOptionPane.NO_OPTION: return false;515 case JOptionPane.CLOSED_OPTION: return false; 516 case JOptionPane.YES_OPTION: return true; 517 case JOptionPane.NO_OPTION: return false; 517 518 } 518 519 return false; -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java
r1989 r2017 20 20 import javax.swing.JOptionPane; 21 21 import javax.swing.JPanel; 22 import javax.swing.SwingUtilities; 23 24 import org.openstreetmap.josm.Main; 22 25 23 import org.openstreetmap.josm.data.coor.LatLon; 26 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;27 import org.openstreetmap.josm.gui.OptionPaneUtil;28 24 import org.openstreetmap.josm.gui.conflict.pair.MergeDecisionType; 29 25 import org.openstreetmap.josm.tools.ImageProvider; … … 583 579 tr("No, abort") 584 580 }; 585 int ret = OptionPaneUtil.showOptionDialog(581 int ret = JOptionPane.showOptionDialog( 586 582 null, 587 583 tr("<html>To keep your local version, JOSM<br>" … … 595 591 JOptionPane.YES_NO_OPTION, 596 592 JOptionPane.QUESTION_MESSAGE, 593 null, 597 594 options, 598 595 options[1] … … 623 620 tr("No, abort") 624 621 }; 625 int ret = OptionPaneUtil.showOptionDialog(622 int ret = JOptionPane.showOptionDialog( 626 623 null, 627 624 tr("<html>JOSM will have to remove your local primitive with id {0}<br>" … … 633 630 JOptionPane.YES_NO_OPTION, 634 631 JOptionPane.QUESTION_MESSAGE, 632 null, 635 633 options, 636 634 options[1] -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/MineTableCellRenderer.java
r1954 r2017 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.gui.conflict.pair.tags; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 3 5 4 6 import java.awt.Color; 5 7 6 8 import org.openstreetmap.josm.gui.conflict.pair.MergeDecisionType; 7 8 import static org.openstreetmap.josm.tools.I18n.tr;9 9 10 10 public class MineTableCellRenderer extends TagMergeTableCellRenderer { -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeTableCellRenderer.java
r1954 r2017 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.gui.conflict.pair.tags; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 3 5 4 6 import java.awt.Color; … … 8 10 import javax.swing.JTable; 9 11 import javax.swing.table.TableCellRenderer; 10 import static org.openstreetmap.josm.tools.I18n.tr;11 12 12 13 public abstract class TagMergeTableCellRenderer extends JLabel implements TableCellRenderer { -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java
r2008 r2017 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.gui.conflict.tags; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 3 5 4 6 import java.beans.PropertyChangeListener; … … 11 13 12 14 import javax.swing.table.DefaultTableModel; 13 import static org.openstreetmap.josm.tools.I18n.tr; 15 14 16 import org.openstreetmap.josm.data.osm.TagCollection; 15 17 -
trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java
r1990 r2017 26 26 import org.openstreetmap.josm.data.osm.OsmPrimitive; 27 27 import org.openstreetmap.josm.gui.DefaultNameFormatter; 28 import org.openstreetmap.josm.gui.OptionPaneUtil;29 28 import org.openstreetmap.josm.gui.conflict.pair.ConflictResolver; 30 29 import org.openstreetmap.josm.gui.conflict.pair.properties.OperationCancelledException; … … 194 193 tr("Close anyway"), 195 194 tr("Continue resolving")}; 196 int ret = OptionPaneUtil.showOptionDialog(Main.parent,195 int ret = JOptionPane.showOptionDialog(Main.parent, 197 196 tr("<html>You didn''t finish to merge the differences in this conflict.<br>" 198 197 + "Conflict resolutions won't be applied unless all differences<br>" … … 206 205 JOptionPane.YES_NO_OPTION, 207 206 JOptionPane.WARNING_MESSAGE, 207 null, 208 208 options, 209 209 options[1] 210 210 ); 211 211 switch(ret) { 212 case JOptionPane.YES_OPTION:213 setVisible(false);214 break;215 default:216 return;212 case JOptionPane.YES_OPTION: 213 setVisible(false); 214 break; 215 default: 216 return; 217 217 } 218 218 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/HistoryDialog.java
r1989 r2017 2 2 package org.openstreetmap.josm.gui.dialogs; 3 3 4 import static org.openstreetmap.josm.tools.I18n.marktr; 4 5 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.tools.I18n.marktr;6 6 7 7 import java.awt.BorderLayout; … … 44 44 import org.openstreetmap.josm.data.osm.history.History; 45 45 import org.openstreetmap.josm.data.osm.history.HistoryDataSet; 46 import org.openstreetmap.josm.gui.OptionPaneUtil;47 46 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 48 47 import org.openstreetmap.josm.gui.SideButton; … … 248 247 msg = task.getLastException().toString(); 249 248 } 250 OptionPaneUtil.showMessageDialog(249 JOptionPane.showMessageDialog( 251 250 Main.parent, 252 251 tr( -
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListPopup.java
r1847 r2017 13 13 14 14 import org.openstreetmap.josm.Main; 15 import org.openstreetmap.josm.gui.OptionPaneUtil;16 15 import org.openstreetmap.josm.gui.layer.Layer; 17 16 import org.openstreetmap.josm.tools.ImageProvider; … … 29 28 } 30 29 public void actionPerformed(ActionEvent e) { 31 OptionPaneUtil.showMessageDialog(30 JOptionPane.showMessageDialog( 32 31 Main.parent, 33 32 layer.getInfoComponent(), -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java
r1990 r2017 36 36 import org.openstreetmap.josm.gui.DefaultNameFormatter; 37 37 import org.openstreetmap.josm.gui.ExceptionDialogUtil; 38 import org.openstreetmap.josm.gui.OptionPaneUtil;39 38 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 40 39 import org.openstreetmap.josm.gui.layer.OsmDataLayer; … … 326 325 327 326 if (conflictsCount > 0) { 328 OptionPaneUtil.showMessageDialog(327 JOptionPane.showMessageDialog( 329 328 Main.parent, 330 329 tr("There were {0} conflicts during import.", conflictsCount), … … 348 347 ); 349 348 350 OptionPaneUtil.showMessageDialog(349 JOptionPane.showMessageDialog( 351 350 Main.parent, 352 351 message, … … 480 479 481 480 if (conflictsCount > 0) { 482 OptionPaneUtil.showMessageDialog(481 JOptionPane.showMessageDialog( 483 482 Main.parent, 484 483 tr("There were {0} conflicts during import.", conflictsCount), -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
r1990 r2017 66 66 import org.openstreetmap.josm.gui.DefaultNameFormatter; 67 67 import org.openstreetmap.josm.gui.ExceptionDialogUtil; 68 import org.openstreetmap.josm.gui.OptionPaneUtil;69 68 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 70 69 import org.openstreetmap.josm.gui.SideButton; … … 683 682 ); 684 683 switch(ret) { 685 case ConditionalOptionPaneUtil.DIALOG_DISABLED_OPTION: return;686 case JOptionPane.CLOSED_OPTION: return;687 case JOptionPane.NO_OPTION: return;688 case JOptionPane.YES_OPTION:689 memberTableModel.removeMembersReferringTo(toCheck);690 break;684 case ConditionalOptionPaneUtil.DIALOG_DISABLED_OPTION: return; 685 case JOptionPane.CLOSED_OPTION: return; 686 case JOptionPane.NO_OPTION: return; 687 case JOptionPane.YES_OPTION: 688 memberTableModel.removeMembersReferringTo(toCheck); 689 break; 691 690 } 692 691 } … … 719 718 ); 720 719 switch(ret) { 721 case ConditionalOptionPaneUtil.DIALOG_DISABLED_OPTION : return true;722 case JOptionPane.YES_OPTION: return true;723 case JOptionPane.NO_OPTION: return false;724 case JOptionPane.CLOSED_OPTION: return false;725 case JOptionPane.CANCEL_OPTION: throw new AddAbortException();720 case ConditionalOptionPaneUtil.DIALOG_DISABLED_OPTION : return true; 721 case JOptionPane.YES_OPTION: return true; 722 case JOptionPane.NO_OPTION: return false; 723 case JOptionPane.CLOSED_OPTION: return false; 724 case JOptionPane.CANCEL_OPTION: throw new AddAbortException(); 726 725 } 727 726 // should not happen … … 736 735 primitive.getDisplayName(DefaultNameFormatter.getInstance()) 737 736 ); 738 OptionPaneUtil.showMessageDialog(737 JOptionPane.showMessageDialog( 739 738 Main.parent, 740 739 msg, … … 1141 1140 tr("No, continue editing") 1142 1141 }; 1143 int ret = OptionPaneUtil.showOptionDialog(1142 int ret = JOptionPane.showOptionDialog( 1144 1143 Main.parent, 1145 1144 tr("<html>This relation has been changed outside of the editor.<br>" … … 1150 1149 JOptionPane.YES_NO_OPTION, 1151 1150 JOptionPane.WARNING_MESSAGE, 1151 null, 1152 1152 options, 1153 1153 options[0] 1154 1154 ); 1155 1155 switch(ret) { 1156 case JOptionPane.CANCEL_OPTION: return false;1157 case JOptionPane.YES_OPTION: return true;1158 case JOptionPane.NO_OPTION: return false;1156 case JOptionPane.CANCEL_OPTION: return false; 1157 case JOptionPane.YES_OPTION: return true; 1158 case JOptionPane.NO_OPTION: return false; 1159 1159 } 1160 1160 return false; … … 1162 1162 1163 1163 protected void warnDoubleConflict() { 1164 OptionPaneUtil.showMessageDialog(1164 JOptionPane.showMessageDialog( 1165 1165 Main.parent, 1166 1166 tr("<html>Layer ''{0}'' already has a conflict for primitive<br>" … … 1395 1395 ); 1396 1396 switch(ret) { 1397 case JOptionPane.YES_OPTION: return true;1398 case ConditionalOptionPaneUtil.DIALOG_DISABLED_OPTION: return true;1399 default:1400 return false;1397 case JOptionPane.YES_OPTION: return true; 1398 case ConditionalOptionPaneUtil.DIALOG_DISABLED_OPTION: return true; 1399 default: 1400 return false; 1401 1401 } 1402 1402 } … … 1546 1546 1547 1547 if (conflictsCount > 0) { 1548 OptionPaneUtil.showMessageDialog(1548 JOptionPane.showMessageDialog( 1549 1549 Main.parent, 1550 1550 tr("There were {0} conflicts during import.", conflictsCount), -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java
r1856 r2017 16 16 import org.openstreetmap.josm.data.osm.Relation; 17 17 import org.openstreetmap.josm.data.osm.visitor.MergeVisitor; 18 import org.openstreetmap.josm.gui.OptionPaneUtil;19 18 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 20 19 import org.openstreetmap.josm.gui.layer.OsmDataLayer; … … 134 133 msg = lastException.toString(); 135 134 } 136 OptionPaneUtil.showMessageDialog(135 JOptionPane.showMessageDialog( 137 136 Main.parent, 138 137 msg, … … 187 186 return; 188 187 getLayer().getConflicts().add(visitor.getConflicts()); 189 OptionPaneUtil.showMessageDialog(188 JOptionPane.showMessageDialog( 190 189 Main.parent, 191 190 tr("There were {0} conflicts during import.", -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowser.java
r1856 r2017 5 5 6 6 import java.awt.BorderLayout; 7 import java.awt.Dialog;8 7 import java.awt.FlowLayout; 9 8 import java.awt.event.ActionEvent; 10 9 import java.awt.event.MouseAdapter; 11 10 import java.awt.event.MouseEvent; 12 import java.io.IOException;13 import java.util.ArrayList;14 11 15 12 import javax.swing.AbstractAction; 16 13 import javax.swing.JCheckBox; 17 import javax.swing.JDialog;18 14 import javax.swing.JLabel; 19 15 import javax.swing.JList; 20 import javax.swing.JOptionPane;21 16 import javax.swing.JPanel; 22 17 import javax.swing.ListSelectionModel; 23 import javax.swing.SwingUtilities;24 18 import javax.swing.event.ListDataEvent; 25 19 import javax.swing.event.ListDataListener; … … 28 22 29 23 import org.openstreetmap.josm.Main; 30 import org.openstreetmap.josm.data.osm.DataSet;31 import org.openstreetmap.josm.data.osm.DataSource;32 24 import org.openstreetmap.josm.data.osm.Relation; 33 import org.openstreetmap.josm.data.osm.visitor.MergeVisitor;34 import org.openstreetmap.josm.gui.OptionPaneUtil;35 25 import org.openstreetmap.josm.gui.OsmPrimitivRenderer; 36 import org.openstreetmap.josm.gui.PleaseWaitRunnable;37 26 import org.openstreetmap.josm.gui.SideButton; 38 27 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 39 28 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor; 40 import org.openstreetmap.josm.io.OsmApi;41 import org.openstreetmap.josm.io.OsmServerBackreferenceReader;42 import org.openstreetmap.josm.io.OsmTransferException;43 29 import org.openstreetmap.josm.tools.ImageProvider; 44 import org.xml.sax.SAXException;45 30 46 31 /** -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableModel.java
r1839 r2017 2 2 package org.openstreetmap.josm.gui.dialogs.relation; 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 4 5 import java.util.ArrayList; 5 6 import java.util.Collection; -
trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java
r1865 r2017 8 8 import java.awt.event.ActionEvent; 9 9 import java.awt.event.ActionListener; 10 import java.awt.event.MouseListener;11 10 import java.awt.event.MouseAdapter; 12 11 import java.awt.event.MouseEvent; 12 import java.awt.event.MouseListener; 13 13 14 14 import javax.swing.DefaultListModel; … … 23 23 import org.openstreetmap.josm.data.Preferences; 24 24 import org.openstreetmap.josm.gui.BookmarkList; 25 import org.openstreetmap.josm.gui.OptionPaneUtil;26 25 import org.openstreetmap.josm.tools.GBC; 27 26 … … 79 78 80 79 if (tempBookmark == null) { 81 OptionPaneUtil.showMessageDialog(80 JOptionPane.showMessageDialog( 82 81 Main.parent, 83 82 tr("Please enter the desired coordinates first."), … … 87 86 return; 88 87 } 89 tempBookmark.name = OptionPaneUtil.showInputDialog(88 tempBookmark.name = JOptionPane.showInputDialog( 90 89 Main.parent,tr("Please enter a name for the location."), 91 90 tr("Name of location"), … … 104 103 Object sel = bookmarks.getSelectedValue(); 105 104 if (sel == null) { 106 OptionPaneUtil.showMessageDialog(105 JOptionPane.showMessageDialog( 107 106 Main.parent, 108 107 tr("Select a bookmark first."), -
trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java
r1722 r2017 17 17 import javax.swing.JTextField; 18 18 import javax.swing.SwingUtilities; 19 import javax.swing.event.DocumentEvent; 19 20 import javax.swing.event.DocumentListener; 20 import javax.swing.event.DocumentEvent;21 21 22 22 import org.openstreetmap.josm.data.Bounds; -
trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java
r1857 r2017 32 32 33 33 import org.openstreetmap.josm.Main; 34 import org.openstreetmap.josm.gui.OptionPaneUtil;35 import org.openstreetmap.josm.gui.download.DownloadDialog;36 import org.openstreetmap.josm.gui.download.DownloadSelection;37 34 import org.openstreetmap.josm.tools.GBC; 38 35 import org.xml.sax.Attributes; … … 167 164 if(searchtext.length()==0) 168 165 { 169 OptionPaneUtil.showMessageDialog(166 JOptionPane.showMessageDialog( 170 167 Main.parent, 171 168 tr("Please enter a search string"), … … 191 188 { 192 189 x.printStackTrace(); 193 OptionPaneUtil.showMessageDialog(190 JOptionPane.showMessageDialog( 194 191 Main.parent, 195 192 tr("Cannot read place search results from server"), -
trunk/src/org/openstreetmap/josm/gui/download/SlippyMapChooser.java
r1879 r2017 13 13 import java.awt.Rectangle; 14 14 import java.awt.Toolkit; 15 import java.awt.geom.Point2D;16 15 import java.util.Vector; 17 16 -
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialog.java
r1989 r2017 2 2 package org.openstreetmap.josm.gui.history; 3 3 4 import static org.openstreetmap.josm.tools.I18n.marktr; 4 5 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.tools.I18n.marktr;6 6 7 7 import java.awt.BorderLayout; -
trunk/src/org/openstreetmap/josm/gui/history/RelationMemberListTableCellRenderer.java
r1989 r2017 2 2 package org.openstreetmap.josm.gui.history; 3 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 4 6 import java.awt.Color; 5 import static org.openstreetmap.josm.tools.I18n.tr;6 7 import java.awt.Component; 7 8 import java.util.HashMap; -
trunk/src/org/openstreetmap/josm/gui/history/RelationMemberListViewer.java
r1709 r2017 5 5 import java.awt.GridBagLayout; 6 6 import java.awt.Insets; 7 import java.util.Observable;8 import java.util.Observer;9 7 10 8 import javax.swing.JPanel; -
trunk/src/org/openstreetmap/josm/gui/history/RelationMemberTableColumnModel.java
r1709 r2017 2 2 package org.openstreetmap.josm.gui.history; 3 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 4 6 import javax.swing.table.DefaultTableColumnModel; 5 7 import javax.swing.table.TableColumn; 6 import static org.openstreetmap.josm.tools.I18n.tr;7 8 8 9 /** -
trunk/src/org/openstreetmap/josm/gui/history/TagInfoViewer.java
r1709 r2017 5 5 import java.awt.GridBagLayout; 6 6 import java.awt.Insets; 7 import java.util.Observable;8 import java.util.Observer;9 7 10 8 import javax.swing.JPanel; -
trunk/src/org/openstreetmap/josm/gui/history/TagTableCellRenderer.java
r1709 r2017 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.gui.history; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 3 5 4 6 import java.awt.Color; … … 9 11 import javax.swing.JTable; 10 12 import javax.swing.table.TableCellRenderer; 11 12 import static org.openstreetmap.josm.tools.I18n.tr;13 13 14 14 /** -
trunk/src/org/openstreetmap/josm/gui/history/TagTableColumnModel.java
r1709 r2017 2 2 package org.openstreetmap.josm.gui.history; 3 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 4 6 import javax.swing.table.DefaultTableColumnModel; 5 7 import javax.swing.table.TableColumn; 6 import static org.openstreetmap.josm.tools.I18n.tr;7 8 8 9 /** -
trunk/src/org/openstreetmap/josm/gui/history/VersionTableColumnModel.java
r1709 r2017 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.gui.history; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 3 5 4 6 import javax.swing.table.DefaultTableColumnModel; 5 7 import javax.swing.table.TableCellRenderer; 6 8 import javax.swing.table.TableColumn; 7 import static org.openstreetmap.josm.tools.I18n.tr;8 9 /** 9 10 * The {@see TableColumnModel} for the table with the list of versions -
trunk/src/org/openstreetmap/josm/gui/layer/GeoImageLayer.java
r1890 r2017 70 70 import org.openstreetmap.josm.gui.MapFrame; 71 71 import org.openstreetmap.josm.gui.MapView; 72 import org.openstreetmap.josm.gui.OptionPaneUtil;73 72 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 74 73 import org.openstreetmap.josm.gui.dialogs.LayerListDialog; … … 731 730 exifDate = ExifReader.readTime(f); 732 731 } catch (ParseException e) { 733 OptionPaneUtil.showMessageDialog(732 JOptionPane.showMessageDialog( 734 733 Main.parent, 735 734 tr("The date in file \"{0}\" could not be parsed.", f.getName()), … … 740 739 } 741 740 if (exifDate == null) { 742 OptionPaneUtil.showMessageDialog(741 JOptionPane.showMessageDialog( 743 742 Main.parent, 744 743 tr("There is no EXIF time within the file \"{0}\".", f.getName()), … … 763 762 764 763 while (true) { 765 int answer = OptionPaneUtil.showConfirmationDialog(764 int answer = JOptionPane.showConfirmDialog( 766 765 Main.parent, 767 766 p, … … 787 786 return; 788 787 } catch (NumberFormatException x) { 789 OptionPaneUtil.showMessageDialog(788 JOptionPane.showMessageDialog( 790 789 Main.parent, 791 790 tr("Time entered could not be parsed."), … … 794 793 ); 795 794 } catch (ParseException x) { 796 OptionPaneUtil.showMessageDialog(795 JOptionPane.showMessageDialog( 797 796 Main.parent, 798 797 tr("Time entered could not be parsed."), -
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r1956 r2017 59 59 import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil; 60 60 import org.openstreetmap.josm.gui.MapView; 61 import org.openstreetmap.josm.gui.OptionPaneUtil;62 61 import org.openstreetmap.josm.gui.dialogs.LayerListDialog; 63 62 import org.openstreetmap.josm.gui.dialogs.LayerListPopup; … … 135 134 group.setSelected(r[0].getModel(), true); 136 135 } 137 int answer = OptionPaneUtil.showConfirmationDialog(Main.parent, panel,136 int answer = JOptionPane.showConfirmDialog(Main.parent, panel, 138 137 tr("Select line drawing options"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); 139 138 switch (answer) { … … 159 158 JColorChooser c = new JColorChooser(getColor(getName())); 160 159 Object[] options = new Object[] { tr("OK"), tr("Cancel"), tr("Default") }; 161 int answer = OptionPaneUtil.showOptionDialog(160 int answer = JOptionPane.showOptionDialog( 162 161 Main.parent, 163 162 c, … … 165 164 JOptionPane.OK_CANCEL_OPTION, 166 165 JOptionPane.PLAIN_MESSAGE, 166 null, 167 167 options, options[0] 168 168 ); … … 782 782 msg.add(maxRect, GBC.eol()); 783 783 784 int ret = OptionPaneUtil.showConfirmationDialog(784 int ret = JOptionPane.showConfirmDialog( 785 785 Main.parent, 786 786 msg, … … 880 880 881 881 if (toDownload.size() > 1) { 882 ret = OptionPaneUtil.showConfirmationDialog(882 ret = JOptionPane.showConfirmDialog( 883 883 Main.parent, 884 884 msg, … … 970 970 } 971 971 if (firstTime < 0.0) { 972 OptionPaneUtil.showMessageDialog(972 JOptionPane.showMessageDialog( 973 973 Main.parent, 974 974 tr("No GPX track available in layer to associate audio with."), -
trunk/src/org/openstreetmap/josm/gui/layer/Layer.java
r1893 r2017 66 66 * The visibility state of the layer. 67 67 * 68 * @deprecated use {@see #setVisible(boolean)} and {@see #isVisible()} instead. This field 69 * is going to be private (or protected) in a future release. 70 */ 71 @Deprecated 72 public boolean visible = true; 68 */ 69 private boolean visible = true; 73 70 74 71 /** … … 80 77 * The name of this layer. 81 78 * 82 * @deprecated use {@see #getName()} and {@see #setName(String)} instead. This field 83 * is going to be private (or protected) in the future. 84 */ 85 @Deprecated 86 public String name; 79 */ 80 private String name; 81 87 82 /** 88 83 * If a file is associated with this layer, this variable should be set to it. -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r1898 r2017 58 58 import org.openstreetmap.josm.data.osm.visitor.SimplePaintVisitor; 59 59 import org.openstreetmap.josm.gui.MapView; 60 import org.openstreetmap.josm.gui.OptionPaneUtil;61 60 import org.openstreetmap.josm.gui.dialogs.LayerListDialog; 62 61 import org.openstreetmap.josm.gui.dialogs.LayerListPopup; … … 296 295 } 297 296 if (numNewConflicts > 0) { 298 OptionPaneUtil.showMessageDialog(297 JOptionPane.showMessageDialog( 299 298 Main.parent, 300 299 tr("There were {0} conflicts during import.", numNewConflicts), -
trunk/src/org/openstreetmap/josm/gui/layer/RawGpsLayer.java
r1910 r2017 41 41 import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil; 42 42 import org.openstreetmap.josm.gui.MapView; 43 import org.openstreetmap.josm.gui.OptionPaneUtil;44 43 import org.openstreetmap.josm.gui.dialogs.LayerListDialog; 45 44 import org.openstreetmap.josm.gui.dialogs.LayerListPopup; … … 214 213 group.setSelected(r[0].getModel(), true); 215 214 } 216 int answer = OptionPaneUtil.showConfirmationDialog(215 int answer = JOptionPane.showConfirmDialog( 217 216 Main.parent, 218 217 panel, … … 237 236 JColorChooser c = new JColorChooser(Main.pref.getColor(marktr("gps point"), "layer "+getName(), Color.gray)); 238 237 Object[] options = new Object[]{tr("OK"), tr("Cancel"), tr("Default")}; 239 int answer = OptionPaneUtil.showOptionDialog(238 int answer = JOptionPane.showOptionDialog( 240 239 Main.parent, 241 240 c, 242 241 tr("Choose a color"), 243 242 JOptionPane.OK_CANCEL_OPTION, 244 JOptionPane.PLAIN_MESSAGE, options, options[0]);243 JOptionPane.PLAIN_MESSAGE, null,options, options[0]); 245 244 switch (answer) { 246 245 case 0: -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java
r1911 r2017 14 14 import javax.swing.Icon; 15 15 16 import org.openstreetmap.josm.Main;17 16 import org.openstreetmap.josm.data.coor.CachedLatLon; 18 17 import org.openstreetmap.josm.data.coor.EastNorth; -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java
r1911 r2017 35 35 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 36 36 import org.openstreetmap.josm.gui.MapView; 37 import org.openstreetmap.josm.gui.OptionPaneUtil;38 37 import org.openstreetmap.josm.gui.dialogs.LayerListDialog; 39 38 import org.openstreetmap.josm.gui.dialogs.LayerListPopup; … … 200 199 JColorChooser c = new JColorChooser(getColor(getName())); 201 200 Object[] options = new Object[]{tr("OK"), tr("Cancel"), tr("Default")}; 202 int answer = OptionPaneUtil.showOptionDialog(201 int answer = JOptionPane.showOptionDialog( 203 202 Main.parent, 204 203 c, … … 206 205 JOptionPane.OK_CANCEL_OPTION, 207 206 JOptionPane.PLAIN_MESSAGE, 207 null, 208 208 options, 209 209 options[0] … … 228 228 public void actionPerformed(ActionEvent e) { 229 229 if (! AudioPlayer.paused()) { 230 OptionPaneUtil.showMessageDialog(230 JOptionPane.showMessageDialog( 231 231 Main.parent, 232 232 tr("You need to pause audio at the moment when you hear your synchronization cue."), … … 238 238 AudioMarker recent = AudioMarker.recentlyPlayedMarker(); 239 239 if (synchronizeAudioMarkers(recent)) { 240 OptionPaneUtil.showMessageDialog(240 JOptionPane.showMessageDialog( 241 241 Main.parent, 242 242 tr("Audio synchronized at point {0}.", recent.text), … … 245 245 ); 246 246 } else { 247 OptionPaneUtil.showMessageDialog(247 JOptionPane.showMessageDialog( 248 248 Main.parent, 249 249 tr("Unable to synchronize in layer being played."), … … 260 260 public void actionPerformed(ActionEvent e) { 261 261 if (! AudioPlayer.paused()) { 262 OptionPaneUtil.showMessageDialog(262 JOptionPane.showMessageDialog( 263 263 Main.parent, 264 264 tr("You need to have paused audio at the point on the track where you want the marker."), … … 339 339 } 340 340 if (am == null) { 341 OptionPaneUtil.showMessageDialog(341 JOptionPane.showMessageDialog( 342 342 Main.parent, 343 343 tr("No existing audio markers in this layer to offset from."), -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java
r1865 r2017 26 26 import org.openstreetmap.josm.data.gpx.WayPoint; 27 27 import org.openstreetmap.josm.gui.MapView; 28 import org.openstreetmap.josm.gui.OptionPaneUtil;29 28 import org.openstreetmap.josm.gui.layer.GpxLayer; 30 29 import org.openstreetmap.josm.tools.AudioPlayer; … … 168 167 if (ca == null) { 169 168 /* Not close enough to track, or no audio marker found for some other reason */ 170 OptionPaneUtil.showMessageDialog(169 JOptionPane.showMessageDialog( 171 170 Main.parent, 172 171 tr("You need to drag the play head near to the GPX track whose associated sound track you were playing (after the first marker)."), … … 223 222 WayPoint cw = recent.parentLayer.fromLayer.nearestPointOnTrack(en, enPlus25px.east() - en.east()); 224 223 if (cw == null) { 225 OptionPaneUtil.showMessageDialog(224 JOptionPane.showMessageDialog( 226 225 Main.parent, 227 226 tr("You need to SHIFT-drag the play head onto an audio marker or onto the track point where you want to synchronize."), … … 238 237 if(ca == null) 239 238 { 240 OptionPaneUtil.showMessageDialog(239 JOptionPane.showMessageDialog( 241 240 Main.parent, 242 241 tr("Unable to create new audio marker."), … … 247 246 } 248 247 else if (recent.parentLayer.synchronizeAudioMarkers(ca)) { 249 OptionPaneUtil.showMessageDialog(248 JOptionPane.showMessageDialog( 250 249 Main.parent, 251 250 tr("Audio synchronized at point {0}.", ca.text), … … 256 255 endDrag(false); 257 256 } else { 258 OptionPaneUtil.showMessageDialog(257 JOptionPane.showMessageDialog( 259 258 Main.parent, 260 259 tr("Unable to synchronize in layer being played."), -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/WebMarker.java
r1865 r2017 11 11 import org.openstreetmap.josm.Main; 12 12 import org.openstreetmap.josm.data.coor.LatLon; 13 import org.openstreetmap.josm.gui.OptionPaneUtil;14 13 import org.openstreetmap.josm.tools.OpenBrowser; 15 14 … … 40 39 String error = OpenBrowser.displayUrl(webUrl.toString()); 41 40 if (error != null) { 42 OptionPaneUtil.showMessageDialog(Main.parent,41 JOptionPane.showMessageDialog(Main.parent, 43 42 "<html><b>" + 44 43 tr("There was an error while trying to display the URL for this marker") + -
trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyleHandler.java
r1747 r2017 7 7 import javax.swing.ImageIcon; 8 8 9 import org.openstreetmap.josm.Main; 9 10 import org.openstreetmap.josm.tools.ColorHelper; 10 11 import org.xml.sax.Attributes; 11 12 import org.xml.sax.helpers.DefaultHandler; 12 13 import org.openstreetmap.josm.Main;14 13 15 14 public class ElemStyleHandler extends DefaultHandler -
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
r1743 r2017 9 9 10 10 import org.openstreetmap.josm.Main; 11 import org.openstreetmap.josm.gui.mappaint.ElemStyles;12 11 import org.openstreetmap.josm.io.MirroredInputStream; 13 12 import org.openstreetmap.josm.tools.ImageProvider; -
trunk/src/org/openstreetmap/josm/gui/preferences/AdvancedPreference.java
r1865 r2017 30 30 31 31 import org.openstreetmap.josm.Main; 32 import org.openstreetmap.josm.gui.OptionPaneUtil;33 32 import org.openstreetmap.josm.tools.GBC; 34 33 … … 219 218 private void editPreference(final PreferenceDialog gui, final JTable list) { 220 219 if (list.getSelectedRowCount() != 1) { 221 OptionPaneUtil.showMessageDialog(220 JOptionPane.showMessageDialog( 222 221 gui, 223 222 tr("Please select the row to edit."), … … 227 226 return; 228 227 } 229 String v = (String) OptionPaneUtil.showInputDialog(228 String v = (String) JOptionPane.showInputDialog( 230 229 Main.parent, 231 230 tr("New value for {0}", model.getValueAt(list.getSelectedRow(), 0)), … … 244 243 private void removePreference(final PreferenceDialog gui, final JTable list) { 245 244 if (list.getSelectedRowCount() == 0) { 246 OptionPaneUtil.showMessageDialog(245 JOptionPane.showMessageDialog( 247 246 gui, 248 247 tr("Please select the row to delete."), … … 266 265 p.add(new JLabel(tr("Value")), GBC.std().insets(0,0,5,0)); 267 266 p.add(value, GBC.eol().insets(5,0,0,0).fill(GBC.HORIZONTAL)); 268 int answer = OptionPaneUtil.showConfirmationDialog(267 int answer = JOptionPane.showConfirmDialog( 269 268 gui, p, 270 269 tr("Enter a new key/value pair"), -
trunk/src/org/openstreetmap/josm/gui/preferences/ColorPreference.java
r1865 r2017 36 36 import org.openstreetmap.josm.data.osm.visitor.MapPaintVisitor; 37 37 import org.openstreetmap.josm.gui.MapScaler; 38 import org.openstreetmap.josm.gui.OptionPaneUtil;39 38 import org.openstreetmap.josm.gui.dialogs.ConflictDialog; 40 39 import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer; … … 157 156 int sel = colors.getSelectedRow(); 158 157 JColorChooser chooser = new JColorChooser((Color)colors.getValueAt(sel, 1)); 159 int answer = OptionPaneUtil.showConfirmationDialog(158 int answer = JOptionPane.showConfirmDialog( 160 159 gui, chooser, 161 160 tr("Choose a color for {0}", getName((String)colors.getValueAt(sel, 0))), -
trunk/src/org/openstreetmap/josm/gui/preferences/MapPaintPreference.java
r1971 r2017 15 15 import javax.swing.JScrollPane; 16 16 17 import org.openstreetmap.josm.Main; 17 18 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles; 18 import org.openstreetmap.josm.Main;19 19 import org.openstreetmap.josm.tools.GBC; 20 20 -
trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java
r1865 r2017 23 23 24 24 import org.openstreetmap.josm.Main; 25 import org.openstreetmap.josm.gui.OptionPaneUtil;26 25 import org.openstreetmap.josm.plugins.PluginDownloader; 27 26 import org.openstreetmap.josm.plugins.PluginSelection; … … 88 87 buttons.add(new JButton(new AbstractAction(tr("Add")){ 89 88 public void actionPerformed(ActionEvent e) { 90 String s = OptionPaneUtil.showInputDialog(89 String s = JOptionPane.showInputDialog( 91 90 gui, 92 91 tr("Add JOSM Plugin description URL."), … … 102 101 public void actionPerformed(ActionEvent e) { 103 102 if (list.getSelectedValue() == null) { 104 OptionPaneUtil.showMessageDialog(103 JOptionPane.showMessageDialog( 105 104 gui, 106 105 tr("Please select an entry."), … … 110 109 return; 111 110 } 112 String s = (String) OptionPaneUtil.showInputDialog(111 String s = (String)JOptionPane.showInputDialog( 113 112 Main.parent, 114 113 tr("Edit JOSM Plugin description URL."), … … 125 124 public void actionPerformed(ActionEvent event) { 126 125 if (list.getSelectedValue() == null) { 127 OptionPaneUtil.showMessageDialog(126 JOptionPane.showMessageDialog( 128 127 gui, 129 128 tr("Please select an entry."), … … 137 136 }), GBC.eol().fill(GBC.HORIZONTAL)); 138 137 p.add(buttons, GBC.eol()); 139 int answer = OptionPaneUtil.showConfirmationDialog(138 int answer = JOptionPane.showConfirmDialog( 140 139 gui, 141 140 p, -
trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java
r1955 r2017 22 22 23 23 import org.openstreetmap.josm.Main; 24 import org.openstreetmap.josm.gui.OptionPaneUtil;25 24 import org.openstreetmap.josm.plugins.PluginHandler; 26 25 import org.openstreetmap.josm.tools.BugReportExceptionHandler; … … 101 100 } 102 101 if (requiresRestart) { 103 OptionPaneUtil.showMessageDialog(102 JOptionPane.showMessageDialog( 104 103 Main.parent, 105 104 tr("You have to restart JOSM for some settings to take effect."), -
trunk/src/org/openstreetmap/josm/gui/preferences/ProjectionPreference.java
r1990 r2017 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.awt.Color;7 6 import java.awt.GridBagLayout; 8 7 … … 11 10 import javax.swing.JComboBox; 12 11 import javax.swing.JLabel; 12 import javax.swing.JPanel; 13 13 import javax.swing.JScrollPane; 14 import javax.swing.JPanel;15 14 16 15 import org.openstreetmap.josm.Main; 17 16 import org.openstreetmap.josm.data.coor.CoordinateFormat; 18 import org.openstreetmap.josm.data.osm.Node;19 17 import org.openstreetmap.josm.data.projection.Mercator; 20 18 import org.openstreetmap.josm.data.projection.Projection; -
trunk/src/org/openstreetmap/josm/gui/preferences/ServerAccessPreference.java
r2015 r2017 2 2 package org.openstreetmap.josm.gui.preferences; 3 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 4 import org.openstreetmap.josm.io.CredentialsManager; 6 5 import org.openstreetmap.josm.io.OsmConnection; 7 import org.openstreetmap.josm.io.CredentialsManager;8 6 9 7 public class ServerAccessPreference implements PreferenceSetting { -
trunk/src/org/openstreetmap/josm/gui/preferences/StyleSources.java
r1865 r2017 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.awt.Color;7 6 import java.awt.Component; 8 7 import java.awt.GridBagLayout; 9 8 import java.awt.event.ActionEvent; 10 9 import java.awt.event.ActionListener; 11 12 10 import java.io.BufferedReader; 13 11 import java.io.InputStreamReader; … … 25 23 import javax.swing.JList; 26 24 import javax.swing.JOptionPane; 25 import javax.swing.JPanel; 27 26 import javax.swing.JScrollPane; 28 import javax.swing.JPanel;29 27 import javax.swing.ListCellRenderer; 30 28 31 29 import org.openstreetmap.josm.Main; 32 import org.openstreetmap.josm.gui.OptionPaneUtil;33 30 import org.openstreetmap.josm.io.MirroredInputStream; 34 31 import org.openstreetmap.josm.tools.GBC; … … 140 137 iconadd.addActionListener(new ActionListener(){ 141 138 public void actionPerformed(ActionEvent e) { 142 String source = OptionPaneUtil.showInputDialog(139 String source = JOptionPane.showInputDialog( 143 140 Main.parent, 144 141 tr("Icon paths"), … … 156 153 public void actionPerformed(ActionEvent e) { 157 154 if (sourcesList.getSelectedIndex() == -1) { 158 OptionPaneUtil.showMessageDialog(155 JOptionPane.showMessageDialog( 159 156 Main.parent, 160 157 tr("Please select the row to edit."), … … 163 160 ); 164 161 } else { 165 String source = (String) OptionPaneUtil.showInputDialog(162 String source = (String)JOptionPane.showInputDialog( 166 163 Main.parent, 167 164 tr("Icon paths"), … … 183 180 public void actionPerformed(ActionEvent e) { 184 181 if (iconsList.getSelectedIndex() == -1) { 185 OptionPaneUtil.showMessageDialog(182 JOptionPane.showMessageDialog( 186 183 Main.parent, tr("Please select the row to delete."), 187 184 tr("Warning"), … … 197 194 add.addActionListener(new ActionListener(){ 198 195 public void actionPerformed(ActionEvent e) { 199 String source = OptionPaneUtil.showInputDialog(196 String source = JOptionPane.showInputDialog( 200 197 Main.parent, 201 198 name, … … 212 209 public void actionPerformed(ActionEvent e) { 213 210 if (sourcesList.getSelectedIndex() == -1) { 214 OptionPaneUtil.showMessageDialog(211 JOptionPane.showMessageDialog( 215 212 Main.parent, tr("Please select the row to edit."), 216 213 tr("Warning"), JOptionPane.WARNING_MESSAGE); 217 214 } else { 218 String source = (String) OptionPaneUtil.showInputDialog(215 String source = (String)JOptionPane.showInputDialog( 219 216 Main.parent, 220 217 name, … … 236 233 public void actionPerformed(ActionEvent e) { 237 234 if (sourcesList.getSelectedIndex() == -1) { 238 OptionPaneUtil.showMessageDialog(Main.parent, tr("Please select the row to delete."),235 JOptionPane.showMessageDialog(Main.parent, tr("Please select the row to delete."), 239 236 tr("Warning"), JOptionPane.WARNING_MESSAGE); 240 237 } else { … … 248 245 public void actionPerformed(ActionEvent e) { 249 246 if (sourcesDefaults.getSelectedIndex() == -1) { 250 OptionPaneUtil.showMessageDialog(247 JOptionPane.showMessageDialog( 251 248 Main.parent, tr("Please select the row to copy."), 252 249 tr("Warning"), JOptionPane.WARNING_MESSAGE); -
trunk/src/org/openstreetmap/josm/gui/preferences/TaggingPresetPreference.java
r1743 r2017 13 13 import javax.swing.JMenuItem; 14 14 import javax.swing.JPanel; 15 import javax.swing.JScrollPane; 15 16 import javax.swing.JSeparator; 16 import javax.swing.JScrollPane;17 17 18 18 import org.openstreetmap.josm.Main; -
trunk/src/org/openstreetmap/josm/gui/progress/PleaseWaitProgressMonitor.java
r1865 r2017 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.gui.progress; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 3 5 4 6 import java.awt.Dialog; … … 16 18 17 19 import org.openstreetmap.josm.Main; 18 import org.openstreetmap.josm.gui.OptionPaneUtil;19 20 import org.openstreetmap.josm.gui.PleaseWaitDialog; 20 import static org.openstreetmap.josm.tools.I18n.tr;21 21 22 22 … … 106 106 dialog.cancel.removeActionListener(cancelListener); 107 107 if (getErrorMessage() != null) { 108 OptionPaneUtil.showMessageDialog(108 JOptionPane.showMessageDialog( 109 109 Main.parent, getErrorMessage(), 110 110 tr("Error"), -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
r1865 r2017 44 44 import org.openstreetmap.josm.data.osm.Way; 45 45 import org.openstreetmap.josm.gui.ExtendedDialog; 46 import org.openstreetmap.josm.gui.OptionPaneUtil;47 46 import org.openstreetmap.josm.gui.QuadStateCheckBox; 48 47 import org.openstreetmap.josm.io.MirroredInputStream; … … 599 598 } catch (IOException e) { 600 599 e.printStackTrace(); 601 OptionPaneUtil.showMessageDialog(600 JOptionPane.showMessageDialog( 602 601 Main.parent, 603 602 tr("Could not read tagging preset source: {0}",source), … … 607 606 } catch (SAXException e) { 608 607 e.printStackTrace(); 609 OptionPaneUtil.showMessageDialog(608 JOptionPane.showMessageDialog( 610 609 Main.parent, 611 610 tr("Error parsing {0}: ", source)+e.getMessage(), -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetMenu.java
r1677 r2017 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.awt.Component; 6 7 import java.awt.event.ActionEvent; 7 import java.awt.Component;8 8 import java.util.ArrayList; 9 9 import java.util.Collections; … … 15 15 import javax.swing.JSeparator; 16 16 17 import org.openstreetmap.josm.gui.tagging.TaggingPreset;18 17 import org.openstreetmap.josm.tools.PresetTextComparator; 19 18 -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSeparator.java
r1169 r2017 2 2 package org.openstreetmap.josm.gui.tagging; 3 3 4 import org.openstreetmap.josm.gui.tagging.TaggingPreset;5 4 6 5 public class TaggingPresetSeparator extends TaggingPreset { -
trunk/src/org/openstreetmap/josm/io/GpxExporter.java
r1949 r2017 30 30 import org.openstreetmap.josm.data.osm.DataSet; 31 31 import org.openstreetmap.josm.gui.ExtendedDialog; 32 import org.openstreetmap.josm.gui.OptionPaneUtil;33 32 import org.openstreetmap.josm.gui.layer.GpxLayer; 34 33 import org.openstreetmap.josm.gui.layer.Layer; … … 169 168 } catch (IOException x) { 170 169 x.printStackTrace(); 171 OptionPaneUtil.showMessageDialog(Main.parent, tr("Error while exporting {0}:\n{1}", fn, x.getMessage()),170 JOptionPane.showMessageDialog(Main.parent, tr("Error while exporting {0}:\n{1}", fn, x.getMessage()), 172 171 tr("Error"), JOptionPane.ERROR_MESSAGE); 173 172 } … … 249 248 l.setVisibleRowCount(4); 250 249 l.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); 251 int answer = OptionPaneUtil.showConfirmationDialog(250 int answer = JOptionPane.showConfirmDialog( 252 251 Main.parent, 253 252 new JScrollPane(l), -
trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java
r1747 r2017 7 7 import java.io.FileInputStream; 8 8 import java.io.FileOutputStream; 9 import java.io.IOException; 9 10 import java.io.InputStream; 10 import java.io.IOException;11 11 import java.net.URL; 12 12 import java.net.URLConnection; -
trunk/src/org/openstreetmap/josm/io/NMEAImporter.java
r1857 r2017 12 12 import org.openstreetmap.josm.Main; 13 13 import org.openstreetmap.josm.actions.ExtensionFileFilter; 14 import org.openstreetmap.josm.gui.OptionPaneUtil;15 14 import org.openstreetmap.josm.gui.layer.GpxLayer; 16 15 import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer; … … 49 48 msg += tr("Zero coordinates: ") + r.getParserZeroCoordinates(); 50 49 if (success) { 51 OptionPaneUtil.showMessageDialog(50 JOptionPane.showMessageDialog( 52 51 Main.parent, 53 52 msg, … … 55 54 JOptionPane.INFORMATION_MESSAGE); 56 55 } else { 57 OptionPaneUtil.showMessageDialog(Main.parent, msg, tr("NMEA import faliure!"), JOptionPane.ERROR_MESSAGE);56 JOptionPane.showMessageDialog(Main.parent, msg, tr("NMEA import faliure!"), JOptionPane.ERROR_MESSAGE); 58 57 } 59 58 } -
trunk/src/org/openstreetmap/josm/io/OsmExporter.java
r1949 r2017 18 18 import org.openstreetmap.josm.Main; 19 19 import org.openstreetmap.josm.actions.ExtensionFileFilter; 20 import org.openstreetmap.josm.gui.OptionPaneUtil;21 20 import org.openstreetmap.josm.gui.layer.Layer; 22 21 import org.openstreetmap.josm.gui.layer.OsmDataLayer; … … 80 79 } catch (IOException e) { 81 80 e.printStackTrace(); 82 OptionPaneUtil.showMessageDialog(81 JOptionPane.showMessageDialog( 83 82 Main.parent, 84 83 tr("<html>An error occurred while saving.<br>Error is: <br>{0}</html>", e.getMessage()), … … 95 94 } catch (IOException e2) { 96 95 e2.printStackTrace(); 97 OptionPaneUtil.showMessageDialog(96 JOptionPane.showMessageDialog( 98 97 Main.parent, 99 98 tr("<html>An error occurred while restoring backup file.<br>Error is: <br>{0}</html>", e2.getMessage()), … … 112 111 dstStream = new FileOutputStream(dst); 113 112 } catch (FileNotFoundException e) { 114 OptionPaneUtil.showMessageDialog(Main.parent, tr("Could not back up file. Exception is: {0}", e113 JOptionPane.showMessageDialog(Main.parent, tr("Could not back up file. Exception is: {0}", e 115 114 .getMessage()), tr("Error"), JOptionPane.ERROR_MESSAGE); 116 115 return; -
trunk/src/org/openstreetmap/josm/plugins/PluginDownloader.java
r1860 r2017 28 28 import org.openstreetmap.josm.actions.AboutAction; 29 29 import org.openstreetmap.josm.gui.ExtendedDialog; 30 import org.openstreetmap.josm.gui.OptionPaneUtil;31 30 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 32 31 import org.xml.sax.SAXException; … … 51 50 @Override protected void finish() { 52 51 if (errors.length() > 0) { 53 OptionPaneUtil.showMessageDialog(52 JOptionPane.showMessageDialog( 54 53 Main.parent, 55 54 tr("There were problems with the following plugins:\n\n {0}",errors), … … 58 57 ); 59 58 } else { 60 OptionPaneUtil.showMessageDialog(59 JOptionPane.showMessageDialog( 61 60 Main.parent, 62 61 trn("{0} Plugin successfully downloaded. Please restart JOSM.", "{0} Plugins successfully downloaded. Please restart JOSM.", count, count), -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r1860 r2017 34 34 import org.openstreetmap.josm.gui.ExtendedDialog; 35 35 import org.openstreetmap.josm.gui.MapFrame; 36 import org.openstreetmap.josm.gui.OptionPaneUtil;37 36 import org.openstreetmap.josm.gui.download.DownloadSelection; 38 37 import org.openstreetmap.josm.gui.preferences.PreferenceSettingFactory; … … 67 66 plugins.remove(p); 68 67 Main.pref.removeFromCollection("plugins", p); 69 OptionPaneUtil.showMessageDialog(68 JOptionPane.showMessageDialog( 70 69 Main.parent, 71 70 tr("Loading of {0} plugin was requested. This plugin is no longer required.", p), … … 87 86 } 88 87 if (info.mainversion > AboutAction.getVersionNumber()) { 89 OptionPaneUtil.showMessageDialog(88 JOptionPane.showMessageDialog( 90 89 Main.parent, 91 90 tr("Plugin {0} requires JOSM update to version {1}.", pluginName, … … 106 105 if(warn != null) 107 106 { 108 OptionPaneUtil.showMessageDialog(Main.parent,107 JOptionPane.showMessageDialog(Main.parent, 109 108 tr("Plugin {0} is required by plugin {1} but was not found.", 110 109 warn, pluginName), … … 120 119 p.get(info.stage).add(info); 121 120 } else if(early) { 122 OptionPaneUtil.showMessageDialog(121 JOptionPane.showMessageDialog( 123 122 Main.parent, 124 123 tr("Plugin not found: {0}.", pluginName), … … 137 136 Main.pref.put("pluginmanager.lastupdate",Long.toString(tim)); 138 137 } else if (d > maxTime) { 139 OptionPaneUtil.showMessageDialog(Main.parent,138 JOptionPane.showMessageDialog(Main.parent, 140 139 "<html>" + 141 140 tr("Last plugin update more than {0} days ago.", d) + … … 217 216 { 218 217 if (!PluginDownloader.moveUpdatedPlugins()) { 219 OptionPaneUtil.showMessageDialog(218 JOptionPane.showMessageDialog( 220 219 Main.parent, 221 220 tr("Activating the updated plugins failed. Check if JOSM has the permission to overwrite the existing ones."), … … 297 296 while (plugins.remove(plugin.info.name)) {} 298 297 Main.pref.putCollection("plugins", plugins); 299 OptionPaneUtil.showMessageDialog(Main.parent,298 JOptionPane.showMessageDialog(Main.parent, 300 299 tr("The plugin has been removed from the configuration. Please restart JOSM to unload the plugin."), 301 300 tr("Information"), 302 301 JOptionPane.INFORMATION_MESSAGE); 303 302 } else { 304 OptionPaneUtil.showMessageDialog(303 JOptionPane.showMessageDialog( 305 304 Main.parent, 306 305 tr("The plugin could not be removed. Probably it was already disabled"), … … 345 344 a.setEditable(false); 346 345 a.setText(b.toString()); 347 OptionPaneUtil.showMessageDialog(346 JOptionPane.showMessageDialog( 348 347 Main.parent, 349 348 new JScrollPane(a), -
trunk/src/org/openstreetmap/josm/plugins/PluginSelection.java
r1860 r2017 38 38 import org.openstreetmap.josm.Main; 39 39 import org.openstreetmap.josm.gui.ExtendedDialog; 40 import org.openstreetmap.josm.gui.OptionPaneUtil;41 40 import org.openstreetmap.josm.tools.OpenBrowser; 42 41 … … 50 49 int count = PluginDownloader.downloadDescription(); 51 50 if (count > 0) { 52 OptionPaneUtil.showMessageDialog(Main.parent,51 JOptionPane.showMessageDialog(Main.parent, 53 52 trn("Downloaded plugin information from {0} site", 54 53 "Downloaded plugin information from {0} sites", count, count), … … 57 56 ); 58 57 } else { 59 OptionPaneUtil.showMessageDialog(58 JOptionPane.showMessageDialog( 60 59 Main.parent, 61 60 tr("No plugin information found."), … … 90 89 } 91 90 if (toUpdate.isEmpty()) { 92 OptionPaneUtil.showMessageDialog(91 JOptionPane.showMessageDialog( 93 92 Main.parent, 94 93 tr("All installed plugins are up to date."), … … 350 349 if(err > 0) 351 350 { 352 OptionPaneUtil.showMessageDialog(351 JOptionPane.showMessageDialog( 353 352 Main.parent, 354 353 tr("Error reading plugin information file: {0}", f.getName()), -
trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java
r1865 r2017 15 15 16 16 import org.openstreetmap.josm.Main; 17 import org.openstreetmap.josm.gui.OptionPaneUtil;18 17 19 18 /** … … 340 339 341 340 public static void audioMalfunction(Exception ex) { 342 OptionPaneUtil.showMessageDialog(Main.parent,341 JOptionPane.showMessageDialog(Main.parent, 343 342 "<html><p>" + tr(ex.getMessage()) + "</p></html>", 344 343 tr("Error playing sound"), JOptionPane.ERROR_MESSAGE); -
trunk/src/org/openstreetmap/josm/tools/AudioUtil.java
r1685 r2017 2 2 package org.openstreetmap.josm.tools; 3 3 4 import java.io. IOException;4 import java.io.File; 5 5 import java.net.URL; 6 import java.io.File;7 6 8 7 import javax.sound.sampled.AudioFormat; -
trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
r1882 r2017 21 21 import org.openstreetmap.josm.Main; 22 22 import org.openstreetmap.josm.actions.ShowStatusReportAction; 23 import org.openstreetmap.josm.gui.OptionPaneUtil;24 23 import org.openstreetmap.josm.plugins.PluginHandler; 25 24 … … 39 38 if (e instanceof OutOfMemoryError) { 40 39 // do not translate the string, as translation may raise an exception 41 OptionPaneUtil.showMessageDialog(Main.parent, "JOSM is out of memory. " +40 JOptionPane.showMessageDialog(Main.parent, "JOSM is out of memory. " + 42 41 "Strange things may happen.\nPlease restart JOSM with the -Xmx###M option,\n" + 43 42 "where ### is the the number of MB assigned to JOSM (e.g. 256).\n" + … … 53 52 54 53 Object[] options = new String[]{tr("Do nothing"), tr("Report Bug")}; 55 int answer = OptionPaneUtil.showOptionDialog(Main.parent, tr("An unexpected exception occurred.\n\n" +54 int answer = JOptionPane.showOptionDialog(Main.parent, tr("An unexpected exception occurred.\n\n" + 56 55 "This is always a coding error. If you are running the latest\n" + 57 56 "version of JOSM, please consider being kind and file a bug report."), 58 tr("Unexpected Exception"), JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE, 57 tr("Unexpected Exception"), JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE,null, 59 58 options, options[0]); 60 59 if (answer == 1) { … … 84 83 p.add(new JScrollPane(info), GBC.eop()); 85 84 86 OptionPaneUtil.showMessageDialog(Main.parent, p, tr("Warning"), JOptionPane.WARNING_MESSAGE);85 JOptionPane.showMessageDialog(Main.parent, p, tr("Warning"), JOptionPane.WARNING_MESSAGE); 87 86 } catch (Exception e1) { 88 87 e1.printStackTrace(); -
trunk/src/org/openstreetmap/josm/tools/I18n.java
r1802 r2017 5 5 import java.util.Arrays; 6 6 import java.util.Comparator; 7 import java.util.LinkedList; 7 8 import java.util.Locale; 8 import java.util.LinkedList;9 9 import java.util.MissingResourceException; 10 10 import java.util.Vector; 11 11 12 import org.openstreetmap.josm.gui.MainApplication; 12 13 import org.xnap.commons.i18n.I18nFactory; -
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r1879 r2017 1 1 // License: GPL. Copyright 2007 by Immanuel Scholz and others 2 2 package org.openstreetmap.josm.tools; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 3 5 4 6 import java.awt.Component; … … 31 33 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 32 34 import org.openstreetmap.josm.io.MirroredInputStream; 33 import static org.openstreetmap.josm.tools.I18n.tr;34 35 35 36 /** -
trunk/src/org/openstreetmap/josm/tools/PlatformHook.java
r1195 r2017 1 1 // License: GPL. Copyright 2007 by Immanuel Scholz and others 2 2 package org.openstreetmap.josm.tools; 3 4 import org.openstreetmap.josm.tools.Shortcut;5 3 6 4 import java.io.IOException; -
trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
r1842 r2017 11 11 12 12 import org.openstreetmap.josm.Main; 13 import org.openstreetmap.josm.actions.mapmode.SelectAction;14 13 15 14 /** -
trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
r1195 r2017 2 2 package org.openstreetmap.josm.tools; 3 3 4 import org.openstreetmap.josm.tools.Shortcut;5 import org.openstreetmap.josm.Main;6 7 4 import java.awt.event.KeyEvent; 8 5 import java.io.IOException; 6 7 import org.openstreetmap.josm.Main; 9 8 10 9 /** -
trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
r1415 r2017 2 2 package org.openstreetmap.josm.tools; 3 3 4 import org.openstreetmap.josm.tools.Shortcut;5 import org.openstreetmap.josm.tools.PlatformHookUnixoid;6 import org.openstreetmap.josm.Main;7 8 4 import java.awt.event.KeyEvent; 9 5 import java.io.IOException; 6 7 import org.openstreetmap.josm.Main; 10 8 11 9 /** -
trunk/src/org/openstreetmap/josm/tools/Shortcut.java
r1865 r2017 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import org.openstreetmap.josm.Main;6 import org.openstreetmap.josm.gui.OptionPaneUtil;7 5 8 6 import java.awt.event.KeyEvent; 7 import java.util.Collection; 9 8 import java.util.HashMap; 10 9 import java.util.LinkedHashMap; 11 10 import java.util.Map; 12 import java.util.Collection; 11 13 12 import javax.swing.AbstractButton; 14 import javax.swing.KeyStroke;15 13 import javax.swing.JMenu; 16 14 import javax.swing.JOptionPane; 15 import javax.swing.KeyStroke; 16 17 import org.openstreetmap.josm.Main; 17 18 18 19 /** … … 444 445 // a lengthy warning message 445 446 private static void displayWarning(Shortcut conflictsWith, Shortcut potentialShortcut, String shortText, String longText) { 446 OptionPaneUtil.showMessageDialog(Main.parent,447 JOptionPane.showMessageDialog(Main.parent, 447 448 tr("Setting the keyboard shortcut ''{0}'' for the action ''{1}'' ({2}) failed\n"+ 448 449 "because the shortcut is already taken by the action ''{3}'' ({4}).\n\n", -
trunk/src/org/openstreetmap/josm/tools/WikiReader.java
r1879 r2017 1 1 // License: GPL. Copyright 2007 by Immanuel Scholz and others 2 2 package org.openstreetmap.josm.tools; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 3 5 4 6 import java.io.BufferedReader; … … 9 11 10 12 import org.openstreetmap.josm.Main; 11 import org.openstreetmap.josm.tools.LanguageInfo;12 13 import static org.openstreetmap.josm.tools.I18n.tr;14 13 15 14 /** -
trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java
r1755 r2017 20 20 import org.xml.sax.SAXException; 21 21 import org.xml.sax.helpers.DefaultHandler; 22 23 import org.openstreetmap.josm.tools.LanguageInfo;24 22 25 23 /**
Note:
See TracChangeset
for help on using the changeset viewer.