com.esri.arcgis.controls
Interface IEngineNAWindow

All Superinterfaces:
Serializable
All Known Subinterfaces:
IEngineNAWindow2
All Known Implementing Classes:
IEngineNAWindow2Proxy, IEngineNAWindowProxy

public interface IEngineNAWindow
extends 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.


Method Summary
 void abortOperation(INAContext pNAContext)
          Cancels the operation in progress.
 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 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.
 

Method Detail

setMessage

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.

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

getActiveAnalysis

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.

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

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

Product Availability

Available with ArcGIS Engine.

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

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.

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

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

Product Availability

Available with ArcGIS Engine.

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

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.

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

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

Product Availability

Available with ArcGIS Engine.

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

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.

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

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.

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

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.

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

getHWnd

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.

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

getItemSelectionColor

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.

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

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

Product Availability

Available with ArcGIS Engine.

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

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.

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

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.

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

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.

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.