Changeset 7801 in josm for trunk/src/org
- Timestamp:
- 2014-12-13T01:07:04+01:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r7678 r7801 983 983 dialog.setVisible(true); 984 984 switch(dialog.getUserAction()) { 985 case CANCEL: return false;986 985 case PROCEED: return true; 986 case CANCEL: 987 987 default: return false; 988 988 } -
trunk/src/org/openstreetmap/josm/corrector/ReverseWayNoTagCorrector.java
r6524 r7801 29 29 // Hide default constructor for utils classes 30 30 } 31 31 32 32 /** 33 33 * Tags that imply a semantic meaning from the way direction and cannot be changed. … … 45 45 new Tag("waterway", "canal") 46 46 })); 47 47 48 48 /** 49 49 * Replies the tags that imply a semantic meaning from <code>way</code> direction and cannot be changed. … … 54 54 return directionalTags.intersect(TagCollection.from(way)); 55 55 } 56 56 57 57 /** 58 58 * Tests whether way can be reversed without semantic change. … … 64 64 return getDirectionalTags(way).isEmpty(); 65 65 } 66 66 67 67 protected static String getHTML(TagCollection tags) { 68 68 if (tags.size() == 1) { … … 74 74 } 75 75 } 76 76 77 77 protected static boolean confirmReverseWay(Way way, TagCollection tags) { 78 78 String msg = trn( … … 100 100 ); 101 101 switch(ret) { 102 case ConditionalOptionPaneUtil.DIALOG_DISABLED_OPTION : return true; 103 case JOptionPane.YES_OPTION: return true; 104 default: return false; 102 case ConditionalOptionPaneUtil.DIALOG_DISABLED_OPTION: 103 case JOptionPane.YES_OPTION: 104 return true; 105 default: 106 return false; 105 107 } 106 108 } 107 109 108 110 /** 109 111 * Checks the given way can be safely reversed and asks user to confirm the operation if it not the case. -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r7752 r7801 1458 1458 private final int to; 1459 1459 private final List<StyleRecord> output; 1460 private final DataSet data;1461 1460 1462 1461 private final ElemStyles styles = MapPaintStyles.getStyles(); … … 1472 1471 * @param to last index + 1 1473 1472 * @param output the list of styles to which styles will be added 1474 * @param data the data set1475 1473 */ 1476 public ComputeStyleListWorker(final List<? extends OsmPrimitive> input, int from, int to, List<StyleRecord> output , DataSet data) {1474 public ComputeStyleListWorker(final List<? extends OsmPrimitive> input, int from, int to, List<StyleRecord> output) { 1477 1475 this.input = input; 1478 1476 this.from = from; 1479 1477 this.to = to; 1480 1478 this.output = output; 1481 this.data = data;1482 1479 this.styles.setDrawMultipolygon(drawMultipolygon); 1483 1480 } … … 1595 1592 int to = Math.min((i+1)*bucketsize, prims.size()); 1596 1593 List<StyleRecord> target = singleThread ? allStyleElems : new ArrayList<StyleRecord>(to - from); 1597 tasks.add(new ComputeStyleListWorker(prims, from, to, target , data));1594 tasks.add(new ComputeStyleListWorker(prims, from, to, target)); 1598 1595 } 1599 1596 if (singleThread) { -
trunk/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java
r7779 r7801 126 126 * @return true if the parameter is a valid domain name 127 127 */ 128 @Override 128 129 public boolean isValid(String domain) { 129 130 String[] groups = domainRegex.match(domain); -
trunk/src/org/openstreetmap/josm/data/validation/routines/InetAddressValidator.java
r7489 r7801 55 55 * @return true if the string validates as an IP address 56 56 */ 57 @Override 57 58 public boolean isValid(String inetAddress) { 58 59 return isValidInet4Address(inetAddress); -
trunk/src/org/openstreetmap/josm/data/validation/routines/RegexValidator.java
r7489 r7801 123 123 * otherwise <code>false</code>. 124 124 */ 125 @Override 125 126 public boolean isValid(String value) { 126 127 if (value == null) { -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java
r7751 r7801 35 35 36 36 /** 37 * const uctor37 * constructor 38 38 */ 39 39 public MultiValueResolutionDecision() { … … 148 148 case KEEP_ONE: return value; 149 149 case SUM_ALL_NUMERIC: return tags.getSummedValues(getKey()); 150 case KEEP_NONE: return null;151 150 case KEEP_ALL: return tags.getJoinedValues(getKey()); 151 case KEEP_NONE: 152 152 default: return null; 153 153 } … … 308 308 case KEEP_ONE: return new Tag(getKey(),value); 309 309 case KEEP_NONE: return new Tag(getKey(), ""); 310 case UNDECIDED: return null;310 case UNDECIDED: 311 311 default: return null; 312 312 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
r7742 r7801 664 664 ); 665 665 switch(ret) { 666 case ConditionalOptionPaneUtil.DIALOG_DISABLED_OPTION: return; 667 case JOptionPane.CLOSED_OPTION: return; 668 case JOptionPane.NO_OPTION: return; 666 case ConditionalOptionPaneUtil.DIALOG_DISABLED_OPTION: 667 case JOptionPane.CLOSED_OPTION: 668 case JOptionPane.NO_OPTION: 669 return; 669 670 case JOptionPane.YES_OPTION: 670 671 memberTableModel.removeMembersReferringTo(toCheck); … … 714 715 ); 715 716 switch(ret) { 716 case ConditionalOptionPaneUtil.DIALOG_DISABLED_OPTION : return true; 717 case JOptionPane.YES_OPTION: return true; 718 case JOptionPane.NO_OPTION: return false; 719 case JOptionPane.CLOSED_OPTION: return false; 720 case JOptionPane.CANCEL_OPTION: throw new AddAbortException(); 717 case ConditionalOptionPaneUtil.DIALOG_DISABLED_OPTION: 718 case JOptionPane.YES_OPTION: 719 return true; 720 case JOptionPane.NO_OPTION: 721 case JOptionPane.CLOSED_OPTION: 722 return false; 723 case JOptionPane.CANCEL_OPTION: 724 throw new AddAbortException(); 721 725 } 722 726 // should not happen … … 1581 1585 ); 1582 1586 switch(ret) { 1583 case JOptionPane.YES_OPTION: return true; 1584 case ConditionalOptionPaneUtil.DIALOG_DISABLED_OPTION: return true; 1587 case JOptionPane.YES_OPTION: 1588 case ConditionalOptionPaneUtil.DIALOG_DISABLED_OPTION: 1589 return true; 1585 1590 default: 1586 1591 return false; -
trunk/src/org/openstreetmap/josm/gui/history/TagInfoViewer.java
r6207 r7801 17 17 public class TagInfoViewer extends HistoryViewerPanel { 18 18 19 @Override 19 20 protected JTable buildReferenceTable() { 20 21 JTable table = new JTable( … … 28 29 } 29 30 31 @Override 30 32 protected JTable buildCurrentTable() { 31 33 JTable table = new JTable( -
trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java
r7712 r7801 252 252 switch(strategy) { 253 253 case INDIVIDUAL_OBJECTS_STRATEGY: 254 spec.setStrategy(strategy);255 break;256 254 case SINGLE_REQUEST_STRATEGY: 257 255 spec.setStrategy(strategy); -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
r7509 r7801 414 414 * @return {@code true} if all conditions apply, false otherwise. 415 415 */ 416 @Override 416 417 public boolean matches(Environment env) { 417 418 if (conds == null) return true; -
trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlCondition.java
r6890 r7801 4 4 import org.openstreetmap.josm.data.osm.OsmUtils; 5 5 6 public class XmlCondition 7 { 6 public class XmlCondition { 7 8 8 public String key; 9 9 public String value; … … 33 33 } 34 34 35 @Override 35 36 public String toString() { 36 37 return "Rule["+key+","+(boolValue != null ? "b="+boolValue:"v="+value)+"]"; -
trunk/src/org/openstreetmap/josm/gui/widgets/EditableList.java
r7005 r7801 2 2 package org.openstreetmap.josm.gui.widgets; 3 3 4 import org.openstreetmap.josm.Main; 5 import org.openstreetmap.josm.tools.GBC; 4 import static org.openstreetmap.josm.tools.I18n.tr; 6 5 7 import javax.swing.DefaultListModel;8 import javax.swing.JButton;9 import javax.swing.JList;10 import javax.swing.JOptionPane;11 import javax.swing.JPanel;12 import javax.swing.JScrollPane;13 6 import java.awt.BorderLayout; 14 7 import java.awt.Dimension; … … 19 12 import java.util.List; 20 13 21 import static org.openstreetmap.josm.tools.I18n.tr; 14 import javax.swing.DefaultListModel; 15 import javax.swing.JButton; 16 import javax.swing.JList; 17 import javax.swing.JOptionPane; 18 import javax.swing.JPanel; 19 import javax.swing.JScrollPane; 20 21 import org.openstreetmap.josm.Main; 22 import org.openstreetmap.josm.tools.GBC; 22 23 23 24 /** … … 138 139 } 139 140 141 @Override 140 142 public void setEnabled(boolean enabled) { 141 143 sourcesList.setEnabled(enabled); -
trunk/src/org/openstreetmap/josm/io/GpxReader.java
r7575 r7801 405 405 break; 406 406 case "time": 407 currentWayPoint.put(localName, accumulator.toString());408 currentWayPoint.setTime();409 break;410 407 case "cmt": 411 408 case "desc": -
trunk/src/org/openstreetmap/josm/io/OsmChangesetContentParser.java
r7082 r7801 84 84 data.put(currentPrimitive, currentModificationType); 85 85 break; 86 case "osmChange":87 // do nothing88 break;89 86 case "create": 90 currentModificationType = null;91 break;92 87 case "modify": 93 currentModificationType = null;94 break;95 88 case "delete": 96 89 currentModificationType = null; 97 90 break; 91 case "osmChange": 98 92 case "tag": 99 93 case "nd": -
trunk/src/org/openstreetmap/josm/io/remotecontrol/DNSName.java
r7592 r7801 101 101 * Return the type of the GeneralName. 102 102 */ 103 @Override 103 104 public int getType() { 104 105 return GeneralNameInterface.NAME_DNS; … … 119 120 * @exception IOException on encoding errors. 120 121 */ 122 @Override 121 123 public void encode(DerOutputStream out) throws IOException { 122 124 out.putIA5String(name); -
trunk/src/org/openstreetmap/josm/tools/Diff.java
r7005 r7801 912 912 && equivs[start] == equivs[end] 913 913 && !other_changed[1+j] 914 && end != i_end915 914 && !((preceding >= 0 && start == preceding) 916 915 || (other_preceding >= 0
Note:
See TracChangeset
for help on using the changeset viewer.