com.esri.arcgis.controls
Class ITOCBuddyEventsProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.controls.ITOCBuddyEventsProxy
All Implemented Interfaces:
ITOCBuddyEvents, Externalizable, Serializable, EventListener

public class ITOCBuddyEventsProxy
extends com.esri.arcgis.interop.Dispatch
implements ITOCBuddyEvents, Serializable

Provides access to events that notify the TOC of a change.

Description

The ITOCBuddyEvents interface can be implemented as an outbound events interface by the Buddy of the TOCControl (e.g. the MapControl). You would only implement this interface if you are creating a control or object that can be a Buddy of the TOCControl. The TOCControl listens to this interface (as well as IActiveViewEvents) in order to refresh maps, layers and symbology, and to re-sync events.

For example, when a new map document is loaded into the MapControl the IActiveView object contained within the MapControl gets replaced. If the MapControl is 'buddied' to a TOCControl, the MapControl fires the ITOCBuddyEvents::ActiveViewReplaced event to the TOCControl. The TOCControl stops listening to events on the 'old' IActiveView object and starts listening to events on the 'new' IActiveView object contained within the MapControl. This ensures the TOCControl automatically reflects the maps, layers and symbology of the Buddy.

Product Availability

Available with ArcGIS Engine.

See Also:
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
  ITOCBuddyEventsProxy()
           
  ITOCBuddyEventsProxy(Object obj)
           
protected ITOCBuddyEventsProxy(Object obj, String iid)
           
 
Method Summary
 void activeViewChanged(ITOCBuddyEventsActiveViewChangedEvent theEvent)
          Notifies the TOC that the active view has changed and an Update is required.
 void activeViewReplaced(ITOCBuddyEventsActiveViewReplacedEvent theEvent)
          Notifies the TOC that the active view has been replaced.
 void addListener(String iidStr, Object theListener, Object theSource)
           
 void removeListener(String iidStr, Object theListener)
           
 
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

ITOCBuddyEventsProxy

public ITOCBuddyEventsProxy()

ITOCBuddyEventsProxy

public ITOCBuddyEventsProxy(Object obj)
                     throws IOException
Throws:
IOException

ITOCBuddyEventsProxy

protected ITOCBuddyEventsProxy(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

activeViewReplaced

public void activeViewReplaced(ITOCBuddyEventsActiveViewReplacedEvent theEvent)
                        throws IOException,
                               AutomationException
Notifies the TOC that the active view has been replaced.

Description

The ActiveViewReplaced event is triggered when the ActiveView of the ITOCControl::Buddy is replaced.

For example, when a new map document is loaded into the MapControl the IActiveView object contained within the MapControl gets replaced. If the MapControl is 'buddied' to a TOCControl, the MapControl fires the ITOCBuddyEvents::ActiveViewReplaced event to the TOCControl. The TOCControl stops listening to events on the 'old' IActiveView object and starts listening to events on the 'new' IActiveView object contained within the MapControl. This ensures the TOCControl automatically reflects the maps, layers and symbology of the Buddy.

Product Availability

Available with ArcGIS Engine.

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

activeViewChanged

public void activeViewChanged(ITOCBuddyEventsActiveViewChangedEvent theEvent)
                       throws IOException,
                              AutomationException
Notifies the TOC that the active view has changed and an Update is required.

Description

The ActiveViewChanged event is triggered whenever there is a scale change in the ActiveView of the ITOCControl::Buddy. This event is fired when the TOCControl has a 'buddy' GlobeControl and the IGlobeDisplayEvents::InteractionStopped event is fired.

Product Availability

Available with ArcGIS Engine.

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