Class SketchVertex
- java.lang.Object
- 
- com.esri.arcgisruntime.mapping.view.SketchVertex
 
- 
 public final class SketchVertex extends java.lang.ObjectRepresents a point location (in map coordinates) and position (in the collections of parts, vertices and mid-vertices) of the sketch editor.If the point index is greater or equal to 0, then it's a vertex. If the insertion index is greater or equal to 0, then it's a mid-vertex. This object cannot have both point index and insertion index greater or equal to 0. Mid-vertices are not allowed for both a single point and a multi-point geometry. - Since:
- 100.3.0
- See Also:
- SketchEditor.setSelectedVertex(SketchVertex),- SketchEditor.getSelectedVertex()
 
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SketchVertexcreateMidVertex(int partIndex, int insertionIndex)Creates a SketchVertex with a part index and an insertion index, which will represent a mid-vertex.static SketchVertexcreateVertex(int partIndex, int pointIndex)Creates a SketchVertex with a part index and a point index.booleanequals(java.lang.Object obj)intgetInsertionIndex()Gets the index position of the sketch vertex in the insertion collection for the multipart geometry (e.g.intgetPartIndex()Gets the index of the part in the sketch editor's geometry at which this vertex can be found.PointgetPoint()Gets the location of the sketch vertex in map coordinates.intgetPointIndex()Gets the index position of the sketch vertex in the point collection for the multipart geometry (e.g.inthashCode()
 
- 
- 
- 
Method Detail- 
createVertexpublic static SketchVertex createVertex(int partIndex, int pointIndex) Creates a SketchVertex with a part index and a point index.- Parameters:
- partIndex- a geometry part index
- pointIndex- a point index in a geometry part
- Returns:
- a SketchVertex that represents an actual vertex (as opposed to mid-vertex)
- Throws:
- java.lang.IllegalArgumentException- if partIndex or pointIndex is negative
- Since:
- 100.3.0
 
 - 
createMidVertexpublic static SketchVertex createMidVertex(int partIndex, int insertionIndex) Creates a SketchVertex with a part index and an insertion index, which will represent a mid-vertex.- Parameters:
- partIndex- a geometry part index
- insertionIndex- an insertion index in a geometry part
- Returns:
- a SketchVertex that represents a mid-vertex
- Throws:
- java.lang.IllegalArgumentException- if partIndex or insertionIndex is negative
- Since:
- 100.3.0
 
 - 
getPointIndexpublic int getPointIndex() Gets the index position of the sketch vertex in the point collection for the multipart geometry (e.g. multiple points, polyline, polygon).A point index value of -1 with an insertion index value >= 0, indicates that vertex has not yet been committed to the multipart geometry (i.e. mid-vertex). A point index value >=0 with an insertion index value of -1, indicates that vertex has been committed to the multipart geometry (i.e. actual vertex). - Returns:
- the index position of the sketch vertex in the point collection
- Since:
- 100.3.0
 
 - 
getInsertionIndexpublic int getInsertionIndex() Gets the index position of the sketch vertex in the insertion collection for the multipart geometry (e.g. multiple points, polyline, polygon).A point index value of -1 with an insertion index value >= 0, indicates that vertex has not yet been committed to the multipart geometry (i.e. mid-vertex). A point index value >=0 with an insertion index value of -1, indicates that vertex has been committed to the multipart geometry (i.e. actual vertex). - Returns:
- the index position of the sketch vertex in the insertion collection
- Since:
- 100.3.0
 
 - 
getPartIndexpublic int getPartIndex() Gets the index of the part in the sketch editor's geometry at which this vertex can be found.- Returns:
- the index of the part the vertex is associated with
- Since:
- 100.3.0
 
 - 
getPointpublic Point getPoint() Gets the location of the sketch vertex in map coordinates. The property is returned as null until the vertex is bound to the sketch editor via selection.- Returns:
- the Point of the sketch vertex in map coordinates
- Since:
- 100.3.0
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 
- 
 
-