- Timestamp:
- 2014-10-27T23:25:38+01:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/conflict/tags
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
r7129 r7661 187 187 188 188 protected JPanel buildRelationMemberConflictResolverPanel() { 189 pnlRelationMemberConflictResolver = new RelationMemberConflictResolver( );189 pnlRelationMemberConflictResolver = new RelationMemberConflictResolver(new RelationMemberConflictResolverModel()); 190 190 return pnlRelationMemberConflictResolver; 191 191 } -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java
r6890 r7661 44 44 private AutoCompletingTextField tfValue; 45 45 private JCheckBox cbTagRelations; 46 private RelationMemberConflictResolverModel model;46 private final RelationMemberConflictResolverModel model; 47 47 private RelationMemberConflictResolverTable tblResolver; 48 48 private JMultilineLabel lblHeader; … … 59 59 gc.insets = new Insets(5,5,5,5); 60 60 add(pnl, gc); 61 model = new RelationMemberConflictResolverModel();62 61 63 62 gc.gridy = 1; … … 118 117 /** 119 118 * Constructs a new {@code RelationMemberConflictResolver}. 119 * @param model model managing a list of conflicting relation members 120 * @since 7661 120 121 */ 121 public RelationMemberConflictResolver() { 122 public RelationMemberConflictResolver(RelationMemberConflictResolverModel model) { 123 this.model = model; 122 124 build(); 123 125 } -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModel.java
r7129 r7661 31 31 32 32 /** the list of conflict decisions */ 33 pr ivateList<RelationMemberConflictDecision> decisions;33 protected final List<RelationMemberConflictDecision> decisions; 34 34 /** the collection of relations for which we manage conflicts */ 35 pr ivateCollection<Relation> relations;35 protected Collection<Relation> relations; 36 36 /** the number of conflicts */ 37 37 private int numConflicts; 38 private PropertyChangeSupport support;38 private final PropertyChangeSupport support; 39 39 40 40 /** 41 41 * Replies true if each {@link MultiValueResolutionDecision} is decided. 42 42 * 43 * @return true if each {@link MultiValueResolutionDecision} is decided; false 44 * otherwise 43 * @return true if each {@link MultiValueResolutionDecision} is decided; false otherwise 45 44 */ 46 45 public boolean isResolvedCompletely() { … … 72 71 numConflicts = count; 73 72 if (numConflicts != oldValue) { 74 support.firePropertyChange(NUM_CONFLICTS_PROP, oldValue, numConflicts); 75 } 73 support.firePropertyChange(getProperty(), oldValue, numConflicts); 74 } 75 } 76 77 protected String getProperty() { 78 return NUM_CONFLICTS_PROP; 76 79 } 77 80 … … 307 310 */ 308 311 public Set<Relation> getModifiedRelations(OsmPrimitive newPrimitive) { 309 HashSet<Relation> ret = new HashSet<>();312 Set<Relation> ret = new HashSet<>(); 310 313 for (Relation relation: relations) { 311 314 if (isChanged(relation, newPrimitive)) {
Note:
See TracChangeset
for help on using the changeset viewer.