com.esri.arcgis.editor
Class IEditTaskProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.editor.IEditTaskProxy
All Implemented Interfaces:
IEditTask, Externalizable, Serializable

public class IEditTaskProxy
extends com.esri.arcgis.interop.Dispatch
implements IEditTask, Serializable

Provides access to a task that receives notification when the sketch is complete.

Remarks

You can find and set an edit task either by using the Name property in conjunction with IEdtior::TaskCount and IEditor::Task or by IEditTaskSearch

When To Use

The purpose of the IEditTask interface is to take a geometry (the edit sketch) from IEditSketch::Geometry and perform some action with it. Each edit task performs a different operation with this geometry. For example, the CreateNewFeature edit task takes the edit sketch and stores it as a new feature. The Reshape Feature edit task uses the edit sketch to reshape a selected feature. The editor can only have one active edit task at a time, use IEditor::CurrentTask to set this.
All edit tasks implement the IEditTask interface. Edit tasks must be registered in the ESRI Edit Tasks component category to appear in the Edit Task dropdown menu on the Editor toolbar.

Product Availability

Available with ArcGIS Desktop.

See Also:
IEditAttributeProperties, IEditSketch, Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  IEditTaskProxy()
           
  IEditTaskProxy(Object obj)
           
protected IEditTaskProxy(Object obj, String iid)
           
 
Method Summary
 void activate(IEditor editor, IEditTask oldTask)
          Called by the editor when the task becomes active.
 void addListener(String iidStr, Object theListener, Object theSource)
           
 void deactivate()
          Called by the editor when the task becomes inactive.
 String getName()
          The name of the edit task.
 void onDeleteSketch()
          Notifies the task that the edit sketch has been deleted.
 void onFinishSketch()
          Notifies the task that the edit sketch is complete.
 void removeListener(String iidStr, Object theListener)
           
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

IEditTaskProxy

public IEditTaskProxy()

IEditTaskProxy

public IEditTaskProxy(Object obj)
               throws IOException
Throws:
IOException

IEditTaskProxy

protected IEditTaskProxy(Object obj,
                         String iid)
                  throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

getName

public String getName()
               throws IOException,
                      AutomationException
The name of the edit task.

Remarks

The Name property is usually used with IEdtior::TaskCount and IEditor::Task to change the editor's current task. It is not a good idea to set an edit task via its index as this may change and is likely different for different users.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getName in interface IEditTask
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IExtension, IEditTask, ISketchTool, esriSketchConstraint, IEditSketch

activate

public void activate(IEditor editor,
                     IEditTask oldTask)
              throws IOException,
                     AutomationException
Called by the editor when the task becomes active.

Remarks

Activate is called each time the editor's current task is changed. This gives you the ability initialize variables, namely set a reference to the passed in Editor object, and modify the editing environment before work starts with an edit task. For example, you may want the edit sketch to be of type Polyline regardless of what the current layer geometry type is. By default the edit sketch has a geometry type equal to that of the current layer, override this by changing the editor's geometry type in Activate.
 


Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
activate in interface IEditTask
Parameters:
editor - A reference to a com.esri.arcgis.editor.IEditor (in)
oldTask - A reference to a com.esri.arcgis.editor.IEditTask (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IExtension, IEditAttributeProperties, IEditSketch

deactivate

public void deactivate()
                throws IOException,
                       AutomationException
Called by the editor when the task becomes inactive.

Remarks

Deactivate is the last method called when a edit task completes, use it to perform code clean-up.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
deactivate in interface IEditTask
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IExtension, IEditTask, IEditSketch

onFinishSketch

public void onFinishSketch()
                    throws IOException,
                           AutomationException
Notifies the task that the edit sketch is complete.

Remarks

Control passes to OnFinishSketch after IEditSketch::FinishSketch is called. When implementing IEditTask to create your own edit task, the bulk of code is typically written here. This is where you should start an edit operation if necessary and store any created or modified features.
If you need to get a reference to IApplication use IEditor::Parent; a reference to the Editor object itself should be set in Activate.
 


Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
onFinishSketch in interface IEditTask
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IExtension, IEditTask, IEditSketch

onDeleteSketch

public void onDeleteSketch()
                    throws IOException,
                           AutomationException
Notifies the task that the edit sketch has been deleted.

Remarks

OnDeleteSketch gives an edit task an opportunity to clean up any steps that were already completed. For example, if you had added any SketchOperation to the operation stack you may want to remove them.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
onDeleteSketch in interface IEditTask
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IExtension, IEditTask, IEditSketch