Changeset 32690 in osm for applications/editors/josm/plugins/mapillary
- Timestamp:
- 2016-07-21T13:46:14+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryPlugin.java
r32652 r32690 262 262 } 263 263 if (!SwingUtilities.isEventDispatchThread()) { 264 SwingUtilities.invokeLater(new Runnable() { 265 @Override 266 public void run() { 267 setMenuEnabled(menu, value); 268 } 269 }); 264 SwingUtilities.invokeLater(() -> setMenuEnabled(menu, value)); 270 265 } else { 271 266 menu.setEnabled(value); -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/WalkThread.java
r32593 r32690 156 156 this.interrupt(); 157 157 } else { 158 SwingUtilities.invokeLater(new Runnable() { 159 @Override 160 public void run() { 161 stopWalk(); 162 } 163 }); 158 SwingUtilities.invokeLater(() -> stopWalk()); 164 159 } 165 160 } … … 174 169 MapillaryMainDialog.getInstance().setMode(MapillaryMainDialog.MODE.NORMAL); 175 170 } else { 176 SwingUtilities.invokeLater(new Runnable() { 177 @Override 178 public void run() { 179 end(); 180 } 181 }); 171 SwingUtilities.invokeLater(() -> end()); 182 172 } 183 173 } -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryChangesetDialog.java
r32631 r32690 140 140 public void changesetChanged() { 141 141 if (!SwingUtilities.isEventDispatchThread()) { 142 SwingUtilities.invokeLater( 143 new Runnable() { 144 @Override 145 public void run() { 146 buildTree(); 147 } 148 } 149 ); 142 SwingUtilities.invokeLater(() -> buildTree()); 150 143 } else { 151 144 buildTree(); -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryHistoryDialog.java
r32653 r32690 173 173 public void recordChanged() { 174 174 if (!SwingUtilities.isEventDispatchThread()) { 175 SwingUtilities.invokeLater(new Runnable() { 176 @Override 177 public void run() { 178 recordChanged(); 179 } 180 }); 175 SwingUtilities.invokeLater(() -> recordChanged()); 181 176 } else { 182 177 buildTree(); -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryMainDialog.java
r32653 r32690 190 190 public synchronized void updateImage(boolean fullQuality) { 191 191 if (!SwingUtilities.isEventDispatchThread()) { 192 SwingUtilities.invokeLater(new Runnable() { 193 @Override 194 public void run() { 195 updateImage(); 196 } 197 }); 192 SwingUtilities.invokeLater(() -> updateImage()); 198 193 } else { 199 194 if (!MapillaryLayer.hasInstance()) { … … 298 293 public synchronized void updateTitle() { 299 294 if (!SwingUtilities.isEventDispatchThread()) { 300 SwingUtilities.invokeLater(new Runnable() { 301 @Override 302 public void run() { 303 updateTitle(); 304 } 305 }); 295 SwingUtilities.invokeLater(() -> updateTitle()); 306 296 } else if (this.image != null) { 307 297 StringBuilder title = new StringBuilder(tr(BASE_TITLE)); … … 519 509 */ 520 510 @Override 521 public void loadingFinished(final CacheEntry data, 522 final CacheEntryAttributes attributes, final LoadResult result) { 511 public void loadingFinished(final CacheEntry data, final CacheEntryAttributes attributes, final LoadResult result) { 523 512 if (!SwingUtilities.isEventDispatchThread()) { 524 SwingUtilities.invokeLater(new Runnable() { 525 @Override 526 public void run() { 527 loadingFinished(data, attributes, result); 528 } 529 }); 513 SwingUtilities.invokeLater(() -> loadingFinished(data, attributes, result)); 530 514 } else if (data != null && result == LoadResult.SUCCESS) { 531 515 try { … … 535 519 } 536 520 if ( 537 this.mapillaryImageDisplay.getImage() == null538 539 521 mapillaryImageDisplay.getImage() == null 522 || img.getHeight() > this.mapillaryImageDisplay.getImage().getHeight() 523 ) { 540 524 this.mapillaryImageDisplay.setImage(img); 541 525 } -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryPreferenceSetting.java
r32653 r32690 125 125 } 126 126 127 new Thread(new Runnable() { 128 @Override 129 public void run() { 130 String username = MapillaryUser.getUsername(); 131 if (username != null) { 132 SwingUtilities.invokeLater(new Runnable() { 133 @Override 134 public void run() { 135 onLogin(MapillaryUser.getUsername()); 136 } 137 }); 138 } 127 new Thread(() -> { 128 String username = MapillaryUser.getUsername(); 129 if (username != null) { 130 SwingUtilities.invokeLater(() -> onLogin(MapillaryUser.getUsername())); 139 131 } 140 132 }).start(); -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillaryDownloader.java
r32658 r32690 237 237 I18n.tr("The downloaded OSM area is too big. Download mode has been changed to semiautomatic until the layer is restarted.")); 238 238 } else { 239 SwingUtilities.invokeLater( new Runnable() { 240 @Override 241 public void run() { 242 tooBigErrorDialog(); 243 } 244 }); 239 SwingUtilities.invokeLater(() -> tooBigErrorDialog()); 245 240 } 246 241 } -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/MapillaryUtils.java
r32659 r32690 197 197 public static void showPictures(final Set<MapillaryAbstractImage> images, final boolean select) { 198 198 if (!SwingUtilities.isEventDispatchThread()) { 199 SwingUtilities.invokeLater(new Runnable() { 200 @Override 201 public void run() { 202 showPictures(images, select); 203 } 204 }); 199 SwingUtilities.invokeLater(() -> showPictures(images, select)); 205 200 } else { 206 201 Bounds zoomBounds; -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/PluginState.java
r32658 r32690 111 111 dlg.setVisible(true); 112 112 } else { 113 SwingUtilities.invokeLater(new Runnable() { 114 @Override 115 public void run() { 116 finishedUploadDialog(); 117 } 118 }); 113 SwingUtilities.invokeLater(() -> finishedUploadDialog()); 119 114 } 120 115 }
Note:
See TracChangeset
for help on using the changeset viewer.