Changeset 2017 in josm for trunk/src/org/openstreetmap/josm/gui/conflict/pair
- Timestamp:
- 2009-08-30T19:07:24+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/conflict/pair
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
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 {
Note:
See TracChangeset
for help on using the changeset viewer.