Ignore:
Timestamp:
2009-10-24T21:22:49+02:00 (15 years ago)
Author:
jttt
Message:

Use PrimitiveData for Copy, Paste and Paste tags actions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/JosmAction.java

    r2260 r2305  
    1313import org.openstreetmap.josm.data.osm.DataSet;
    1414import org.openstreetmap.josm.data.osm.OsmPrimitive;
     15import org.openstreetmap.josm.data.osm.PrimitiveDeepCopy;
    1516import org.openstreetmap.josm.gui.layer.Layer;
    1617import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     
    2223/**
    2324 * Base class helper for all Actions in JOSM. Just to make the life easier.
    24  * 
     25 *
    2526 * A JosmAction is a {@see LayerChangeListener} and a {@see SelectionChangedListener}. Upon
    2627 * a layer change event or a selection change event it invokes {@see #updateEnabled()}.
     
    2829 * of a JosmAction depending on the {@see #getCurrentDataSet()} and the current layers
    2930 * (see also {@see #getEditLayer()}).
    30  * 
     31 *
    3132 * destroy() from interface Destroyable is called e.g. for MapModes, when the last layer has
    3233 * been removed and so the mapframe will be destroyed. For other JosmActions, destroy() may never
     
    105106     * needs to be overridden to be useful
    106107     */
    107     public void pasteBufferChanged(DataSet newPasteBuffer) {
     108    public void pasteBufferChanged(PrimitiveDeepCopy newPasteBuffer) {
    108109        return;
    109110    }
     
    126127    /**
    127128     * Replies the current edit layer
    128      * 
     129     *
    129130     * @return the current edit layer. null, if no edit layer exists
    130131     */
     
    135136    /**
    136137     * Replies the current dataset
    137      * 
     138     *
    138139     * @return the current dataset. null, if no current dataset exists
    139140     */
     
    155156     * Override in subclasses to init the enabled state of an action when it is
    156157     * created. Default behaviour is to call {@see #updateEnabledState()}
    157      * 
     158     *
    158159     * @see #updateEnabledState()
    159160     * @see #updateEnabledState(Collection)
     
    166167     * Override in subclasses to update the enabled state of the action when
    167168     * something in the JOSM state changes, i.e. when a layer is removed or added.
    168      * 
     169     *
    169170     * See {@see #updateEnabledState(Collection)} to respond to changes in the collection
    170171     * of selected primitives.
    171      * 
     172     *
    172173     * Default behavior is empty.
    173      * 
     174     *
    174175     * @see #updateEnabledState(Collection)
    175176     * @see #initEnabledState()
     
    183184     * new selection. Avoid calling getCurrentDataSet().getSelected() because this
    184185     * loops over the complete data set.
    185      * 
     186     *
    186187     * @param selection the collection of selected primitives
    187      * 
     188     *
    188189     * @see #updateEnabledState()
    189190     * @see #initEnabledState()
Note: See TracChangeset for help on using the changeset viewer.