Changeset 4183 in josm for trunk/src/org/openstreetmap/josm/gui/layer/Layer.java
- Timestamp:
- 2011-06-29T10:06:35+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/Layer.java
r4126 r4183 16 16 import javax.swing.Action; 17 17 import javax.swing.Icon; 18 import javax.swing.JOptionPane; 18 19 import javax.swing.JSeparator; 19 20 21 import org.openstreetmap.josm.Main; 20 22 import org.openstreetmap.josm.actions.GpxExportAction; 21 23 import org.openstreetmap.josm.actions.SaveAction; … … 75 77 static public final String NAME_PROP = Layer.class.getName() + ".name"; 76 78 77 78 79 /** keeps track of property change listeners */ 79 80 protected PropertyChangeSupport propertyChangeSupport; … … 308 309 309 310 /** 310 * 311 * Check changed status of layer 311 312 * 312 313 * @return True if layer was changed since last paint … … 314 315 public boolean isChanged() { 315 316 return true; 317 } 318 319 /** 320 * allows to check whether a projection is supported or not 321 * 322 * @return True if projection is supported for this layer 323 */ 324 public boolean isProjectionSupported(Projection proj) { 325 return true; 326 } 327 328 /** 329 * Specify user information about projections 330 * 331 * @return User readable text telling about supported projections 332 */ 333 public String nameSupportedProjections() { 334 return tr("All projections are supported"); 316 335 } 317 336 … … 370 389 @Override 371 390 public void projectionChanged(Projection oldValue, Projection newValue) { 372 // default implementation does nothing - override in subclasses 391 if(!isProjectionSupported(newValue)) { 392 JOptionPane.showMessageDialog(Main.parent, 393 tr("The layer {0} does not support the new projection {1}.\n{2}\n" 394 + "Change the projection again or remove the layer.", 395 getName(), newValue.toCode(), nameSupportedProjections()), 396 tr("Warning"), 397 JOptionPane.WARNING_MESSAGE); 398 } 373 399 } 374 400 }
Note:
See TracChangeset
for help on using the changeset viewer.