com.esri.arcgis.editor
Class EditSelectionCache

java.lang.Object
  extended by com.esri.arcgis.editor.EditSelectionCache
All Implemented Interfaces:
IEditEvents, IEditSelectionCache, IEditSelectionCache2, IEditSelectionCache3, com.esri.arcgis.interop.RemoteObjRef, Serializable, EventListener

public class EditSelectionCache
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IEditSelectionCache, IEditSelectionCache2, IEditSelectionCache3, IEditEvents

Caches the selection for fast hit testing.

Remarks

The EditSelectionCache object creates an off-screen bitmap representing the map's selection. The bitmap is used by clients to very quickly determine if the mouse is overtop of a selected feature. For example, the Edit tool cursor changes when the mouse is moved over the selection.

Instantiate a new EditSelectionCache object each time you want to check whether the mouse is over the selection.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

See Also:
Serialized Form

Constructor Summary
EditSelectionCache()
          Constructs a EditSelectionCache using ArcGIS Engine.
EditSelectionCache(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
EditSelectionCache theEditSelectionCache = (EditSelectionCache) obj;
 
Method Summary
 void afterDrawSketch(IEditEventsAfterDrawSketchEvent theEvent)
          Called after the edit sketch is drawn.
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 int hashCode()
          the hashcode for this object
 boolean hitTest(IPoint loc)
          Tests if the location is over the selection or not.
 void initialize(IEditor editor, int sizePixels)
          Initializes the cache using the editor's selection.
 void initialize(IEditor editor, int sizePixels, boolean blockTopoFeatures)
          Initializes the cache using the editor's selection.
 void initialize(IEditor editor, int sizePixels, boolean blockTopoFeatures, boolean annoOnly)
          Initializes the cache using the editor's selection.
 void onChangeFeature(IEditEventsOnChangeFeatureEvent theEvent)
          Called when features are modified.
 void onConflictsDetected(IEditEventsOnConflictsDetectedEvent theEvent)
          Called when editing conflicts are detected during save.
 void onCreateFeature(IEditEventsOnCreateFeatureEvent theEvent)
          Called when new features are created.
 void onCurrentLayerChanged(IEditEventsOnCurrentLayerChangedEvent theEvent)
          Called when the current layer changes.
 void onCurrentTaskChanged(IEditEventsOnCurrentTaskChangedEvent theEvent)
          Called when the current task changes.
 void onDeleteFeature(IEditEventsOnDeleteFeatureEvent theEvent)
          Called when features are deleted.
 void onRedo(IEditEventsOnRedoEvent theEvent)
          Called when RedoOperation is called.
 void onSelectionChanged(IEditEventsOnSelectionChangedEvent theEvent)
          Called when the selection changes.
 void onSketchFinished(IEditEventsOnSketchFinishedEvent theEvent)
          Called when the edit sketch is finished.
 void onSketchModified(IEditEventsOnSketchModifiedEvent theEvent)
          Called when the edit sketch is modified.
 void onStartEditing(IEditEventsOnStartEditingEvent theEvent)
          Called when editing begins.
 void onStopEditing(IEditEventsOnStopEditingEvent theEvent)
          Called when editing ends.
 void onUndo(IEditEventsOnUndoEvent theEvent)
          Called when UndoOperation is called.
 
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

EditSelectionCache

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

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

EditSelectionCache

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

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

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

initialize

public void initialize(IEditor editor,
                       int sizePixels)
                throws IOException,
                       AutomationException
Initializes the cache using the editor's selection.

Remarks

Use Initialize to fill the cache with features from the editor's current selection. When the editor's selection changes you will need to rebuild the cache. Pixels determines the height and width of the cache.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

hitTest

public boolean hitTest(IPoint loc)
                throws IOException,
                       AutomationException
Tests if the location is over the selection or not.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
hitTest in interface IEditSelectionCache
Specified by:
hitTest in interface IEditSelectionCache2
Specified by:
hitTest in interface IEditSelectionCache3
Parameters:
loc - A reference to a com.esri.arcgis.geometry.IPoint (in)
Returns:
The hit
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

initialize

public void initialize(IEditor editor,
                       int sizePixels,
                       boolean blockTopoFeatures)
                throws IOException,
                       AutomationException
Initializes the cache using the editor's selection.

Remarks

At ArcGIS 8.3 and later versions, the BlockTopoFeatures argument will always be evaluated as True. This is a result of the restructuring of the underlying mechanism for working with topological primitives.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
initialize in interface IEditSelectionCache2
Parameters:
editor - A reference to a com.esri.arcgis.editor.IEditor (in)
sizePixels - The sizePixels (in)
blockTopoFeatures - The blockTopoFeatures (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

initialize

public void initialize(IEditor editor,
                       int sizePixels,
                       boolean blockTopoFeatures,
                       boolean annoOnly)
                throws IOException,
                       AutomationException
Initializes the cache using the editor's selection.

Remarks

At ArcGIS 8.3 and later versions, the BlockTopoFeatures argument will always be evaluated as True. This is a result of the restructuring of the underlying mechanism for working with topological primitives.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
initialize in interface IEditSelectionCache3
Parameters:
editor - A reference to a com.esri.arcgis.editor.IEditor (in)
sizePixels - The sizePixels (in)
blockTopoFeatures - The blockTopoFeatures (in)
annoOnly - The annoOnly (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onSelectionChanged

public void onSelectionChanged(IEditEventsOnSelectionChangedEvent theEvent)
                        throws IOException,
                               AutomationException
Called when the selection changes.

Remarks

Whenever the feature selection status changes during an edit session, the OnSelectionChanged event is fired. Whenever the selection changes the location of the editor's SelectionAnchor is updated; if the AuxiliarySelectionAnchor is visible then its location is updated also.

When To Use

Use IEditEvents::OnSelectionChanged to execute code immediately after a change in the status of the feature selection. In the attached Visual Basic class module example, the methodology for tapping into the editor events is shown.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onCurrentLayerChanged

public void onCurrentLayerChanged(IEditEventsOnCurrentLayerChangedEvent theEvent)
                           throws IOException,
                                  AutomationException
Called when the current layer changes.

Remarks

Whenever the current layer changes during an edit session, the OnCurrentLayerChanged event is fired.

When To Use

Use IEditEvents::OnCurrentLayerChanged to execute code immediately after the user changes to another layer. In the attached Visual Basic class module example, the methodology for tapping into the editor events is shown.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onCurrentTaskChanged

public void onCurrentTaskChanged(IEditEventsOnCurrentTaskChangedEvent theEvent)
                          throws IOException,
                                 AutomationException
Called when the current task changes.

Remarks

Whenever the current task changes during an edit session, the OnCurrentTaskChanged event is fired.

When To Use

Use IEditEvents::OnCurrentTaskChanged to execute code immediately after the user changes to a different task. In the attached Visual Basic class module example, the methodology for tapping into the editor events is shown.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onSketchModified

public void onSketchModified(IEditEventsOnSketchModifiedEvent theEvent)
                      throws IOException,
                             AutomationException
Called when the edit sketch is modified.

Remarks

Whenever sketch vertices are deleted, added, or moved during an edit session, the OnSketchModified is fired.

When To Use

Use IEditEvents::OnSketchModified to execute code immediately after the user adds, deletes, or moves a vertex in an edit sketch. In the attached Visual Basic class module example, the methodology for tapping into the editor events is shown.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onSketchFinished

public void onSketchFinished(IEditEventsOnSketchFinishedEvent theEvent)
                      throws IOException,
                             AutomationException
Called when the edit sketch is finished.

Remarks

Whenever a sketch is completed during an edit session, the OnSketchFinished event is fired.

When To Use

Use IEditEvents::OnSketchFinished to execute code immediately after the user activates the IEditSketch::FinishSketch method to complete creation of a feature in an edit sketch. In the attached Visual Basic class module example, the methodology for tapping into the editor events is shown.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

afterDrawSketch

public void afterDrawSketch(IEditEventsAfterDrawSketchEvent theEvent)
                     throws IOException,
                            AutomationException
Called after the edit sketch is drawn.

Remarks

Whenever the edit sketch is refreshed during an edit session, the AfterDrawSketch event is fired.

When To Use

Use IEditEvents::AfterdrawSketch to execute code immediately after the sketch-graphics are refreshed. In the attached Visual Basic class module example, the methodology for tapping into the editor events is shown.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onStartEditing

public void onStartEditing(IEditEventsOnStartEditingEvent theEvent)
                    throws IOException,
                           AutomationException
Called when editing begins.

Remarks

Whenever an edit session is started, the OnStartEditing event is fired.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onStopEditing

public void onStopEditing(IEditEventsOnStopEditingEvent theEvent)
                   throws IOException,
                          AutomationException
Called when editing ends.

Remarks

Whenever an edit session ends, the OnStopEditing event is fired.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onConflictsDetected

public void onConflictsDetected(IEditEventsOnConflictsDetectedEvent theEvent)
                         throws IOException,
                                AutomationException
Called when editing conflicts are detected during save.

Remarks

Whenever conflicts are detected after a Save Edits or reconcile operation, the OnConflictsDetected event is fired.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onUndo

public void onUndo(IEditEventsOnUndoEvent theEvent)
            throws IOException,
                   AutomationException
Called when UndoOperation is called.

Remarks

Whenever an edit operation is undone, the OnUndo event is fired. For example, if a feature is moved and Undo is called, the OnUndo is fired. This event is not fired when sketch operations are undone. For example, undoing the addition of a point to the edit sketch does not trigger the OnUndo event.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onRedo

public void onRedo(IEditEventsOnRedoEvent theEvent)
            throws IOException,
                   AutomationException
Called when RedoOperation is called.

Remarks

Whenever an edit operation is redone, the OnRedo event is fired. For example, if a feature is moved and Undo and Redo are called, the OnUndo and OnRedo events are fired. This event is not fired when sketch operations are redone. For example, redoing the addition of a point to the edit sketch does not trigger the OnRedo event.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onCreateFeature

public void onCreateFeature(IEditEventsOnCreateFeatureEvent theEvent)
                     throws IOException,
                            AutomationException
Called when new features are created.

Remarks

Whenever a new feature is created the OnCreateFeature event is fired. The new feature is passed to all listening clients via the IObject parameter.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onChangeFeature

public void onChangeFeature(IEditEventsOnChangeFeatureEvent theEvent)
                     throws IOException,
                            AutomationException
Called when features are modified.

Remarks

Whenever a new feature is changed the OnChangeFeature event is fired. The changed feature is passed to all listening clients via the IObject parameter.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

onDeleteFeature

public void onDeleteFeature(IEditEventsOnDeleteFeatureEvent theEvent)
                     throws IOException,
                            AutomationException
Called when features are deleted.

Remarks

Whenever a new feature is deleted the OnDeleteFeature event is fired. The deleted feature is passed to all listening clients via the IObject parameter.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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