Ignore:
Timestamp:
2013-03-22T22:18:26+01:00 (13 years ago)
Author:
zverik
Message:

ImageryID refactoring and javadocs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/imagery_offset_db/src/iodb/DeprecateOffsetAction.java

    r29381 r29384  
    1212
    1313/**
    14  * Download a list of imagery offsets for the current position, let user choose which one to use.
     14 * A context-dependent action to deprecate an offset.
    1515 *
    16  * @author zverik
     16 * @author Zverik
     17 * @license WTFPL
    1718 */
    1819public class DeprecateOffsetAction extends AbstractAction {
     
    2021    private QuerySuccessListener listener;
    2122   
     23    /**
     24     * Initialize an action with an offset object.
     25     */
    2226    public DeprecateOffsetAction( ImageryOffsetBase offset ) {
    2327        super(tr("Deprecate Offset"));
     
    2731    }
    2832
     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     */
    2939    public void actionPerformed(ActionEvent e) {
    3040        if( Main.map == null || Main.map.mapView == null || !Main.map.isVisible() )
     
    4151    }
    4252
     53    /**
     54     * Installs a listener to process successful deprecation event.
     55     */
    4356    public void setListener( QuerySuccessListener listener ) {
    4457        this.listener = listener;
    4558    }
    4659
     60    /**
     61     * Deprecate the given offset.
     62     * @see #deprecateOffset(iodb.ImageryOffsetBase, iodb.QuerySuccessListener)
     63     */
    4764    public static void deprecateOffset( ImageryOffsetBase offset ) {
    4865        deprecateOffset(offset, null);
    4966    }
    5067
     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     */
    5172    public static void deprecateOffset( ImageryOffsetBase offset, QuerySuccessListener listener ) {
    5273        String userName = JosmUserIdentityManager.getInstance().getUserName();
Note: See TracChangeset for help on using the changeset viewer.