Changeset 2305 in josm for trunk/src/org/openstreetmap/josm/actions/JosmAction.java
- Timestamp:
- 2009-10-24T21:22:49+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/JosmAction.java
r2260 r2305 13 13 import org.openstreetmap.josm.data.osm.DataSet; 14 14 import org.openstreetmap.josm.data.osm.OsmPrimitive; 15 import org.openstreetmap.josm.data.osm.PrimitiveDeepCopy; 15 16 import org.openstreetmap.josm.gui.layer.Layer; 16 17 import org.openstreetmap.josm.gui.layer.OsmDataLayer; … … 22 23 /** 23 24 * Base class helper for all Actions in JOSM. Just to make the life easier. 24 * 25 * 25 26 * A JosmAction is a {@see LayerChangeListener} and a {@see SelectionChangedListener}. Upon 26 27 * a layer change event or a selection change event it invokes {@see #updateEnabled()}. … … 28 29 * of a JosmAction depending on the {@see #getCurrentDataSet()} and the current layers 29 30 * (see also {@see #getEditLayer()}). 30 * 31 * 31 32 * destroy() from interface Destroyable is called e.g. for MapModes, when the last layer has 32 33 * been removed and so the mapframe will be destroyed. For other JosmActions, destroy() may never … … 105 106 * needs to be overridden to be useful 106 107 */ 107 public void pasteBufferChanged( DataSetnewPasteBuffer) {108 public void pasteBufferChanged(PrimitiveDeepCopy newPasteBuffer) { 108 109 return; 109 110 } … … 126 127 /** 127 128 * Replies the current edit layer 128 * 129 * 129 130 * @return the current edit layer. null, if no edit layer exists 130 131 */ … … 135 136 /** 136 137 * Replies the current dataset 137 * 138 * 138 139 * @return the current dataset. null, if no current dataset exists 139 140 */ … … 155 156 * Override in subclasses to init the enabled state of an action when it is 156 157 * created. Default behaviour is to call {@see #updateEnabledState()} 157 * 158 * 158 159 * @see #updateEnabledState() 159 160 * @see #updateEnabledState(Collection) … … 166 167 * Override in subclasses to update the enabled state of the action when 167 168 * something in the JOSM state changes, i.e. when a layer is removed or added. 168 * 169 * 169 170 * See {@see #updateEnabledState(Collection)} to respond to changes in the collection 170 171 * of selected primitives. 171 * 172 * 172 173 * Default behavior is empty. 173 * 174 * 174 175 * @see #updateEnabledState(Collection) 175 176 * @see #initEnabledState() … … 183 184 * new selection. Avoid calling getCurrentDataSet().getSelected() because this 184 185 * loops over the complete data set. 185 * 186 * 186 187 * @param selection the collection of selected primitives 187 * 188 * 188 189 * @see #updateEnabledState() 189 190 * @see #initEnabledState()
Note:
See TracChangeset
for help on using the changeset viewer.