Changeset 2039 in josm
- Timestamp:
- 2009-09-03T15:13:20+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r2025 r2039 338 338 // 339 339 try { 340 CoordinateFormat format = CoordinateFormat.valueOf(Main.pref.get("coordinates"));340 //CoordinateFormat format = CoordinateFormat.valueOf(Main.pref.get("coordinates")); 341 341 CoordinateFormat.setCoordinateFormat(CoordinateFormat.valueOf(Main.pref.get("coordinates"))); 342 342 } catch (IllegalArgumentException iae) { … … 412 412 dialog.setVisible(true); 413 413 switch(dialog.getUserAction()) { 414 415 416 414 case CANCEL: return false; 415 case PROCEED: return true; 416 default: return false; 417 417 } 418 418 } … … 446 446 numUnsavedLayers 447 447 ); 448 int result = new ExtendedDialog(parent, tr("Unsaved Changes"), 449 new JLabel(msg), 450 new String[] {tr("Save and Exit"), tr("Discard and Exit"), tr("Cancel")}, 451 new String[] {"save.png", "exit.png", "cancel.png"}).getValue(); 452 453 switch(result) { 454 case 2: /* discard and exit */ return true; 455 case 3: /* cancel */ return false; 448 449 ExtendedDialog ed = new ExtendedDialog(parent, 450 tr("Unsaved Changes"), 451 new String[] {tr("Save and Exit"), tr("Discard and Exit"), tr("Cancel")}); 452 ed.setButtonIcons(new String[] {"save.png", "exit.png", "cancel.png"}); 453 ed.setContent(new JLabel(msg)); 454 ed.showDialog(); 455 456 switch(ed.getValue()) { 457 case 2: /* discard and exit */ return true; 458 case 3: /* cancel */ return false; 456 459 } 457 460 boolean savefailed = false; -
trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
r2025 r2039 155 155 for (HashSet<Node> nodelinks : backlinks.values()) { 156 156 if (!nodelinks.containsAll(allNodes)) { 157 int option= new ExtendedDialog(Main.parent,157 ExtendedDialog ed = new ExtendedDialog(Main.parent, 158 158 tr("Merge nodes with different memberships?"), 159 tr("The selected nodes have differing relation memberships. " 160 + "Do you still want to merge them?"), 161 new String[] {tr("Merge Anyway"), tr("Cancel")}, 162 new String[] {"mergenodes.png", "cancel.png"}).getValue(); 163 if (option == 1) { 159 new String[] {tr("Merge Anyway"), tr("Cancel")}); 160 ed.setButtonIcons(new String[] {"mergenodes.png", "cancel.png"}); 161 ed.setContent(tr("The selected nodes have differing relation memberships. " 162 + "Do you still want to merge them?")); 163 ed.showDialog(); 164 165 if (ed.getValue() == 1) { 164 166 break; 165 167 } -
trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
r1674 r2039 73 73 while ((line = input.readLine()) != null) { 74 74 // Skip potential private information 75 if (line.trim().toLowerCase().startsWith("osm-server.username")) 75 if (line.trim().toLowerCase().startsWith("osm-server.username")) { 76 76 continue; 77 if (line.trim().toLowerCase().startsWith("osm-server.password")) 77 } 78 if (line.trim().toLowerCase().startsWith("osm-server.password")) { 78 79 continue; 79 if (line.trim().toLowerCase().startsWith("marker.show")) 80 } 81 if (line.trim().toLowerCase().startsWith("marker.show")) { 80 82 continue; 83 } 81 84 82 85 text.append(line); … … 97 100 sp.setPreferredSize(new Dimension(600, 500)); 98 101 99 int result = new ExtendedDialog(Main.parent, tr(tr("Status Report")), sp, 100 new String[] {tr("Copy to clipboard and close"), tr("Close") }, 101 new String[] {"copy.png", "cancel.png" }).getValue(); 102 ExtendedDialog ed = new ExtendedDialog(Main.parent, 103 tr("Status Report"), 104 new String[] {tr("Copy to clipboard and close"), tr("Close") }); 105 ed.setButtonIcons(new String[] {"copy.png", "cancel.png" }); 106 ed.setContent(sp); 107 ed.showDialog(); 102 108 103 if( result!= 1) return;109 if(ed.getValue() != 1) return; 104 110 try { 105 111 Toolkit.getDefaultToolkit().getSystemClipboard().setContents( … … 107 113 public void lostOwnership(Clipboard clipboard, Transferable contents) {} 108 114 } 109 115 ); 110 116 } 111 117 catch (RuntimeException x) {} -
trunk/src/org/openstreetmap/josm/command/DeletedStateConflictResolveCommand.java
r2025 r2039 69 69 } 70 70 } else if (decision.equals(MergeDecisionType.KEEP_THEIR)) { 71 if (conflict.getTheir(). deleted) {71 if (conflict.getTheir().isDeleted()) { 72 72 layer.data.unlinkReferencesToPrimitive(conflict.getMy()); 73 73 conflict.getMy().delete(true); 74 74 } else { 75 conflict.getMy().delete d = conflict.getTheir().deleted;75 conflict.getMy().delete(conflict.getTheir().isDeleted()); 76 76 } 77 77 } else -
trunk/src/org/openstreetmap/josm/data/APIDataSet.java
r2025 r2039 40 40 toUpdate.clear(); 41 41 toDelete.clear(); 42 if (ds == null) 43 return; 42 44 43 for (OsmPrimitive osm :ds.allPrimitives()) { 45 44 if (osm.get("josm/ignore") != null) { -
trunk/src/org/openstreetmap/josm/gui/FileDrop.java
r2017 r2039 9 9 import java.io.PrintStream; 10 10 import java.io.Reader; 11 import java.util.List; 12 13 import javax.swing.BorderFactory; 11 14 12 15 import org.openstreetmap.josm.actions.OpenFileAction; … … 71 74 null, // Logging stream 72 75 c, // Drop target 73 javax.swing.BorderFactory.createMatteBorder( 2, 2, 2, 2, defaultBorderColor ), // Drag border76 BorderFactory.createMatteBorder( 2, 2, 2, 2, defaultBorderColor ), // Drag border 74 77 true, // Recursive 75 78 new FileDrop.Listener() … … 341 344 342 345 // Get a useful list 343 java.util.List fileList = (java.util.List)346 List fileList = (java.util.List) 344 347 tr.getTransferData(java.awt.datatransfer.DataFlavor.javaFileListFlavor); 345 348 346 349 // Convert list to array 347 final java.io.File[] files = (File[]) fileList.toArray();;350 final File[] files = (File[]) fileList.toArray(); 348 351 349 352 // Alert listener to drop. -
trunk/src/org/openstreetmap/josm/gui/MapStatus.java
r2025 r2039 173 173 continue; 174 174 } 175 if (osms != null && osms.equals(osmStatus) && ms.modifiers == oldModifiers) {175 if (osms.equals(osmStatus) && ms.modifiers == oldModifiers) { 176 176 continue; 177 177 } -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java
r1954 r2039 56 56 */ 57 57 public abstract class ListMergeModel<T> extends Observable { 58 private static final Logger logger = Logger.getLogger(ListMergeModel.class.getName());58 //private static final Logger logger = Logger.getLogger(ListMergeModel.class.getName()); 59 59 60 60 public static final String FROZEN_PROP = ListMergeModel.class.getName() + ".frozen"; -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java
r1954 r2039 45 45 */ 46 46 public abstract class ListMerger<T> extends JPanel implements PropertyChangeListener, Observer { 47 private static final Logger logger = Logger.getLogger(ListMerger.class.getName());47 //private static final Logger logger = Logger.getLogger(ListMerger.class.getName()); 48 48 49 49 protected JTable myEntriesTable; -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListTableCellRenderer.java
r1990 r2039 29 29 */ 30 30 public class NodeListTableCellRenderer extends JLabel implements TableCellRenderer { 31 static private final Logger logger = Logger.getLogger(NodeListTableCellRenderer.class.getName());32 private static DecimalFormat COORD_FORMATTER = new DecimalFormat("###0.0000");31 //static private final Logger logger = Logger.getLogger(NodeListTableCellRenderer.class.getName()); 32 //private static DecimalFormat COORD_FORMATTER = new DecimalFormat("###0.0000"); 33 33 public final static Color BGCOLOR_SELECTED = new Color(143,170,255); 34 34 public final static Color BGCOLOR_EMPTY_ROW = new Color(234,234,234); … … 67 67 // 68 68 sb.append("<strong>id</strong>=") 69 .append(primitive. id)69 .append(primitive.getId()) 70 70 .append("<br>"); 71 71 … … 168 168 reset(); 169 169 switch(column) { 170 case 0:171 renderRowId(getModel(table),row, isSelected);172 break;173 case 1:174 if (node == null) {175 renderEmptyRow();176 } else {177 renderNode(getModel(table), node, row, isSelected);178 }179 break;180 default:181 // should not happen182 throw new RuntimeException(tr("unexpected column index. Got {0}", column));170 case 0: 171 renderRowId(getModel(table),row, isSelected); 172 break; 173 case 1: 174 if (node == null) { 175 renderEmptyRow(); 176 } else { 177 renderNode(getModel(table), node, row, isSelected); 178 } 179 break; 180 default: 181 // should not happen 182 throw new RuntimeException(tr("unexpected column index. Got {0}", column)); 183 183 } 184 184 return this; -
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
r2025 r2039 62 62 */ 63 63 public class LayerListDialog extends ToggleDialog { 64 static private final Logger logger = Logger.getLogger(LayerListDialog.class.getName());64 //static private final Logger logger = Logger.getLogger(LayerListDialog.class.getName()); 65 65 66 66 /** the unique instance of the dialog */ … … 317 317 dialog.setVisible(true); 318 318 switch(dialog.getUserAction()) { 319 320 321 319 case CANCEL: return false; 320 case PROCEED: return true; 321 default: return false; 322 322 } 323 323 } -
trunk/src/org/openstreetmap/josm/io/DiffResultReader.java
r1811 r2039 93 93 94 94 public void visit(Node n) { 95 String key = "node:" + (newIdMap.containsKey(n) ? newIdMap.get(n) : n. id);95 String key = "node:" + (newIdMap.containsKey(n) ? newIdMap.get(n) : n.getId()); 96 96 System.out.println("key: "+key); 97 97 Long[] nv = versions.get(key); 98 98 if (nv != null) { 99 99 processed.add(n); 100 if (!n. deleted) {100 if (!n.isDeleted()) { 101 101 n.id = nv[0]; n.version = nv[1].intValue(); 102 102 } … … 104 104 } 105 105 public void visit(Way w) { 106 String key = "way:" + (newIdMap.containsKey(w) ? newIdMap.get(w) : w. id);106 String key = "way:" + (newIdMap.containsKey(w) ? newIdMap.get(w) : w.getId()); 107 107 Long[] nv = versions.get(key); 108 108 if (nv != null) { 109 109 processed.add(w); 110 if (!w. deleted) {110 if (!w.isDeleted()) { 111 111 w.id = nv[0]; w.version = nv[1].intValue(); 112 112 } … … 114 114 } 115 115 public void visit(Relation r) { 116 String key = "relation:" + (newIdMap.containsKey(r) ? newIdMap.get(r) : r. id);116 String key = "relation:" + (newIdMap.containsKey(r) ? newIdMap.get(r) : r.getId()); 117 117 Long[] nv = versions.get(key); 118 118 if (nv != null) { 119 119 processed.add(r); 120 if (!r. deleted) {120 if (!r.isDeleted()) { 121 121 r.id = nv[0]; r.version = nv[1].intValue(); 122 122 }
Note:
See TracChangeset
for help on using the changeset viewer.