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

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

public class AddFeature
extends EditAction

creates a new Feature on the context layer.

 AddFeature add = new AddFeature(EditUtil.toPoint(-2309712.539, -887434.291, map.getSpatialReference(), ctx));
 workspace.perform(context, add);
 
The feature may fire the following events:
  • PreFeatureStoreEvent
  • FeatureCreatedEvent
  • See Also:
    Serialized Form

    Field Summary
     
    Fields inherited from class com.esri.adf.web.ags.data.edit.EditAction
    eventListeners
     
    Constructor Summary
    AddFeature(com.esri.arcgis.geometry.IGeometry geometry)
              Instantiates an object of AddFeature.
     
    Method Summary
     void action(ActionContext context)
              Performs the action.
     com.esri.arcgis.geometry.IGeometry getGeometry()
              Gets the geometry of the new feature.
     void setGeometry(com.esri.arcgis.geometry.IGeometry geometry)
              Sets the geometry of the new feature.
     
    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

    AddFeature

    public AddFeature(com.esri.arcgis.geometry.IGeometry geometry)
    Instantiates an object of AddFeature.

    Parameters:
    geometry - the geometry to create the feature with.
    Method Detail

    getGeometry

    public com.esri.arcgis.geometry.IGeometry getGeometry()
    Gets the geometry of the new feature.

    Returns:
    Returns the geometry.

    setGeometry

    public void setGeometry(com.esri.arcgis.geometry.IGeometry geometry)
    Sets the geometry of the new feature.

    Parameters:
    geometry - The geometry 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