com.esri.adf.web.ags.data.edit.action
Class MoveVertex

java.lang.Object
  extended by com.esri.adf.web.ags.data.edit.EditAction
      extended by com.esri.adf.web.ags.data.edit.action.MoveVertex
All Implemented Interfaces:
Serializable

public class MoveVertex
extends EditAction

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:
  • PreFeatureStoreEvent
  • FeatureChangedEvent
  • See Also:
    Serialized Form

    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

    MoveVertex

    public MoveVertex(com.esri.arcgis.geometry.ILine line)
    Instantiates an object of MoveVertex.

    Parameters:
    line - move a vertex from the start point to the end point.
    Method Detail

    getLine

    public 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.

    Returns:
    Returns the line.

    setLine

    public 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.

    Parameters:
    line - The line to set.

    getSearchTolerance

    public int getSearchTolerance()
    Gets the search tolerance in pixels.

    Returns:
    Returns the searchTolerance.

    setSearchTolerance

    public void setSearchTolerance(int searchTolerance)
    Sets the search tolerance in pixels.

    Parameters:
    searchTolerance - The searchTolerance to set.

    action

    public void action(ActionContext context)
                throws Exception
    Description copied from class: EditAction
    Performs the action.

    Specified by:
    action in class EditAction
    Parameters:
    context - the action context.
    Throws:
    Exception