|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.esri.adf.web.ags.data.edit.EditAction
com.esri.adf.web.ags.data.edit.action.MoveVertex
public class MoveVertex
Changes the shape of a feature by moving a vertex.
SelectByExtent select = new SelectByExtent(EditUtil.toEnvelope(-2309712.539, -887434.291, -1023725.086, 411499.344, map
.getSpatialReference(), ctx));
select.setMaxCount(1);
workspace.perform(context, select);
IFeatureCursor cur = EditUtil.getSelection(context.getLayer(), context.getLayerDescription(), ctx);
IFeature feature = cur.nextFeature();
IGeometry geom = feature.getShape();
IPointCollection pointColl = new IPointCollectionProxy(geom);
IPoint p1 = pointColl.getPoint(0);
MoveVertex move = new MoveVertex(EditUtil.toLine(p1.getX(), p1.getY(), p2.getX(), p2.getY(),
geom.getSpatialReference(), ctx));
workspace.perform(context, move);
The feature may fire the following events:
| Field Summary |
|---|
| Fields inherited from class com.esri.adf.web.ags.data.edit.EditAction |
|---|
eventListeners |
| Constructor Summary | |
|---|---|
MoveVertex(com.esri.arcgis.geometry.ILine line)
Instantiates an object of MoveVertex. |
|
| Method Summary | |
|---|---|
void |
action(ActionContext context)
Performs the action. |
com.esri.arcgis.geometry.ILine |
getLine()
Searches the vertex at the start point of the line, and move it the end point of the line. |
int |
getSearchTolerance()
Gets the search tolerance in pixels. |
void |
setLine(com.esri.arcgis.geometry.ILine line)
Searches the vertex at the start point of the line, and move it the end point of the line. |
void |
setSearchTolerance(int searchTolerance)
Sets the search tolerance in pixels. |
| Methods inherited from class com.esri.adf.web.ags.data.edit.EditAction |
|---|
addEventListener, fireEvent, isEnabled, isSessionAware, removeEventListener, setEnabled, setSessionAware |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MoveVertex(com.esri.arcgis.geometry.ILine line)
line - move a vertex from the start point to the end point.| Method Detail |
|---|
public com.esri.arcgis.geometry.ILine getLine()
public void setLine(com.esri.arcgis.geometry.ILine line)
line - The line to set.public int getSearchTolerance()
public void setSearchTolerance(int searchTolerance)
searchTolerance - The searchTolerance to set.
public void action(ActionContext context)
throws java.lang.Exception
EditAction
action in class EditActioncontext - the action context.
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||