|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.interop.Dispatch com.esri.arcgis.editor.IEditSketchProxy
public class IEditSketchProxy
Provides access to members that access and manipulate the edit sketch.
The IEditSketch interface is on the Editor CoClass.
Edit tasks set the geometry type of the edit sketch, and the sketch tools add points to that geometry. For example, the Create New Feature task sets the edit sketch geometry type to be the same as the geometry type of the target layer. In contrast, the Select Features Using a Line task always sets the edit sketch geometry type to esriGeometryPolyline, with no regard to the current layer geometry type.
Edit tasks often set the edit sketch geometry to esriGeometryNull, causing the sketch tools to become inactive. For example, the Reshape task will set the edit sketch geometry to esriGeometryNull if there are no polygon or polyline features selected. This prevents users from creating an edit sketch that would otherwise do nothing. Edit tasks respond to editor events such as OnSelectionChanged and OnCurrentLayerChanged to accomplish this.
The purpose of the IEditSketch interface is to manage a geometry that will be used extensively by the editor. Ultimately, the editor's current task takes the geometry to perform some action; for example, the CreateNewFeature task takes the geometry and stores it in the database as a new feature.
The editor automatically creates a new empty geometry. The type of geometry created is the same as the editor's current layer (IEditor::CurrentLayer ). Use the AddPoint method to build (add data to) the edit sketch geometry and FinishSketch to signal the current task that the geometry is ready for use. To bring an existing feature into the edit sketch, set the Geometry property to the desired feature and call RefreshSketch .
ISnapEnvironment
,
IEditProperties
,
IFeatureClass.getShapeType()
,
IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask)
,
IEditor
,
IGeometry
,
IEditLayers
,
IEditTask.deactivate()
,
IEditAttributeProperties
,
IEditEvents2
,
IEditTask.onFinishSketch()
,
IDatasetEdit
,
IDatasetEditInfo
,
IEditTask.onDeleteSketch()
,
IEditTask.getName()
,
IEditEvents
,
Editor
,
esriGeometryType
,
IEditSketch
,
Serialized FormField Summary | |
---|---|
boolean |
noncastable
|
Fields inherited from class com.esri.arcgis.interop.Dispatch |
---|
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef |
Constructor Summary | |
---|---|
|
IEditSketchProxy()
|
|
IEditSketchProxy(Object obj)
|
protected |
IEditSketchProxy(Object obj,
String iid)
|
Method Summary | |
---|---|
void |
addListener(String iidStr,
Object theListener,
Object theSource)
|
void |
addPoint(IPoint point,
boolean allowUndo)
Adds a point to the edit sketch. |
void |
finishSketch()
Completes the current edit sketch. |
void |
finishSketchPart()
Completes a part for the current edit sketch. |
IGeometry |
getGeometry()
Geometry stored in the edit sketch. |
int |
getGeometryType()
Type of the geometry stored in the edit sketch. |
IPoint |
getLastPoint()
The last point in the edit sketch. |
int |
getPart()
The index of the current part of the sketch. |
int |
getSegment()
The index of the current segment of the sketch. |
int |
getVertex()
The index of the current vertex of the sketch. |
void |
modifySketch()
Call to notify listeners that the sketch has been changed. |
void |
refreshSketch()
Invalidates the portion of the display that is occupied by the sketch. |
void |
removeListener(String iidStr,
Object theListener)
|
void |
setGeometryByRef(IGeometry geometry)
Geometry stored in the edit sketch. |
void |
setGeometryType(int geomType)
Type of the geometry stored in the edit sketch. |
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 |
---|
public boolean noncastable
Constructor Detail |
---|
public IEditSketchProxy()
public IEditSketchProxy(Object obj) throws IOException
IOException
protected IEditSketchProxy(Object obj, String iid) throws IOException
IOException
Method Detail |
---|
public void addListener(String iidStr, Object theListener, Object theSource) throws IOException
addListener
in class com.esri.arcgis.interop.Dispatch
IOException
public void removeListener(String iidStr, Object theListener) throws IOException
removeListener
in class com.esri.arcgis.interop.Dispatch
IOException
public int getPart() throws IOException, AutomationException
You must right-click on the desired part of the edit sketch to set this property correctly. The wrong part index will be returned if you do not right-click on the desired part beforehand. For example, if an edit sketch has two parts, Part will always return a 0 (all sketches have at least one part) until you right click on the second part.
getPart
in interface IEditSketch
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IEditSketch.getSegment()
,
IEditSketch.getVertex()
public int getSegment() throws IOException, AutomationException
You must right-click on the desired segment in the edit sketch to set this property correctly. The wrong segment index will be returned if you do not right-click on the desired segment beforehand. A value of -1 indicates no segment has been selected. For example, if your last right-click was on an edit sketch vertex, the Segment property will return a value of -1.
getSegment
in interface IEditSketch
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IEditSketch.getVertex()
,
IEditSketch.getPart()
public int getVertex() throws IOException, AutomationException
You must right-click on the desired vertex in the edit sketch to set this property correctly. The wrong vertex index will be returned if you do not right-click on the desired vertex beforehand. A value of -1 means no vertex has been selected. For example, if your last right-click was on a segment in the edit sketch, the Vertex property will be set to -1.
Use Part, Segment and Vertex when creating custom commands for the sketch context menu. For example, to delete a vertex in the edit sketch, right-click on the vertex to retrieve its index and call IPointCollection::RemovePoints .
getVertex
in interface IEditSketch
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IEditSketch.getSegment()
,
IEditSketch.getPart()
public int getGeometryType() throws IOException, AutomationException
getGeometryType
in interface IEditSketch
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setGeometryType(int geomType) throws IOException, AutomationException
setGeometryType
in interface IEditSketch
geomType
- A com.esri.arcgis.geometry.esriGeometryType constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IGeometry getGeometry() throws IOException, AutomationException
getGeometry
in interface IEditSketch
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setGeometryByRef(IGeometry geometry) throws IOException, AutomationException
setGeometryByRef
in interface IEditSketch
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.public void addPoint(IPoint point, boolean allowUndo) throws IOException, AutomationException
addPoint
in interface IEditSketch
point
- A reference to a com.esri.arcgis.geometry.IPoint (in)allowUndo
- The allowUndo (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void refreshSketch() throws IOException, AutomationException
refreshSketch
in interface IEditSketch
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void finishSketch() throws IOException, AutomationException
finishSketch
in interface IEditSketch
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void finishSketchPart() throws IOException, AutomationException
finishSketchPart
in interface IEditSketch
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPoint getLastPoint() throws IOException, AutomationException
getLastPoint
in interface IEditSketch
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void modifySketch() throws IOException, AutomationException
modifySketch
in interface IEditSketch
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 |