Changeset 10634 in josm for trunk/src/org
- Timestamp:
- 2016-07-25T09:15:56+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
r10601 r10634 58 58 new ImageProvider(icon).setOptional(true).getInBackground((ImageResource result) -> { 59 59 if (result != null) { 60 GuiHelper.runInEDT(() -> result.attachImageIcon( AddImageryLayerAction.this));60 GuiHelper.runInEDT(() -> result.attachImageIcon(this)); 61 61 } 62 62 }); -
trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java
r10608 r10634 362 362 */ 363 363 public Iterable<Collection<WayPoint>> getLinesIterable(final boolean[] trackVisibility) { 364 return () -> new LinesIterator( GpxData.this, trackVisibility);364 return () -> new LinesIterator(this, trackVisibility); 365 365 } 366 366 -
trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
r10611 r10634 632 632 public String formatAsHtmlUnorderedList(Collection<? extends OsmPrimitive> primitives, int maxElements) { 633 633 final Collection<String> displayNames = Utils.transform(primitives, 634 (Function<OsmPrimitive, String>) x -> x.getDisplayName( DefaultNameFormatter.this));634 (Function<OsmPrimitive, String>) x -> x.getDisplayName(this)); 635 635 return Utils.joinAsHtmlUnorderedList(Utils.limit(displayNames, maxElements, "...")); 636 636 } -
trunk/src/org/openstreetmap/josm/gui/GettingStarted.java
r10627 r10634 143 143 content = new MotdContent().updateIfRequiredString(); 144 144 contentInitialized = true; 145 ProxyPreference.removeProxyPreferenceListener( GettingStarted.this);145 ProxyPreference.removeProxyPreferenceListener(this); 146 146 } catch (IOException ex) { 147 147 Main.warn(ex, tr("Failed to read MOTD. Exception was: {0}", ex.toString())); … … 149 149 + "</h1>\n<h2 align=\"center\">(" + tr("Message of the day not available") + ")</h2></html>"; 150 150 // In case of MOTD not loaded because of proxy error, listen to preference changes to retry after update 151 ProxyPreference.addProxyPreferenceListener( GettingStarted.this);151 ProxyPreference.addProxyPreferenceListener(this); 152 152 } 153 153 } -
trunk/src/org/openstreetmap/josm/gui/MapView.java
r10627 r10634 572 572 } 573 573 574 for (JComponent c : getMapNavigationComponents( MapView.this)) {574 for (JComponent c : getMapNavigationComponents(this)) { 575 575 add(c); 576 576 } -
trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
r10611 r10634 88 88 MapCSSStyleSource.STYLE_SOURCE_LOCK.readLock().lock(); 89 89 try { 90 return !MapPaintStyles.getStyles().get(prim, getDist100Pixel(), NavigatableComponent.this).isEmpty();90 return !MapPaintStyles.getStyles().get(prim, getDist100Pixel(), this).isEmpty(); 91 91 } finally { 92 92 MapCSSStyleSource.STYLE_SOURCE_LOCK.readLock().unlock(); -
trunk/src/org/openstreetmap/josm/gui/ScrollViewport.java
r10611 r10634 68 68 private final List<JButton> buttons = new ArrayList<>(); 69 69 70 private final Timer timer = new Timer(100, evt -> ScrollViewport.this.scroll());70 private final Timer timer = new Timer(100, evt -> scroll()); 71 71 72 72 private int scrollDirection = NO_SCROLL; -
trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java
r10611 r10634 113 113 Bookmark b = bookmarks.getSelectedValue(); 114 114 if (b != null && gui != null) { 115 gui.boundingBoxChanged(b.getArea(), BookmarkSelection.this);115 gui.boundingBoxChanged(b.getArea(), this); 116 116 } 117 117 }); -
trunk/src/org/openstreetmap/josm/gui/history/VersionTable.java
r10611 r10634 92 92 }); 93 93 getModel().addTableModelListener(e -> { 94 adjustColumnWidth( VersionTable.this, 0, 0);95 adjustColumnWidth( VersionTable.this, 1, -8);96 adjustColumnWidth( VersionTable.this, 2, -8);97 adjustColumnWidth( VersionTable.this, 3, 0);98 adjustColumnWidth( VersionTable.this, 4, 0);94 adjustColumnWidth(this, 0, 0); 95 adjustColumnWidth(this, 1, -8); 96 adjustColumnWidth(this, 2, -8); 97 adjustColumnWidth(this, 3, 0); 98 adjustColumnWidth(this, 4, 0); 99 99 }); 100 100 } -
trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
r10626 r10634 675 675 676 676 event.getMapView().addMouseListener(adapter); 677 MapView.addZoomChangeListener( AbstractTileSourceLayer.this);677 MapView.addZoomChangeListener(this); 678 678 679 679 if (this instanceof NativeScaleLayer) { -
trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
r10611 r10634 75 75 return getTileSourceStatic(info, () -> { 76 76 Main.debug("Attribution loaded, running loadAllErrorTiles"); 77 TMSLayer.this.loadAllErrorTiles(false);77 this.loadAllErrorTiles(false); 78 78 }); 79 79 } -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r10627 r10634 434 434 if (selected.equals(data.get(i))) { 435 435 currentPhoto = i; 436 ImageViewerDialog.showImage( GeoImageLayer.this, data.get(i));436 ImageViewerDialog.showImage(this, data.get(i)); 437 437 break; 438 438 } … … 889 889 890 890 Main.getLayerManager().addActiveLayerChangeListener(e -> { 891 if (Main.getLayerManager().getActiveLayer() == GeoImageLayer.this) {891 if (Main.getLayerManager().getActiveLayer() == this) { 892 892 // only in select mode it is possible to click the images 893 893 Main.map.selectSelectTool(false); -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/MapImage.java
r10611 r10634 100 100 .setOptional(true) 101 101 .getInBackground((ImageCallback) result -> { 102 synchronized ( MapImage.this) {102 synchronized (this) { 103 103 if (result == null) { 104 104 source.logWarning(tr("Failed to locate image ''{0}''", name)); -
trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
r10626 r10634 1720 1720 tab.getTabPane().addChangeListener(e -> { 1721 1721 if (tab.getTabPane().getSelectedComponent() == component) { 1722 SourceEditor.this.initiallyLoadAvailableSources();1722 initiallyLoadAvailableSources(); 1723 1723 } 1724 1724 }); -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java
r10611 r10634 90 90 if ((incomingData.startsWith("<html>") || incomingData.startsWith("<HTML>")) 91 91 && (incomingData.endsWith("</html>") || incomingData.endsWith("</HTML>"))) { 92 GuiHelper.notifyUserHtmlError( AddWMSLayerPanel.this, title, message, incomingData);92 GuiHelper.notifyUserHtmlError(this, title, message, incomingData); 93 93 } else { 94 94 if (ex3.getMessage() != null) { -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/CommonSettingsPanel.java
r10611 r10634 57 57 JColorChooser chooser = new JColorChooser(btnFadeColor.getBackground()); 58 58 int answer = JOptionPane.showConfirmDialog( 59 CommonSettingsPanel.this, chooser,59 this, chooser, 60 60 tr("Choose a color for {0}", tr("imagery fade")), 61 61 JOptionPane.OK_CANCEL_OPTION, -
trunk/src/org/openstreetmap/josm/gui/progress/PleaseWaitProgressMonitor.java
r10611 r10634 166 166 public void doBeginTask() { 167 167 doInEDT(() -> { 168 Main.currentProgressMonitor = PleaseWaitProgressMonitor.this;168 Main.currentProgressMonitor = this; 169 169 if (GraphicsEnvironment.isHeadless()) { 170 170 return; … … 296 296 doInEDT(() -> { 297 297 if (dialog != null) { 298 dialog.setInBackgroundPossible( PleaseWaitProgressMonitor.this.taskId != null && Main.isDisplayingMapView());298 dialog.setInBackgroundPossible(taskId != null && Main.isDisplayingMapView()); 299 299 reset(); 300 300 getDialog(); … … 308 308 doInEDT(() -> { 309 309 if (dialog != null) { 310 dialog.setInBackgroundPossible( PleaseWaitProgressMonitor.this.taskId != null && Main.isDisplayingMapView());310 dialog.setInBackgroundPossible(taskId != null && Main.isDisplayingMapView()); 311 311 } 312 312 }); -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java
r10611 r10634 206 206 imgProv.getInBackground((ImageResourceCallback) result -> { 207 207 if (result != null) { 208 GuiHelper.runInEDT(() -> result.attachImageIcon( TaggingPreset.this));208 GuiHelper.runInEDT(() -> result.attachImageIcon(this)); 209 209 } else { 210 Main.warn( TaggingPreset.this+ ": " + PRESET_ICON_ERROR_MSG_PREFIX + iconName);210 Main.warn(toString() + ": " + PRESET_ICON_ERROR_MSG_PREFIX + iconName); 211 211 } 212 212 });
Note:
See TracChangeset
for help on using the changeset viewer.