Changeset 12630 in josm for trunk/src/org/openstreetmap/josm/gui/MainApplication.java
- Timestamp:
- 2017-08-24T00:15:51+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r12629 r12630 106 106 private static final List<String> COMMAND_LINE_ARGS = new ArrayList<>(); 107 107 108 /** 109 * The MapFrame. 110 */ 111 static MapFrame map; 112 108 113 private final MainFrame mainFrame; 109 114 … … 225 230 public static List<String> getCommandLineArgs() { 226 231 return Collections.unmodifiableList(COMMAND_LINE_ARGS); 232 } 233 234 /** 235 * Returns the MapFrame. 236 * <p> 237 * There should be no need to access this to access any map data. Use {@link #layerManager} instead. 238 * @return the MapFrame 239 * @see MainPanel 240 * @since 12630 (as a replacement to {@code Main.map}) 241 */ 242 public static MapFrame getMap() { 243 return map; 244 } 245 246 /** 247 * Replies true if JOSM currently displays a map view. False, if it doesn't, i.e. if 248 * it only shows the MOTD panel. 249 * <p> 250 * You do not need this when accessing the layer manager. The layer manager will be empty if no map view is shown. 251 * 252 * @return <code>true</code> if JOSM currently displays a map view 253 * @since 12630 (as a replacement to {@code Main.isDisplayingMapView()}) 254 */ 255 @SuppressWarnings("deprecation") 256 public static boolean isDisplayingMapView() { 257 return map != null && map.mapView != null; 227 258 } 228 259
Note:
See TracChangeset
for help on using the changeset viewer.