com.esri.arcgis.controls
Class IEngineNAWindowProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.controls.IEngineNAWindowProxy
All Implemented Interfaces:
IEngineNAWindow, Externalizable, Serializable
Direct Known Subclasses:
IEngineNAWindow2Proxy

public class IEngineNAWindowProxy
extends com.esri.arcgis.interop.Dispatch
implements IEngineNAWindow, Serializable

Provides access to the network analysis window.

Superseded By

IEngineNAWindow2

Description

The IEngineNAWindow interface is the main interface on the IEngineNetworkAnalystEnvironment::NAWindow. It provides methods to access the NALayer and to edit INAContext::NAClasses within the context of an undo/redo operation.

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
  IEngineNAWindowProxy()
           
  IEngineNAWindowProxy(Object obj)
           
protected IEngineNAWindowProxy(Object obj, String iid)
           
 
Method Summary
 void abortOperation(INAContext pNAContext)
          Cancels the operation in progress.
 void addListener(String iidStr, Object theListener, Object theSource)
           
 void delayEvents(IEngineNAWindowCategory pCategory, boolean flag)
          Indicates if events should be delayed for a category.
 void delayWindowUpdates(boolean flag)
          Indicates if window updates should be delayed.
 INALayer getActiveAnalysis()
          The current analysis shown in the window.
 IEngineNAWindowCategory getActiveCategory()
          The current category shown in the window.
 IEngineNAWindowCategory getCategoryByNAClassName(String name)
          The network analysis window by category.
 int getHWnd()
          The handle to the analysis window.
 IColor getItemSelectionColor()
          The color used for selected items.
 ISelection getSelection()
          The current selection in the window.
 void removeListener(String iidStr, Object theListener)
           
 void setActiveAnalysis(INALayer analysisLayer)
          The current analysis shown in the window.
 void setActiveCategory(IEngineNAWindowCategory category)
          The current category shown in the window.
 void setItemSelectionColor(IColor color)
          The color used for selected items.
 void setMessage(String rhs1)
          Displays a message at the bottom of the window.
 void startOperation(INAContext pNAContext)
          Starts an analysis window operation.
 void stopOperation(INAContext pNAContext, String message)
          Stops an analysis window operation.
 void updateContent(IEngineNAWindowCategory category)
          Refresh the window contents.
 
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

IEngineNAWindowProxy

public IEngineNAWindowProxy()

IEngineNAWindowProxy

public IEngineNAWindowProxy(Object obj)
                     throws IOException
Throws:
IOException

IEngineNAWindowProxy

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

setMessage

public void setMessage(String rhs1)
                throws IOException,
                       AutomationException
Displays a message at the bottom of the window.

Description

The Message property changes the text at the bottom of the IEngineNetworkAnalystEnvironment::NAWindow.

Product Availability

Available with ArcGIS Engine.

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

getActiveAnalysis

public INALayer getActiveAnalysis()
                           throws IOException,
                                  AutomationException
The current analysis shown in the window.

Description

ActiveAnalysis specifies the active NALayer for the IEngineNetworkAnalystEnvironment::NAWindow. This is the network analysis layer that is shown as the selected layer in the Network Analyst Window's dropdown.

Product Availability

Available with ArcGIS Engine.

Specified by:
getActiveAnalysis in interface IEngineNAWindow
Returns:
A reference to a com.esri.arcgis.networkanalyst.INALayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setActiveAnalysis

public void setActiveAnalysis(INALayer analysisLayer)
                       throws IOException,
                              AutomationException
The current analysis shown in the window.

Product Availability

Available with ArcGIS Engine.

Specified by:
setActiveAnalysis in interface IEngineNAWindow
Parameters:
analysisLayer - A reference to a com.esri.arcgis.networkanalyst.INALayer (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getActiveCategory

public IEngineNAWindowCategory getActiveCategory()
                                          throws IOException,
                                                 AutomationException
The current category shown in the window.

Description

The ActiveCategory specifies the current category of network locations selected in the IEngineNetworkAnalystEnvironment::NAWindow. Examples of categories include Stops, Barriers, Incidents, Facilities, Routes, etc.

Product Availability

Available with ArcGIS Engine.

Specified by:
getActiveCategory in interface IEngineNAWindow
Returns:
A reference to a com.esri.arcgis.controls.IEngineNAWindowCategory
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setActiveCategory

public void setActiveCategory(IEngineNAWindowCategory category)
                       throws IOException,
                              AutomationException
The current category shown in the window.

Product Availability

Available with ArcGIS Engine.

Specified by:
setActiveCategory in interface IEngineNAWindow
Parameters:
category - A reference to a com.esri.arcgis.controls.IEngineNAWindowCategory (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSelection

public ISelection getSelection()
                        throws IOException,
                               AutomationException
The current selection in the window.

Description

Selection returns a reference to the ISelection interface that can be used to manipulate a NALocationObject object within the IEngineNetworkAnalystEnvironment::NAWindow.

On the ISelection interface, use the methods prefixed with "Can" to determine if the other methods are supported. For example, call the CanSelectAll method prior to attempting to call the SelectAll method.

On the ISelection interface, Clear does not unselect the selected NALocationObject. Rather, Clear deletes the selected NALocationObject from the NAClass.

Calling methods on the ISelection interface that modify an NALocationObject object will perform the operation within an undo/redo operation.

Product Availability

Available with ArcGIS Engine.

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

getCategoryByNAClassName

public IEngineNAWindowCategory getCategoryByNAClassName(String name)
                                                 throws IOException,
                                                        AutomationException
The network analysis window by category.

Product Availability

Available with ArcGIS Engine.

Specified by:
getCategoryByNAClassName in interface IEngineNAWindow
Parameters:
name - The name (in)
Returns:
A reference to a com.esri.arcgis.controls.IEngineNAWindowCategory
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

updateContent

public void updateContent(IEngineNAWindowCategory category)
                   throws IOException,
                          AutomationException
Refresh the window contents.

Description

The UpdateContent method refreshes the specified category or the entire IEngineNetworkAnalystEnvironment::NAWindow.

UpdateContent should be used if the underlying INAContext::NAClasses were updated without events being fired. For example, you should call UpdateContent after using an insert cursor to populate a NALocationFeature object in the "Stops" NAClass. Calling this method will ensure that the IEngineNetworkAnalystEnvironment::NAWindow reflects the current state of the INAContext::NAClasses.

If you pass in a null pointer for the category, the entire IEngineNetworkAnalystEnvironment::NAWindow will be updated.

Product Availability

Available with ArcGIS Engine.

Specified by:
updateContent in interface IEngineNAWindow
Parameters:
category - A reference to a com.esri.arcgis.controls.IEngineNAWindowCategory (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

delayEvents

public void delayEvents(IEngineNAWindowCategory pCategory,
                        boolean flag)
                 throws IOException,
                        AutomationException
Indicates if events should be delayed for a category.

Description

DelayEvents notifies the IEngineNetworkAnalystEnvironment::NAWindow to start/stop listening to IObjectClassEvents on a particular NAClass specified by the category or on all the INAContext::NAClasses if no category is passed in.

If the flag parameter is true, the IEngineNetworkAnalystEnvironment::NAWindow will ignore all IObjectClassEvents for the category. If the flag parameter is false, the IEngineNetworkAnalystEnvironment::NAWindow will begin listening to the events.

This method is useful if you are going to be updating alot of NALocationObject objects in a NAClass and want the application to be as responsive as possible. Pass in true to DelayEvents to perform the update on the NAClass, or pass in false to DelayEvents and then call UpdateContent.

Product Availability

Available with ArcGIS Engine.

Specified by:
delayEvents in interface IEngineNAWindow
Parameters:
pCategory - A reference to a com.esri.arcgis.controls.IEngineNAWindowCategory (in)
flag - The flag (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

delayWindowUpdates

public void delayWindowUpdates(boolean flag)
                        throws IOException,
                               AutomationException
Indicates if window updates should be delayed.

Description

DelayWindowUpdates notifies the IEngineNetworkAnalystEnvironment::NAWindow whether or not to respond to items getting added or deleted to its treeview.

In it's default state, every time an item is added, deleted, or moved in the IEngineNetworkAnalystEnvironment::NAWindow the treeview is recalcuated. If it is known upfront that a lot of changes are going to be made, the process should be to pass true into DelayWindowUpdates, make the changes, and then pass in false to DelayWindowUpdates.

Product Availability

Available with ArcGIS Engine.

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

getHWnd

public int getHWnd()
            throws IOException,
                   AutomationException
The handle to the analysis window.

Description

The window handle of the IEngineNetworkAnalystEnvironment::NAWindow.

Product Availability

Available with ArcGIS Engine.

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

getItemSelectionColor

public IColor getItemSelectionColor()
                             throws IOException,
                                    AutomationException
The color used for selected items.

Description

The ItemSelectionColor is the color used to highlight the NALocationObject objects in the IEngineNetworkAnalystEnvironment::NAWindow.

Product Availability

Available with ArcGIS Engine.

Specified by:
getItemSelectionColor in interface IEngineNAWindow
Returns:
A reference to a com.esri.arcgis.display.IColor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setItemSelectionColor

public void setItemSelectionColor(IColor color)
                           throws IOException,
                                  AutomationException
The color used for selected items.

Product Availability

Available with ArcGIS Engine.

Specified by:
setItemSelectionColor in interface IEngineNAWindow
Parameters:
color - A reference to a com.esri.arcgis.display.IColor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

startOperation

public void startOperation(INAContext pNAContext)
                    throws IOException,
                           AutomationException
Starts an analysis window operation.

Description

Use StartOperation to start an edit operation on items in a NAClass. It should be followed with a call to StopOperation.

Product Availability

Available with ArcGIS Engine.

Specified by:
startOperation in interface IEngineNAWindow
Parameters:
pNAContext - A reference to a com.esri.arcgis.networkanalyst.INAContext (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

stopOperation

public void stopOperation(INAContext pNAContext,
                          String message)
                   throws IOException,
                          AutomationException
Stops an analysis window operation.

Description

Use StartOperation to start an edit operation on items in a NAClass. It should be followed with a call to StopOperation.

Product Availability

Available with ArcGIS Engine.

Specified by:
stopOperation in interface IEngineNAWindow
Parameters:
pNAContext - A reference to a com.esri.arcgis.networkanalyst.INAContext (in)
message - The message (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

abortOperation

public void abortOperation(INAContext pNAContext)
                    throws IOException,
                           AutomationException
Cancels the operation in progress.

Description

AbortOperation is used to stop and undo an edit operation already in progress without creating an operation on the stack.

You must call this after a call to StartOperation. You should not call StopOperation after a call to AbortOperation.

Product Availability

Available with ArcGIS Engine.

Specified by:
abortOperation in interface IEngineNAWindow
Parameters:
pNAContext - A reference to a com.esri.arcgis.networkanalyst.INAContext (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.