|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IEditSketchExtension2
Provides access to members that extend the edit sketch.
Edit sketch extensions typically work as follows:
The current edit task calls each registered edit sketch extension’s Applies function; the first one to return True becomes the active extension and its Activate method is called. Each extension performs certain tests in its
Applies method to determine if it should be activated. This typically involves checking the current task, the current target layer, and, when modifying a feature, the currently selected features. Most extensions just override the Create New Feature task and the Modify Feature task.
Once an extension has become active, it sets the geometry type of the edit sketch. The extension then optionally sets up a new feedback mechanism; this typically involves the use of one of the feedback objects, such as NewLineCircleFeedback. For example, a custom edit sketch extension may create perfect circles by allowing users to enter a center point and another point defining the radius. When a user modifies the feature, they are presented with one point instead of an entire polygon; this limits them to only changing the radius, rather than adding new vertices and creating a shape that is an imperfect circle.
Edit sketch extensions let programmers alter the edit sketch geometry,edit sketch display feedback mechanism, and pre-sketch feedback. Implement this interface along with IExtension to create a custom edit sketch extension.
ISnapEnvironment
,
IEditProperties
,
IExtension
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
IEditSketch
Method Summary | |
---|---|
void |
activate(IEditor editor)
Called when the sketch extension is about to be used. |
boolean |
applies(IEditor editor)
Indicates whether this extension applies to the current edit environment. |
void |
beforeStoreFeature(IFeature feature,
IGeometry geometry)
Lets the extension know the feature is about to be stored. |
IDisplayFeedback |
createFeedback()
Called when a new feedback is needed. |
IDisplayFeedback |
createPreSketchFeedback()
Called when a new feedback is needed before the sketch starts. |
IGeometry |
createSketchGeometry(IFeature feature)
The geometry that will be used in the sketch when modifying a feature. |
void |
deactivate()
Called when the sketch extension is no longer needed. |
int |
getSketchGeometryType()
The geometry type used for the edit sketch when creating new features. |
boolean |
isCanDeleteVertices()
Indicates whether the sketch allows the deleting of vertices. |
boolean |
isCanInsertVertices()
Indicates whether the sketch allows the inserting of additional vertices. |
boolean |
isCanMoveVertices()
Indicates whether the sketch allows the moving of vertices. |
boolean |
isHasFeedback()
Indicates whether the SketchExtension will use a custom feedback. |
boolean |
isHasPreSketchFeedback()
Indicates whether the SketchExtension will use a custom feedback before the sketch starts. |
void |
onKeyDown(int keyState,
int shift)
Called when a key is pressed. |
void |
onKeyUp(int keyState,
int shift)
Called when a key is pressed. |
void |
startFeedback(IPoint point)
Called when the feedback needs to be started. |
void |
startFeedbackFromShape(IGeometry shape)
Called when the feedback needs to be started using an existing geometry. |
void |
startPreSketchFeedback(IPoint point)
Called when the feedback needs to be started. |
IGeometry |
stopFeedback()
Called when the feedback is no longer necessary. |
void |
stopPreSketchFeedback()
Called when the feedback needs to be stopped. |
Method Detail |
---|
boolean applies(IEditor editor) throws IOException, AutomationException
The ::Applies() method is called by the controller when attempting to determine if the extension applies or not.
If more than one class is found implementing IEditSketchExtension the current tool or task will utilize the first extension which ::Applies() returns VARIANT_TRUE.
editor
- A reference to a com.esri.arcgis.editor.IEditor (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISnapEnvironment
,
IEditProperties
,
IExtension
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
IEditSketch
void activate(IEditor editor) throws IOException, AutomationException
The ::Activate() method is called by the controller when the EditSktechExtension has been applied and is being initiated for use.
This method is called only if ::Applies() returns VARIANT_TRUE.
Use this method to obtain a reference to the controller (Editor).
editor
- A reference to a com.esri.arcgis.editor.IEditor (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISnapEnvironment
,
IEditProperties
,
IExtension
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
IEditSketch
void deactivate() throws IOException, AutomationException
The ::Deactivate() method is the last method called by the controller on the extension. Use it to release any unneeded memory reference pointers which the extension may have been holding on to.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISnapEnvironment
,
IEditProperties
,
IExtension
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
IEditSketch
void beforeStoreFeature(IFeature feature, IGeometry geometry) throws IOException, AutomationException
The ::BeforeStoreFeature() method is the final call before the feature and its geometry are stored into the base table. Use this method to obtain the sketch geometry, modify it if necessary, and pass it back to the feature.
feature
- A reference to a com.esri.arcgis.geodatabase.IFeature (in)geometry
- A reference to a com.esri.arcgis.geometry.IGeometry (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISnapEnvironment
,
IEditProperties
,
IExtension
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
IEditSketch
boolean isCanInsertVertices() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISnapEnvironment
,
IEditProperties
,
IExtension
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
IEditSketch
boolean isCanDeleteVertices() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISnapEnvironment
,
IEditProperties
,
IExtension
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
IEditSketch
boolean isCanMoveVertices() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISnapEnvironment
,
IEditProperties
,
IExtension
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
IEditSketch
int getSketchGeometryType() throws IOException, AutomationException
The ::SketchGeometryType() method is used to specify the geometry type of the editsketch. Keep in mind that this can be different than the geometry type of the feature.
You may want the geometry type of the editsketch to be polygon yet ultimately store it in a featureclass of geometry type polyline.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISnapEnvironment
,
IEditProperties
,
IExtension
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
IEditSketch
IGeometry createSketchGeometry(IFeature feature) throws IOException, AutomationException
Use this method when either 1) modifying an existing feature's geometry or 2) creating a new geometry for the EditSketch to use initially.
You can start with the geometry of the feature you have been given the reference to, possibly modify it, and pass it back out -or- create a completely new geometry for intial use by the EditSketch.
This is primarily used in conjunction with the modify task.
feature
- A reference to a com.esri.arcgis.geodatabase.IFeature (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISnapEnvironment
,
IEditProperties
,
IExtension
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
IEditSketch
boolean isHasFeedback() throws IOException, AutomationException
Use this method to indicate whether the EditSketchExtension will provide the controller with a custom feedback object.
Returning a value of VARIANT_TRUE will indicate to the controller that it must call the ::CreateFeedback() method in order to create the custom feedback object to be used.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISnapEnvironment
,
IEditProperties
,
IExtension
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
IEditSketch
IDisplayFeedback createFeedback() throws IOException, AutomationException
The ::CreateFeedback() method is called by the controller to initiate the creation of a custom feedback object associated to the EditSketchExtension .
Use this method to create your feedback object and pass it out so the Editor can use it.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISnapEnvironment
,
IEditProperties
,
IExtension
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
IEditSketch
void startFeedback(IPoint point) throws IOException, AutomationException
The ::StartFeedback() method is called by the controller after the custom feedback object has been created and is ready for use.
This method passes a copy of the Editor's ::CurrentLocation() as input. This point can be used as the starting point for the DisplayFeedback.
point
- A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISnapEnvironment
,
IEditProperties
,
IExtension
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
IEditSketch
IGeometry stopFeedback() throws IOException, AutomationException
The ::StopFeedback() is called to when the feedback object is no longer needed for the operation.
Use this method to call ::Stop() on the feedback object and return the geometry of that object if necessary.
Example: If your custom feedback object is a type of INewBezierCurveFeedback calling ::Stop() will end feedback and return the geometry so it can be used as the geometry of the resulting feature.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISnapEnvironment
,
IEditProperties
,
IExtension
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
IEditSketch
void startFeedbackFromShape(IGeometry shape) throws IOException, AutomationException
The ::StartFeedbackFromShape() method is called by the controller to determine if the custom feedback object will be supplied with an initial geometry.
Example: Pass in a circular geometry and resize it via the feedback to determine a buffer zone.
shape
- A reference to a com.esri.arcgis.geometry.IGeometry (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISnapEnvironment
,
IEditProperties
,
IExtension
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
IEditSketch
boolean isHasPreSketchFeedback() throws IOException, AutomationException
Use this method to indicate whether the EditSketchExtension will provide the controller with a custom feedback object used prior to that of the Edit Sketch.
Returning a value of VARIANT_TRUE will indicate to the controller that it must call the ::CreatePreSketchFeedback() method in order to create the custom feedback object to be used.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISnapEnvironment
,
IEditProperties
,
IExtension
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
IEditSketch
IDisplayFeedback createPreSketchFeedback() throws IOException, AutomationException
The ::CreatePreSketchFeedback() method is called by the controller to initiate the creation of a custom feedback object associated to the EditSketchExtension.
This feedback object will be used prior that of the feedback object associated to the Edit Sketch.
Use this method to create your PreSketchFeedback object and pass it out so the Editor can use it.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISnapEnvironment
,
IEditProperties
,
IExtension
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
IEditSketch
void startPreSketchFeedback(IPoint point) throws IOException, AutomationException
The ::StartPreSketchFeedback() method is called by the controller after the presketch custom feedback object has been created and is ready for use.
This method passes a copy of the Editor's ::CurrentLocation() as input. This point can be used as the starting point for the DisplayFeedback.
point
- A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISnapEnvironment
,
IEditProperties
,
IExtension
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
IEditSketch
void stopPreSketchFeedback() throws IOException, AutomationException
The ::StopPreSketchFeedback() is called to when the presketch feedback object is no longer needed for the operation.
Use this method to call ::Stop() on the presketch feedback object and return the geometry of that object if necessary.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISnapEnvironment
,
IEditProperties
,
IExtension
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
IEditSketch
void onKeyDown(int keyState, int shift) throws IOException, AutomationException
Use this event to associate a hotkey to your custom sketch tool.
keyState
- The keyState (in)shift
- The shift (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISnapEnvironment
,
IEditProperties
,
IExtension
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
IEditSketch
void onKeyUp(int keyState, int shift) throws IOException, AutomationException
Use this event to associate a hotkey to your custom sketch tool.
keyState
- The keyState (in)shift
- The shift (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISnapEnvironment
,
IEditProperties
,
IExtension
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
IEditSketch
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |