Changeset 29384 in osm for applications/editors/josm/plugins/imagery_offset_db/src/iodb/DeprecateOffsetAction.java
- Timestamp:
- 2013-03-22T22:18:26+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/imagery_offset_db/src/iodb/DeprecateOffsetAction.java
r29381 r29384 12 12 13 13 /** 14 * Download a list of imageryoffsets for the current position, let user choose which one to use.14 * A context-dependent action to deprecate an offset. 15 15 * 16 * @author zverik 16 * @author Zverik 17 * @license WTFPL 17 18 */ 18 19 public class DeprecateOffsetAction extends AbstractAction { … … 20 21 private QuerySuccessListener listener; 21 22 23 /** 24 * Initialize an action with an offset object. 25 */ 22 26 public DeprecateOffsetAction( ImageryOffsetBase offset ) { 23 27 super(tr("Deprecate Offset")); … … 27 31 } 28 32 33 /** 34 * Asks a user if they really want to deprecate an offset (since this 35 * action is virtually irreversible) and calls 36 * {@link #deprecateOffset(iodb.ImageryOffsetBase, iodb.QuerySuccessListener)} 37 * on a positive answer. 38 */ 29 39 public void actionPerformed(ActionEvent e) { 30 40 if( Main.map == null || Main.map.mapView == null || !Main.map.isVisible() ) … … 41 51 } 42 52 53 /** 54 * Installs a listener to process successful deprecation event. 55 */ 43 56 public void setListener( QuerySuccessListener listener ) { 44 57 this.listener = listener; 45 58 } 46 59 60 /** 61 * Deprecate the given offset. 62 * @see #deprecateOffset(iodb.ImageryOffsetBase, iodb.QuerySuccessListener) 63 */ 47 64 public static void deprecateOffset( ImageryOffsetBase offset ) { 48 65 deprecateOffset(offset, null); 49 66 } 50 67 68 /** 69 * Deprecate the given offset and call listener on success. Asks user the reason 70 * and executes {@link SimpleOffsetQueryTask} with a query to deprecate the offset. 71 */ 51 72 public static void deprecateOffset( ImageryOffsetBase offset, QuerySuccessListener listener ) { 52 73 String userName = JosmUserIdentityManager.getInstance().getUserName();
Note:
See TracChangeset
for help on using the changeset viewer.
