com.esri.arcgis.controls
Class IEngineNetworkAnalystEnvironmentEventsProxy

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

public class IEngineNetworkAnalystEnvironmentEventsProxy
extends com.esri.arcgis.interop.Dispatch
implements IEngineNetworkAnalystEnvironmentEvents, Serializable

Provides access to events triggered by the network analysis extension.

Description

The IEngineNetworkAnalystEnvironmentEvents interface is an outgoing interface on the EngineNetworkAnalystEnvironment singleton object that is used to notify listeners when a new INetworkLayer object referencing a NetworkDataset is added to the map or when the IEngineNetworkAnalystEnvironment::CurrentNetworkLayer is changed.

Product Availability

Available with ArcGIS Engine.

private EngineNetworkAnalystEnvironment eNaEnv;
public void someMethod()throws Exception

{
if (eNaEnv == null)
eNaEnv = new EngineNetworkAnalystEnvironment();

eNaEnv.addIEngineNetworkAnalystEnvironmentEventsListener(new IEngineNetworkAnalystEnvironmentEventsAdapter()

{

public void onCurrentNetworkLayerChanged(IEngineNetworkAnalystEnvironmentEventsOnCurrentNetworkLayerChangedEvent arg0)throws
IOException, AutomationException

{
System.out.println("Current Network Layer changed");
}
}
);
}

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
  IEngineNetworkAnalystEnvironmentEventsProxy()
           
  IEngineNetworkAnalystEnvironmentEventsProxy(Object obj)
           
protected IEngineNetworkAnalystEnvironmentEventsProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 void onCurrentNetworkLayerChanged(IEngineNetworkAnalystEnvironmentEventsOnCurrentNetworkLayerChangedEvent theEvent)
          Called when the current network layer has changed.
 void onNetworkLayersChanged(IEngineNetworkAnalystEnvironmentEventsOnNetworkLayersChangedEvent theEvent)
          Called when the network layers have changed.
 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

IEngineNetworkAnalystEnvironmentEventsProxy

public IEngineNetworkAnalystEnvironmentEventsProxy()

IEngineNetworkAnalystEnvironmentEventsProxy

public IEngineNetworkAnalystEnvironmentEventsProxy(Object obj)
                                            throws IOException
Throws:
IOException

IEngineNetworkAnalystEnvironmentEventsProxy

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

onNetworkLayersChanged

public void onNetworkLayersChanged(IEngineNetworkAnalystEnvironmentEventsOnNetworkLayersChangedEvent theEvent)
                            throws IOException,
                                   AutomationException
Called when the network layers have changed.

Description

The OnNetworkLayersChanged event is fired when a new INetworkLayer object is added, removed, or renamed within a map.

If the INetworkLayer is renamed interactively through the user interface OnNetworkLayersChanged is fired. If the INetworkLayer is renamed programmatically using the ILayer::Name property OnNetworkLayersChanged is not fired.

Product Availability

Available with ArcGIS Engine.

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

onCurrentNetworkLayerChanged

public void onCurrentNetworkLayerChanged(IEngineNetworkAnalystEnvironmentEventsOnCurrentNetworkLayerChangedEvent theEvent)
                                  throws IOException,
                                         AutomationException
Called when the current network layer has changed.

Description

The OnCurrentNetworkLayerChanged event is fired when the user interactively changes the NetworkDataset or the IEngineNetworkAnalystEnvironment::CurrentNetworkLayer is set programatically.

Product Availability

Available with ArcGIS Engine.

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