|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IEngineSketchOperation
Provides access to members that control undo/redo capabilities for edit sketch modifications.
This interface is new at ArcGIS 9.3.
Use sketch operations to provide undo and redo capabilities when making modifications to the engine edit sketch. For example, if you wanted to insert a new point in the middle of the edit sketch, create a sketch operation so the edit can be undone. IEngineSketchOperation derives from IOperation giving these additional methods: CanRedo, CanUndo, Do, Redo, Undo. When undoing a sketch operation use either the IEngineSketchOperation::Undo method or the IOperationStack::Undo method available from the IToolbarControl::OperationStack property. Do not mix these 2 approaches.
Engine sketch operations are very similar to engine edit operations. First, call the Start method to flag the beginning of the sketch operation. Use the MenuString property to give the operation a name. Perform the edits. Call Finish to complete the sketch operation.
The Finish method allows tools to give more information about what they modified; typically, the edited sketch point is passed back to clients listening to engine editor events (IEngineEditEvents). For example, if a point is deleted from an edit sketch and IEngineSketchOperation::Finish is used to complete the operation, the deleted point is passed to the clients responding to IEngineEditEvents::OnVertexDeleted.
Method Summary | |
---|---|
void |
finish(IEnvelope invalEnv,
int opType,
Object data)
Finishes the sketch operation and puts it into the operation stack. |
void |
setMenuString(String menuString)
Sets the text that appears in the undo menu choice. |
void |
start(IEngineEditor editor)
Starts the sketch operation and caches the existing sketch. |
Methods inherited from interface com.esri.arcgis.systemUI.IOperation |
---|
esri_do, getMenuString, isCanRedo, isCanUndo, redo, undo |
Method Detail |
---|
void setMenuString(String menuString) throws IOException, AutomationException
menuString
- The menuString (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void start(IEngineEditor editor) throws IOException, AutomationException
Modifications made to an edit sketch should be contained between calls to Start and Finish. Start caches the edit sketch's geometry in case the sketch operation is undone; when this occurs, the modified geometry is replaced by the cached geometry.
editor
- A reference to a com.esri.arcgis.controls.IEngineEditor (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void finish(IEnvelope invalEnv, int opType, Object data) throws IOException, AutomationException
The Finish method completes the sketch operation and adds the sketch operation to the top of the operations stack. The method allows tools to give more information about what they modified using the following parameters; InvalEnv, OpType and Data.
InvalEnv determines the envelope that will be invalidated (refreshed) when the sketch operation is completed. OpType determines which method on IEngineEditSketch will be fired to notify all listeners that the edit sketch has changed and give them appropriate information as to how the edit sketch was modified. Data is a variant value that can pass an IPoint as an argument to the appropriate method on IEngineEditSketch, such as OnVertexAdded.
invalEnv
- A reference to a com.esri.arcgis.geometry.IEnvelope (in)opType
- A com.esri.arcgis.controls.esriEngineSketchOperationType constant (in)data
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |