com.esri.arcgis.editor
Class IEditLayersProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.editor.IEditLayersProxy
All Implemented Interfaces:
IEditLayers, Externalizable, Serializable

public class IEditLayersProxy
extends com.esri.arcgis.interop.Dispatch
implements IEditLayers, Serializable

Provides access to members that control information about layers in the edit session.

Remarks

The IEditLayers interface is used to access information about layers involved in an edit session. For example, use IEditLayers to determine if a particular layer involved in an edit session is editable or not; in addition,
use IEditLayers to check or set the editor’s current layer and current subtype.

The current layer (or target layer) determines which layer will receive newly created features. Edit tasks and commands that create new features use this property to determine to which layer to write out the new features.

When To Use

The IEditLayers interface exposes members for setting and getting the editor's current layer and current subtype. The current layer (or target layer) determines which layer will contain newly created features. For instance, if you set the target layer to 'Buildings', any new features created will be part of the Buildings layer. Edit tasks and commands that create new features use this property to determine which layer to write out the new features to. For example, the 'Create New Features' task and the 'Union' command both create new features in the target layer.

Product Availability

Available with ArcGIS Desktop.

See Also:
ISnapEnvironment, IFeatureLayer, IEditProperties, IEditTask.activate(com.esri.arcgis.editor.IEditor, com.esri.arcgis.editor.IEditTask), IEditor, IEditLayers, IEditTask.deactivate(), IEditAttributeProperties, IEditEvents2, IEditTask.onFinishSketch(), IDatasetEdit, IDatasetEditInfo, IEditTask.onDeleteSketch(), IEditTask.getName(), IEditEvents, Editor, IEditSketch, Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  IEditLayersProxy()
           
  IEditLayersProxy(Object obj)
           
protected IEditLayersProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 IFeatureLayer getCurrentLayer()
          Indicates the editor's target layer which new features are added to.
 int getCurrentSubtype()
          The sub type for new features in the CurrentLayer.
 boolean isEditable(IFeatureLayer layer)
          Determines if a specific feature layer is editable.
 void removeListener(String iidStr, Object theListener)
           
 void setCurrentLayer(IFeatureLayer layer, int subtype)
          The editor's target layer and subtype for new features.
 
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

noncastable

public boolean noncastable
Constructor Detail

IEditLayersProxy

public IEditLayersProxy()

IEditLayersProxy

public IEditLayersProxy(Object obj)
                 throws IOException
Throws:
IOException

IEditLayersProxy

protected IEditLayersProxy(Object obj,
                           String iid)
                    throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

setCurrentLayer

public void setCurrentLayer(IFeatureLayer layer,
                            int subtype)
                     throws IOException,
                            AutomationException
The editor's target layer and subtype for new features.

Remarks

Use this method to set the editor's current layer. Use the CurrentLayer property to check the current layer. The current layer is the layer that new features are typically written to. For example, the CreateNewFeature Task, the Buffer command, and the CopyParallel command all create new features and store them in the current layer. Custom tools and tasks do not have to model this behavior. All layers that return TRUE for IsEditable, are editable simulataneously. To edit features in a particular layer, you do not have to call the SetCurrentLayer method for that layer.

If you want to set the current layer to a layer that does not have subtypes, use a zero for the required subtype index parameter.

Each time this property is set, a new empty geometry is automatically created in the Editor object and is accessable through IEditSketch::Geometry. The type of geometry created is equal to that of the layer. This default behavior is easily overrideable by setting IEditSketch::Geometry manually; this does not affect the CurrentLayer property.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setCurrentLayer in interface IEditLayers
Parameters:
layer - A reference to a com.esri.arcgis.carto.IFeatureLayer (in)
subtype - The subtype (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCurrentLayer

public IFeatureLayer getCurrentLayer()
                              throws IOException,
                                     AutomationException
Indicates the editor's target layer which new features are added to.

Remarks

Use this property to check the editor's current layer. Use the SetCurrentLayer property to set the current layer. The current layer is the layer that new features are typically written to. For example, the CreateNewFeature Task, the Buffer command, and the CopyParallel command all create new features and store them in the current layer. Custom tools and tasks do not have to model this behavior. All layers that return TRUE for IsEditable, are editable simulataneously. To edit features in a particular layer, you do not have to call SetCurrentLayer method for that layer.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getCurrentLayer in interface IEditLayers
Returns:
A reference to a com.esri.arcgis.carto.IFeatureLayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCurrentSubtype

public int getCurrentSubtype()
                      throws IOException,
                             AutomationException
The sub type for new features in the CurrentLayer.

Remarks

Returns the current subtype code for the current layer. If the CurrentLayer does not have subtypes, 0 is returned.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getCurrentSubtype in interface IEditLayers
Returns:
The typeCode
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isEditable

public boolean isEditable(IFeatureLayer layer)
                   throws IOException,
                          AutomationException
Determines if a specific feature layer is editable.

Remarks

Use the IsEditable method to check if a particular layer is editable. For example, when the editor is started, it calls this method for each layer added to the Map. The layers that are editable are added to the editing environment.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
isEditable in interface IEditLayers
Parameters:
layer - A reference to a com.esri.arcgis.carto.IFeatureLayer (in)
Returns:
The pEditable
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.