com.esri.arcgis.controls
Class IEngineEditTaskProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.controls.IEngineEditTaskProxy
All Implemented Interfaces:
IEngineEditTask, Externalizable, Serializable

public class IEngineEditTaskProxy
extends com.esri.arcgis.interop.Dispatch
implements IEngineEditTask, Serializable

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

Description

This interface is new at ArcGIS 9.3.

The purpose of the IEngineEditTask interface is to take a edit sketch geometry from IEngineEditSketch::Geometry and perform some action on 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 EngineEditor can only have one active Engine edit task at a time. Use IEngineEditor::CurrentTask to set this.

All Engine edit tasks implement the IEngineEditTask interface. An engine edit tasks must be registered in the 'ESRI Engine Edit Tasks' component category to appear in the dropdown menu provided by the ControlsEditingTaskToolControl.

Remarks

The out-of-the-box "Create New Feature" and "Modify Feature" engine edit tasks have IEngineEditTask::UniqueName properties of "ControlToolsEditing_CreateNewFeatureTask" and "ControlToolsEditing_ModifyFeatureTask" respectively.

Product Availability

Available with ArcGIS Engine.

Edit tasks written in Java cannot be registered in the Component categories, they need to be programmatically added to the EngineEditor using IEngineEditor::addTask()

See Also:
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
  IEngineEditTaskProxy()
           
  IEngineEditTaskProxy(Object obj)
           
protected IEngineEditTaskProxy(Object obj, String iid)
           
 
Method Summary
 void activate(IEngineEditor editor, IEngineEditTask oldTask)
          Notifies the task that the edit sketch is activated.
 void addListener(String iidStr, Object theListener, Object theSource)
           
 void deactivate()
          Notifies the task that the edit sketch is deactivated.
 String getGroupName()
          The group into which the edit task is placed.
 String getName()
          The name of the edit task.
 String getUniqueName()
          The unique 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

IEngineEditTaskProxy

public IEngineEditTaskProxy()

IEngineEditTaskProxy

public IEngineEditTaskProxy(Object obj)
                     throws IOException
Throws:
IOException

IEngineEditTaskProxy

protected IEngineEditTaskProxy(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.

Description

Returns the Name of an engine edit task. The Name property is used by the ControlsEditingTaskToolControl to display the edit task within a specific IEngineEditTask::GroupName.

Remarks

Note: It is possible that more than one engine edit task can be created with the same Name. It is recommended that a developer uniquely identifies an engine edit task using a specific IEngineEditTask::GroupName and Name

Product Availability

Available with ArcGIS Engine.

Specified by:
getName in interface IEngineEditTask
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getUniqueName

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

Description

Returns the UniqueName of an engine edit task.

The out-of-the-box "Create New Feature" and "Modify Feature" engine edit tasks have IEngineEditTask::UniqueName properties of "ControlToolsEditing_CreateNewFeatureTask" and "ControlToolsEditing_ModifyFeatureTask" respectively.

It is recommended that, as with the out-of-the-box tasks above, the UniqueName string is composed of two parts, the compiled DLL name and the name given to the task by the author separated by an underscore character. To set the IEngineEditor::CurrentTask loop through the edit tasks available to the EngineEditor using the IEngineEditor::TaskCount and IEngineEditor::Task. Then use the UniqueName to identify a specific edit task. Do not use the index to uniquely identify an edit task as this can change as new tasks are added to the application, and do not use the IEngineEditTask::Name as this is not necessarily unique.

Product Availability

Available with ArcGIS Engine.

Specified by:
getUniqueName in interface IEngineEditTask
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getGroupName

public String getGroupName()
                    throws IOException,
                           AutomationException
The group into which the edit task is placed.

Description

Returns the GroupName of the engine edit task. The GroupName is used by the ControlsEditingTaskToolControl command to group edit tasks under a heading (e.g. Create New Feature, Modify Feature).

A developer can set the GroupName for a new engine edit task that they create to be an existing GroupName (e.g. 'Create New Feature') or a new GroupName (e.g. 'Business Tasks'). If the developer does not set a GroupName for a new engine edit task then it will be given the default GroupName 'Other Tasks'.

Remarks

Note: It is possible that more than one engine edit task can be created with the same IEngineEditTask::Name. It is recommended that a developer uniquely identifies an engine edit task using a specific GroupName and IEngineEditTask::Name

Product Availability

Available with ArcGIS Engine.

Specified by:
getGroupName in interface IEngineEditTask
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

activate

public void activate(IEngineEditor editor,
                     IEngineEditTask oldTask)
              throws IOException,
                     AutomationException
Notifies the task that the edit sketch is activated.

Description

Activate is called when the edit task is set as the current edit task either programmatically using the IEngineEditor::CurrentTask property, or interactively by the end user selecting the edit task using the ControlsEditingTaskToolControl

Use the Activate method to reference the EngineEditor object and modify the editing environment before an edit sketch is started. For example, use the IEngineEditSketch::GeometryType property to ensure the geometry sketch is a polyline regardless of the IEngineEditLayers::CurrentLayer geometry type.

Product Availability

Available with ArcGIS Engine.

Specified by:
activate in interface IEngineEditTask
Parameters:
editor - A reference to a com.esri.arcgis.controls.IEngineEditor (in)
oldTask - A reference to a com.esri.arcgis.controls.IEngineEditTask (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deactivate

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

Description

Deactivate is called when a different edit task is set as the current edit task either programmatically using the IEngineEditor::CurrentTask property, or interactively by the end user selecting the edit task using the ControlsEditingTaskToolControl. Deactivate is also called on the IEngineEditor::CurrentTask when the IEngineEditor::StopEditing method is called, or interactively by the end user selecting the ControlsEditingStopCommand.

Use the Deactivate method to clean up any code created by the Activate method. For example, to stop listening for Engine editing events and to set objects used by the task to null.

Product Availability

Available with ArcGIS Engine.

Specified by:
deactivate in interface IEngineEditTask
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onFinishSketch

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

Description

OnFinishSketch is fired when an edit sketch created with the edit task completes either programmatically using the IEngineEditSketch::FinishSketch method, or by the end user interactively finishing the sketch.

Typically OnFinishSketch is used to start an edit operation (if necessary) and store any created or modified features.

Product Availability

Available with ArcGIS Engine.

Specified by:
onFinishSketch in interface IEngineEditTask
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onDeleteSketch

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

Description

OnDeleteSketch is fired when an edit sketch is deleted by the end user interactively calling the ControlsEditingSketchDeleteCommand or when the Delete key is pressed on the keyboard.

Use the OnDeleteSketch method to undo any steps completed during the edit sketch.

Product Availability

Available with ArcGIS Engine.

Specified by:
onDeleteSketch in interface IEngineEditTask
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.