com.esri.arcgis.editor
Class FeatureInspector

java.lang.Object
  extended by com.esri.arcgis.editor.FeatureInspector
All Implemented Interfaces:
IConnectionPointContainer, IExtendedObjectInspector, IObjectInspector, IObjectInspectorPanel, IObjectClassEvents, com.esri.arcgis.interop.RemoteObjRef, Serializable, EventListener

public class FeatureInspector
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IObjectInspector, IExtendedObjectInspector, IObjectInspectorPanel, IConnectionPointContainer, IObjectClassEvents

Default feature inspector for the Editor.

Remarks

This CoClass represents the default property inspector associated with the Editor. It has been made CoCreateable so that customized feature inspectors can incorporate it.

To create your own custom property inspector for a specific feature class, implement the IFeatureInspector interface. For example, you may want to have a custom Property Inspector that displays the area and perimeter of selected polygons or one that displays an image relating to the selected feature.

To create your own custom property inspector for features in a specific feature class, implement the IObjectInspector and IClassExtension interfaces, then add your extensionís GUID to the EXTCLSID field for that feature class in the GDB_ObjectClasses table. When the user opens the Attributes dialog box, it will display the custom inspector instead of the default inspector.
Instantiate a new FeatureInspector when you want to incorporate the default Property Inspector with your custom one.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

See Also:
ISnapEnvironment, 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

Constructor Summary
FeatureInspector()
          Constructs a FeatureInspector using ArcGIS Engine.
FeatureInspector(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
FeatureInspector theFeatureInspector = (FeatureInspector) obj;
 
Method Summary
 void addISelectionEventsListener(ISelectionEvents theListener)
          addISelectionEventsListener.
 void clear()
          Clear the inspector before inspecting another object.
 void copy(IRow srcRow)
          Copies the values from srcRow to the row being edited.
 void enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
          enumConnectionPoints
 boolean equals(Object o)
          Compare this object with another
 void findConnectionPoint(GUID riid, IConnectionPoint[] ppCP)
          findConnectionPoint
static String getClsid()
          getClsid.
 IField getField(int index)
          Attribute field by index.
 int getFieldCount()
          The number of attribute fields displayed.
 int getHWND()
          The window handle for the inspector.
 IEnumRow getRows()
          The row or rows being inspected.
 int getSelectedField()
          The index of the selected field, or -1.
 ITable getTable()
          The table being edited.
 int hashCode()
          the hashcode for this object
 void inspect(IEnumRow objects, IEditor editor)
          Inspects the properties of the features.
 boolean isDisableEditOperations()
          Indicates if the object inspector is under a non-versioned editing model and to not start or stop edit operations as an edit operation is currently in effect.
 void onChange(IObjectClassEventsOnChangeEvent theEvent)
          This event is fired when an object's attributes or geometry is updated.
 void onCreate(IObjectClassEventsOnCreateEvent theEvent)
          This event is fired when a new object is created in the object class.
 void onDelete(IObjectClassEventsOnDeleteEvent theEvent)
          This event is fired when an object is deleted from the object class.
 void removeISelectionEventsListener(ISelectionEvents theListener)
          removeISelectionEventsListener.
 void setDisableEditOperations(boolean pDisableEditOperations)
          Indicates if the object inspector is under a non-versioned editing model and to not start or stop edit operations as an edit operation is currently in effect.
 void setSelectedField(int index)
          The index of the selected field, or -1.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

FeatureInspector

public FeatureInspector()
                 throws IOException,
                        UnknownHostException
Constructs a FeatureInspector using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

FeatureInspector

public FeatureInspector(Object obj)
                 throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
FeatureInspector theFeatureInspector = (FeatureInspector) obj;

Construct a FeatureInspector using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to FeatureInspector.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

addISelectionEventsListener

public void addISelectionEventsListener(ISelectionEvents theListener)
                                 throws IOException
addISelectionEventsListener. Listen to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.carto.ISelectionEvents interface.
Throws:
IOException - If there are communications problems.

removeISelectionEventsListener

public void removeISelectionEventsListener(ISelectionEvents theListener)
                                    throws IOException
removeISelectionEventsListener. Stop listening to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.carto.ISelectionEvents interface.
Throws:
IOException - If there are communications problems.

getHWND

public int getHWND()
            throws IOException,
                   AutomationException
The window handle for the inspector.

Remarks

The Object Inpector reads this property to determine what it will display in its right pane. Custom Object Inspectors must supply the hWnd property of the window or control that is going to be displayed.



Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getHWND in interface IObjectInspector
Returns:
The hWND (A COM typedef)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

inspect

public void inspect(IEnumRow objects,
                    IEditor editor)
             throws IOException,
                    AutomationException
Inspects the properties of the features.

Remarks

Use the Inspect method to display your custom Feature Inspector.

The Inspect method provides you with an enumeration of row objects to inspect as well as a pointer to the Editor extension. Use the row enumeration to retrieve properties of a feature. Then you can use the Editor object reference to modify properties of a row within the context of an edit operation.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
inspect in interface IObjectInspector
Parameters:
objects - A reference to a com.esri.arcgis.editor.IEnumRow (in)
editor - A reference to a com.esri.arcgis.editor.IEditor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clear

public void clear()
           throws IOException,
                  AutomationException
Clear the inspector before inspecting another object.

Remarks

Use the Clear property to reset your custom Feature Inspector control(s). The Clear property is called prior to updating the Inspect property with a new row enumeration.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
clear in interface IObjectInspector
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

copy

public void copy(IRow srcRow)
          throws IOException,
                 AutomationException
Copies the values from srcRow to the row being edited.

Remarks

Use the Copy property to get rows that have been copied using the context menu in the tree control of the Attributes Dialog located on the Editor Toolbar.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
copy in interface IObjectInspector
Parameters:
srcRow - A reference to a com.esri.arcgis.geodatabase.IRow (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDisableEditOperations

public boolean isDisableEditOperations()
                                throws IOException,
                                       AutomationException
Indicates if the object inspector is under a non-versioned editing model and to not start or stop edit operations as an edit operation is currently in effect.

Product Availability

Available with ArcGIS Desktop.

Specified by:
isDisableEditOperations in interface IExtendedObjectInspector
Returns:
The pDisableEditOperations
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDisableEditOperations

public void setDisableEditOperations(boolean pDisableEditOperations)
                              throws IOException,
                                     AutomationException
Indicates if the object inspector is under a non-versioned editing model and to not start or stop edit operations as an edit operation is currently in effect.

Product Availability

Available with ArcGIS Desktop.

Specified by:
setDisableEditOperations in interface IExtendedObjectInspector
Parameters:
pDisableEditOperations - The pDisableEditOperations (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTable

public ITable getTable()
                throws IOException,
                       AutomationException
The table being edited.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getTable in interface IObjectInspectorPanel
Returns:
A reference to a com.esri.arcgis.geodatabase.ITable
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRows

public IEnumRow getRows()
                 throws IOException,
                        AutomationException
The row or rows being inspected.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getRows in interface IObjectInspectorPanel
Returns:
A reference to a com.esri.arcgis.editor.IEnumRow
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFieldCount

public int getFieldCount()
                  throws IOException,
                         AutomationException
The number of attribute fields displayed.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getFieldCount in interface IObjectInspectorPanel
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getField

public IField getField(int index)
                throws IOException,
                       AutomationException
Attribute field by index.

Product Availability

Available with ArcGIS Desktop.

Specified by:
getField in interface IObjectInspectorPanel
Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IField
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSelectedField

public int getSelectedField()
                     throws IOException,
                            AutomationException
The index of the selected field, or -1.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getSelectedField in interface IObjectInspectorPanel
Returns:
The index
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSelectedField

public void setSelectedField(int index)
                      throws IOException,
                             AutomationException
The index of the selected field, or -1.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setSelectedField in interface IObjectInspectorPanel
Parameters:
index - The index (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

enumConnectionPoints

public void enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
                          throws IOException,
                                 AutomationException
enumConnectionPoints

Description

IConnectionPointContainer is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
enumConnectionPoints in interface IConnectionPointContainer
Parameters:
ppEnum - A reference to a com.esri.arcgis.display.IEnumConnectionPoints (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findConnectionPoint

public void findConnectionPoint(GUID riid,
                                IConnectionPoint[] ppCP)
                         throws IOException,
                                AutomationException
findConnectionPoint

Description

IConnectionPointContainer is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
findConnectionPoint in interface IConnectionPointContainer
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
ppCP - A reference to a com.esri.arcgis.display.IConnectionPoint (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onCreate

public void onCreate(IObjectClassEventsOnCreateEvent theEvent)
              throws IOException,
                     AutomationException
This event is fired when a new object is created in the object class.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
onCreate in interface IObjectClassEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onDelete

public void onDelete(IObjectClassEventsOnDeleteEvent theEvent)
              throws IOException,
                     AutomationException
This event is fired when an object is deleted from the object class.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
onDelete in interface IObjectClassEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onChange

public void onChange(IObjectClassEventsOnChangeEvent theEvent)
              throws IOException,
                     AutomationException
This event is fired when an object's attributes or geometry is updated.

Remarks

In the event that a feature should be deleted due to an OnChange event, it is not recommended that the event handler delete the feature itself. Instead, an exception should be thrown to the application, where it can be made responsible for deleting the feature.

The OnChange event is not fired during a Topology Validation for performance reasons as a large number of features may be changed during a Validate. In addition, features may be changed many times.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
onChange in interface IObjectClassEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.