Changeset 10454 in josm for trunk/src/org
- Timestamp:
- 2016-06-22T09:47:26+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java
r10378 r10454 347 347 348 348 /** 349 * Adds all registered listeners by this conflict resolver 350 * @see #unregisterListeners() 351 * @since 10454 352 */ 353 public void registerListeners() { 354 nodeListMerger.registerListeners(); 355 relationMemberMerger.registerListeners(); 356 } 357 358 /** 349 359 * Removes all registered listeners by this conflict resolver 350 360 */ 351 361 public void unregisterListeners() { 352 nodeListMerger.un linkAsListener();353 relationMemberMerger.un linkAsListener();362 nodeListMerger.unregisterListeners(); 363 relationMemberMerger.unregisterListeners(); 354 364 } 355 365 -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java
r10378 r10454 883 883 } 884 884 885 public void unlinkAsListener() { 886 myEntriesTable.unlinkAsListener(); 887 mergedEntriesTable.unlinkAsListener(); 888 theirEntriesTable.unlinkAsListener(); 885 /** 886 * Adds all registered listeners by this merger 887 * @see #unregisterListeners() 888 * @since 10454 889 */ 890 public void registerListeners() { 891 myEntriesTable.registerListeners(); 892 mergedEntriesTable.registerListeners(); 893 theirEntriesTable.registerListeners(); 894 } 895 896 /** 897 * Removes all registered listeners by this merger 898 * @since 10454 899 */ 900 public void unregisterListeners() { 901 myEntriesTable.unregisterListeners(); 902 mergedEntriesTable.unregisterListeners(); 903 theirEntriesTable.unregisterListeners(); 889 904 } 890 905 -
trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java
r10369 r10454 52 52 53 53 @Override 54 public void addNotify() { 55 super.addNotify(); 56 registerListeners(); 57 } 58 59 @Override 54 60 public void setVisible(boolean isVisible) { 55 61 String geom = getClass().getName() + ".geometry"; … … 62 68 new WindowGeometry(this).remember(geom); 63 69 } 64 unregisterListeners();65 70 } 66 71 super.setVisible(isVisible); … … 99 104 private void registerListeners() { 100 105 resolver.addPropertyChangeListener(applyResolutionAction); 106 resolver.registerListeners(); 101 107 } 102 108 … … 126 132 resolver.addPropertyChangeListener(this); 127 133 HelpUtil.setHelpContext(this.getRootPane(), ht("Dialog/Conflict")); 128 129 registerListeners();130 134 } 131 135 -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
r10424 r10454 756 756 selectionTableModel.unregister(); 757 757 memberTableModel.unregister(); 758 memberTable.un linkAsListener();758 memberTable.unregisterListeners(); 759 759 if (windowMenuItem != null) { 760 760 Main.main.menu.windowMenu.remove(windowMenuItem); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java
r10413 r10454 139 139 140 140 @Override 141 public void un linkAsListener() {142 super.un linkAsListener();141 public void unregisterListeners() { 142 super.unregisterListeners(); 143 143 Main.getLayerManager().removeLayerChangeListener(zoomToGap); 144 144 Main.getLayerManager().removeActiveLayerChangeListener(zoomToGap); -
trunk/src/org/openstreetmap/josm/gui/widgets/OsmPrimitivesTable.java
r10386 r10454 83 83 JPopupMenu menu = new JPopupMenu(); 84 84 zoomToAction = buildZoomToAction(); 85 Main.getLayerManager().addLayerChangeListener(zoomToAction);86 Main.getLayerManager().addActiveLayerChangeListener(zoomToAction);87 85 getSelectionModel().addListSelectionListener(zoomToAction); 88 86 menu.add(zoomToAction); … … 90 88 } 91 89 92 public void unlinkAsListener() { 90 /** 91 * Adds all registered listeners by this table 92 * @see #unregisterListeners() 93 * @since 10454 94 */ 95 public void registerListeners() { 96 Main.getLayerManager().addLayerChangeListener(zoomToAction); 97 Main.getLayerManager().addActiveLayerChangeListener(zoomToAction); 98 } 99 100 /** 101 * Removes all registered listeners by this table 102 * @since 10454 103 */ 104 public void unregisterListeners() { 93 105 Main.getLayerManager().removeLayerChangeListener(zoomToAction); 94 106 Main.getLayerManager().removeActiveLayerChangeListener(zoomToAction);
Note:
See TracChangeset
for help on using the changeset viewer.