com.esri.arcgis.controls
Interface IARControl

All Superinterfaces:
Serializable
All Known Implementing Classes:
ArcReaderControl, IARControlProxy

public interface IARControl
extends Serializable

Provides access to members on the control.

Description

The IARControl interface is a starting point for any tasks related to the ArcReaderControl. The interface is used to manipulate the ArcReaderControl object in a number of ways:

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.


Method Summary
 void aboutBox()
          Displays a dialog of information about the control.
 boolean checkDocument(String sFilename)
          Checks the document filename to determine if its a valid Published Map File (*.PMF), published with permission to load into the control.
 void copyViewToClipboard()
          Copies the current map or page layout view to the clipboard.
 boolean esri_isEnabled()
          Indicates whether the control can respond to user generated events.
 void esri_setEnabled(boolean pbool)
          Indicates whether the control can respond to user generated events.
 void exportView(int format, String sFilename)
          Export the current map or page layout view to the file.
 int getAppearance()
          The appearance of the control.
 IARCommandInfo getARCommandInfo(int tool)
          The ARCommandInfo contained by the control.
 IARConfiguration getARConfiguration()
          The ARConfiguration used by the control.
 IARPageLayout getARPageLayout()
          The page layout contained within the currently loaded document.
 IARUnitConverter getARUnitConverter()
          The ARUnitConverter contained by the control.
 int getBorderStyle()
          The border style of the control.
 int getCurrentARTool()
          Current active tool for the control.
 Object getCurrentView()
          The current map or page layout view.
 int getCurrentViewType()
          The type of current view.
 Object getCustomProperty()
          A property to associate data with a control.
 String getDocumentComment()
          A comment about the currently loaded Published Map File (*.PMF).
 String getDocumentFilename()
          The file name of the currently loaded Published Map File (*.PMF).
 int getHWnd()
          Handle to the window associated with the control.
 int getMousePointer()
          The mouse cursor displayed over the document.
 Object getObject()
          A property that returns the underlying control.
 IARLayer getSelectedARLayer()
          The selected ARLayer in the TOC.
 IARLayer getSwipeLayer()
          The swipe layer used by the control.
 int getTOCWidth()
          The width of the Table of Contents (TOC) in pixels.
 int getViewHeight()
          The height of the Active View in pixels.
 int getViewLeft()
          The number of pixels between the top of the control and the top of the Active View.
 int getViewTop()
          The number of pixels between the left edge of the control and the left side of the Active View.
 int getViewWidth()
          The width of the Active View in pixels.
 int getViewWindow()
          Handle to the view window associated with the control.
 boolean hasDocumentPermission(int docPermission)
          Indicates if the currently loaded Published Map File (*.PMF) was published with the specified permission.
 boolean isARWindowVisible(int win)
          Indicates if the specified control window is visible.
 boolean isEnableFileDrop()
          Indicates whether Published Map Files can be dropped onto the control.
 boolean isHasCustomARConfiguration()
          Is the current PMF using settings stored in the PMF.
 boolean isShowMapTips()
          Indicates if map tips are shown when the current view is a map or page layout.
 boolean isShowScrollbars(int viewType)
          Indicates if the map and page layout scrollbars are visible.
 boolean isTOCVisible()
          Indicates if the Table of Contents (TOC) is visible.
 void loadDocument(String sFilename, String sPassword)
          Loads the Published Map File (*.PMF) into the control.
 void printView()
          Send the current map or page layout view to the printer.
 void refresh(boolean refreshNow)
          Refresh the control's window.
 void reloadDocument(String sPassword)
          Reloads the currently loaded Published Map File (*.PMF) back into the control.
 void setAppearance(int pappearance)
          The appearance of the control.
 void setARConfigurationByRef(IARConfiguration ppConfiguration)
          The ARConfiguration used by the control.
 void setBorderStyle(int pstyle)
          The border style of the control.
 void setCurrentARTool(int tool)
          Current active tool for the control.
 void setCurrentViewByRef(Object ppCurrentView)
          The current map or page layout view.
 void setCustomProperty(Object pVal)
          A property to associate data with a control.
 void setDocumentFilename(String bsFilename)
          The file name of the currently loaded Published Map File (*.PMF).
 void setEnableFileDrop(boolean pvbValue)
          Indicates whether Published Map Files can be dropped onto the control.
 void setMousePointer(int pcursor)
          The mouse cursor displayed over the document.
 void setShowMapTips(boolean show)
          Indicates if map tips are shown when the current view is a map or page layout.
 void setShowScrollbars(int viewType, boolean show)
          Indicates if the map and page layout scrollbars are visible.
 void setSwipeLayerByRef(IARLayer ppLayer)
          The swipe layer used by the control.
 void setTOCVisible(boolean visible)
          Indicates if the Table of Contents (TOC) is visible.
 void setTOCWidth(int lWidth)
          The width of the Table of Contents (TOC) in pixels.
 void showARWindow(int win, boolean show, Object data)
          Shows or hides the specified control window.
 void suppressResizeDrawing(boolean suppressResize, int resizeHWnd)
          Suppress full redraw of control during resize operations.
 void unloadDocument()
          Unloads the currently loaded Published Map File (*.PMF) from the control.
 

Method Detail

setBorderStyle

void setBorderStyle(int pstyle)
                    throws IOException,
                           AutomationException
The border style of the control.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
pstyle - A com.esri.arcgis.controls.esriARBorderStyle constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBorderStyle

int getBorderStyle()
                   throws IOException,
                          AutomationException
The border style of the control.

Description

Returns or sets the border style of a ArcReaderControl. By default a border is drawn.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
A com.esri.arcgis.controls.esriARBorderStyle constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_setEnabled

void esri_setEnabled(boolean pbool)
                     throws IOException,
                            AutomationException
Indicates whether the control can respond to user generated events.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

esri_isEnabled

boolean esri_isEnabled()
                       throws IOException,
                              AutomationException
Indicates whether the control can respond to user generated events.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
The pbool
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAppearance

void setAppearance(int pappearance)
                   throws IOException,
                          AutomationException
The appearance of the control.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
pappearance - A com.esri.arcgis.controls.esriARAppearance constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAppearance

int getAppearance()
                  throws IOException,
                         AutomationException
The appearance of the control.

Description

Returns or sets the paint style of the ArcReaderControl to either Flat or 3D. By default the appearance is flat.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
A com.esri.arcgis.controls.esriARAppearance constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

aboutBox

void aboutBox()
              throws IOException,
                     AutomationException
Displays a dialog of information about the control.

Description

The AboutBox method causes a modal dialog box to display on top of the ArcReaderControl, containing information about the version and creation date of the ArcReaderControl as well as listing relevant legal and copyright information from ESRI.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

loadDocument

void loadDocument(String sFilename,
                  String sPassword)
                  throws IOException,
                         AutomationException
Loads the Published Map File (*.PMF) into the control.

Description

Loads the specified Published Map File (*.pmf) into the ArcReaderControl. Use the CheckDocument method to determine if the specified Published Map File can be loaded successfully.

If a document was password protected when it was published, the user will be prompted automatically for a password, if the password is not passed within the LoadDocument method. If an incorrect password is supplied twice in succession a custom error will be returned.

If a document in successfully loaded the CurrentView and the CurrentARTool will be set. The default CurrentARTool is specified by the ‘DefaultDataTool’ and ‘DefaultLayoutTool’ settings in the ARConfiguration. The DocumentFilename property will update itself with the path and filename of the currently loaded document, and the DocumentComment property to update itself with any comments that were supplied by the publisher of the document.

Remarks

The LoadDocument method triggers the following events:

OnDocumentLoaded
OnCurrentViewChanged
OnBeforeScreenDraw
OnAfterScreenDraw

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
sFilename - The sFilename (in)
sPassword - The sPassword (in, optional, pass if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

unloadDocument

void unloadDocument()
                    throws IOException,
                           AutomationException
Unloads the currently loaded Published Map File (*.PMF) from the control.

Description

The UnloadDocument method removes the currently loaded PMF document from the ArcReaderControl and causes the DocumentFilename property to update itself with an empty string. At this point the ArcReaderControl is empty.

Remarks

The UnloadDocument method triggers the following events:

OnDocumentUnloaded
OnCurrentViewChanged

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

reloadDocument

void reloadDocument(String sPassword)
                    throws IOException,
                           AutomationException
Reloads the currently loaded Published Map File (*.PMF) back into the control.

Description

The ReloadDocument method loads the currently loaded Published Map File back into the ArcReaderControl. This resets the ArcReaderControl to the state of the Published Map File on disk, resetting the CurrentView, the extent of the CurrentView and layer visibility.

If a document was password protected when it was published, the user will be prompted automatically for a password, if the password is not passed within the ReloadDocument method. If an incorrect password is supplied twice in succession a custom error will be returned.

Remarks

The ReloadDocument method triggers the following events:

OnDocumentUnloaded
OnCurrentViewChanged
OnDocumentLoaded
OnCurrentViewChanged
OnBeforeScreenDraw
OnAfterScreenDraw

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
sPassword - The sPassword (in, optional, pass if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCurrentViewByRef

void setCurrentViewByRef(Object ppCurrentView)
                         throws IOException,
                                AutomationException
The current map or page layout view.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
ppCurrentView - A reference to another Automation Object (IDispatch) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCurrentView

Object getCurrentView()
                      throws IOException,
                             AutomationException
The current map or page layout view.

Description

One of the most important aspects of the ArcReaderControl is the notion of its views. You can think of the view as the place where data is drawn. A view is either the ARPageLayout or the IARPageLayout::FocusARMap. Only one of these views can be visible at a time, and is known as the CurrentView. The CurrentViewType returns a constant indicating the type of CurrentView.

Setting the CurrentView triggers the OnCurrentViewChanged event. To set the CurrentView to Nothing, use the UnloadDocument method.

Remarks

Setting the CurrentView property will return an error if the currently loaded document was not published with permission to ChangeView. Use the IARControl::HasDocumentPermission method to determine this.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
A reference to another Automation Object (IDispatch)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDocumentComment

String getDocumentComment()
                          throws IOException,
                                 AutomationException
A comment about the currently loaded Published Map File (*.PMF).

Description

Returns any comments that were specified when the currently loaded document was published.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
The sComment
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getARPageLayout

IARPageLayout getARPageLayout()
                              throws IOException,
                                     AutomationException
The page layout contained within the currently loaded document.

Description

The ARPageLayout object manages the layout of a page that is sent as output to a printer. The ARPageLayout will typically consist of one or more maps, together with marginalia such as scalebars, legends and titles. Use the IARPageLayout::ARMap property to access any maps present in the page layout.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
A reference to a com.esri.arcgis.controls.IARPageLayout
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

showARWindow

void showARWindow(int win,
                  boolean show,
                  Object data)
                  throws IOException,
                         AutomationException
Shows or hides the specified control window.

Description

The ShowARWindow shows or hides the specified built in window. By default all of the esriARWindows are closed. Before using the ShowARWindow method make one or all of the following checks:

A modal window requires a response from the user, before they can interact with another part of the application. A modeless window will stay on the screen, available for use, but allow the user to interact with other parts of the application. When the LoadDocument or ReloadDocument methods are used, any modeless windows will be automatically closed.

Remarks

esriARWindowsFind: A modeless dialog for finding features by their attribute values in the IARPageLayout::FocusARMap. Optionally, supply an ARLayer as the data parameter to perform the find on a particular layer. The ShowARWindow method will return an error if the currently loaded document was not published with permission to Find. Use the IARControl::HasDocumentPermission method to determine this.

esriARWindowsMagnifier: A modeless window that works like a magnifying glass as it is moved over the CurrentView displaying it in more detail.

esriARWindowsSearchHelp: Not yet implemented.

esriARWindowsHelpContents: Not yet implemented.

esriARWindowsFileProperties: A modal dialog displaying file property, disabled functionality and inaccessible layer information about the currently loaded document.

esriARWindowsAddInternetSite: A modal dialog for adding an internet site. If an address is entered begining with "www" this is automatically appended with '?mode=arcreadermap' in order to open the site at the location of Published Map Files. The internet site is automatically opened within a browser and added to the esriARWindowsManageInternetSite window.

esriARWindowsManageInternetSite: A modal dialog for managing any internet sites that have previoulsy been added.

esriARWindowsInternetBrowser: Opens an internet browser at the internet site specified by the data parameter. The data parameter can either be a String consisting of a valid URL (the URL must contain ""www"") or a Long representing the index of a URL that has previously been added. Note that an index of 0 is reserved and represents the ESRI website and an index of 1 is reserved and represents the ESRI Geography Network. Any URL that has previoulsy been added will start at the index value of 2.

esriARWindowsPageSetup: A modal window for setting up the CurrentView prior to printing. The ShowARWindow method will return an error if the currently loaded document was not published with permission to Print. Use the IARControl::HasDocumentPermission method to determine this.

esriARWindowsPrinter: A modal window for sending the CurrentView to a printer. The ShowARWindow method will return an error if the currently loaded document was not published with permission to Print. Use the IARControl::HasDocumentPermission method to determine this.

esriARWindowsIdentify: A modeless dialog for displaying identify results when the CurrentARTool is set to esriARToolMapIdentify.The ShowARWindow method will return an error if the currently loaded document was not published with permission to Identify. Use the IARControl::HasDocumentPermission method to determine this.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
win - A com.esri.arcgis.controls.esriARWindows constant (in)
show - The show (in, optional, pass true if not required)
data - A Variant (in, optional, pass null if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isARWindowVisible

boolean isARWindowVisible(int win)
                          throws IOException,
                                 AutomationException
Indicates if the specified control window is visible.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
win - A com.esri.arcgis.controls.esriARWindows constant (in)
Returns:
The visible
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

suppressResizeDrawing

void suppressResizeDrawing(boolean suppressResize,
                           int resizeHWnd)
                           throws IOException,
                                  AutomationException
Suppress full redraw of control during resize operations.

Description

If the ArcReaderControl contains a lot of data, redrawing this data during a resize event can be costly. To increase performance you can suppress the data redraw until the resizing is complete with the SuppressResizeDrawing method. During the resize a stretched bitmap will be drawn instead.

Pass True to suppress normal drawing and draw a stretched bitmap when a resize event begins. During the resize the data is not refereshed and the captured image is stretched. As such, the image can appear pixelated when a small display area is resized to a large display area. Pass False to resume normal drawing when a resize event ends.

In development environments that do not trap the beginning and end of a resize event, the ArcReaderControl can 'watch' the hwnd supplied to the SuppressResizeDrawing method. When a form or container starts resizing the WM_ENTERSIZEMOVE windows messge is sent and the ArcReaderControl will set suppressResize to True. When windows sends the WM_EXITSIZEMOVE message the form or container is released from resizing and the the ArcReaderControl will set suppressResize to False. Pass the hwnd of the form or container to the SuppressResizeDrawing method when the form or container is initialized. Passing an hwnd of 0 will stop the ArcReaderControl watching the hwnd.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
suppressResize - The suppressResize (in)
resizeHWnd - The resizeHWnd (in, optional, pass 0 if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTOCWidth

void setTOCWidth(int lWidth)
                 throws IOException,
                        AutomationException
The width of the Table of Contents (TOC) in pixels.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

getTOCWidth

int getTOCWidth()
                throws IOException,
                       AutomationException
The width of the Table of Contents (TOC) in pixels.

Description

The width of the Table of Contents (TOC) in pixels. By default the TOCWidth property is set to 180. The minimum value that can be set to the TOCWidth property is 4.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
The lWidth
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

printView

void printView()
               throws IOException,
                      AutomationException
Send the current map or page layout view to the printer.

Description

Sends the CurrentView to either the system default printer or the last printer selected in either the esriARWindowsPageSetup or esriARWindowsPrinter window.

Remarks

The PrintView method will return an error if the currently loaded document was not published with permission to Print. Use the IARControl::HasDocumentPermission method to determine this.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

copyViewToClipboard

void copyViewToClipboard()
                         throws IOException,
                                AutomationException
Copies the current map or page layout view to the clipboard.

Description

Copies a bitmap of the CurrentView to the system clipboard so that it can be copied into other applications. The output will exactly reflect the state of the CurrentView as seen on the screen.

Remarks

The CopyViewToClipboard method will return an error if the currently loaded document was not published with permission to CopyViewToClipboard. Use the HasDocumentPermission method to determine this.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCurrentARTool

void setCurrentARTool(int tool)
                      throws IOException,
                             AutomationException
Current active tool for the control.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
tool - A com.esri.arcgis.controls.esriARTool constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCurrentARTool

int getCurrentARTool()
                     throws IOException,
                            AutomationException
Current active tool for the control.

Description

The CurrentARTool used to interact with the CurrentView. The CurrentARTool for the ARPageLayout view is independent from the CurrentARTool for the ARMap view. For example, the built in map zoom in tool maybe the CurrentARTool when the CurrentView is a map, and the built in page layout pan tool maybe the CurrentARTool when the CurrentView is a page layout. Loading a new document into the ArcReaderControl will cause the CurrentARTool property to be set for each view according to the ‘DefaultDataTool’ and ‘DefaultLayoutTool’ settings in the ARConfiguration.

Setting the CurrentARTool will change the mouse cursor and may popup a modeless dialog. For example, setting the current tool to the built in identify tool will cause the identify dialog to open. Some of the tools may change the focus map when the current view is a page layout. The CurrentARTool cannot be set to Nothing, instead set the CurrentARTool to the NoneSelected tool.

The following table lists each tool and briefly describes its function

Tool Description
esriARToolNoneSelected Use this tool if you want nothing to happen when the user interacts with the CurrentView .
esriARToolMapZoomIn, esriARToolMApZoomOut, esriARToolMapPan Use these tools to navigate around an ARMap regardless of the CurrentView; these tools will work on a map when the current view is a page layout. Click or drag a rectangle on the CurrentView to use the zoom tools, and depress the mouse and drag the CurrentView in a particular direction before releasing the mouse to pan.
esriARToolLayoutZoomIn, esriARToolLayoutZoomIn, esriARToolLayoutPan Use these tools to navigate around the ARPageLayout when it is the CurrentView. Click or drag a rectangle on the CurrentView to use the zoom tools, and depress the mouse and drag the CurrentView in a particular direction before releasing the mouse to pan.
esriARMapIdentify, esriARMapIdentifyUsingLayer Use these tools to identify features in the CurrentView. Click on a single feature or drag a rectangle to select multiple features in the CurrentView . The window has its own context menus; incorporates a raster viewer; and can display hyperlinks.
esriARMapMeasure Use this tool to measure distances and areas on an ARMap regardless of the CurrentView. Measurements are given in IARMap::DistanceUnits
esriARMapHyperlink Use this tool to access any hyperlinks present in the data regardless of the CurrentView .
esriARToolMarkUpPenThin, esriARToolMarkUpPenMedium, esriARToolMarkUpPenThick
Use these tools to provide users with the ability to add 'Mark Up' to the Published Map File loaded in the ArcReaderControl.
esriARToolMarkUpHighlightYellow, esriARToolMarkUpHighlightGreen, esriARToolMarkUpHighlightBlue
Use these tools to provide users with the ability to highlight areas of the Published Map File loaded in the ArcReaderControl.
esriARToolMarkUpEraserSmall, esriARToolMarkUpEraserMedium, esriARToolMarkUpEraserLarge, esriARToolMarkUpEraserStroke
Use these tools to provide users with the ability to erase MarkUp that has been added to the Published Map File loaded in the ArcReaderControl.
esriARToolCustom
Use this to use a tool other than the built in tools. The custom tool must be a COM object that implements both ICommand and ITool. Custom tools can only be used if the PMF document was published with permission to access internal ArcObjects. Use the HasDocumentPermission method to check this.

Remarks

Setting the CurrentARTool property to the Identify, Measure or Hyperlink tools will return an error if the currently loaded document was not published with permission to Identify, Measure and access Hyperlinks. Use the IARControl::HasDocumentPermission method to determine this.

Always check if a tool is enabled before setting it to the CurrentARTool property, by returning the ARCommandInfo and checking the IARCommandInfo::Enabled state. Here are some occasions when an esriARTool maybe disabled:

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
A com.esri.arcgis.controls.esriARTool constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

hasDocumentPermission

boolean hasDocumentPermission(int docPermission)
                              throws IOException,
                                     AutomationException
Indicates if the currently loaded Published Map File (*.PMF) was published with the specified permission.

Description

The HasDocumentPermission method determines whether the currently loaded document was published with the specified functionality permission.

When a document is published the publisher can set a variety of permissions to limit the functionality that a user has access to when viewing the document in the ArcReaderControl. These permissions should be checked and the behaviour of an application modified appropriately. For example, if permission to access hyperlinks does not exist an application should be modified so that a user can not set the current tool to the hyperlink tool.

Remarks

esriARDocumentPermissionsPrint: Indicates whether permission exists to use the PrintView method and the ShowARWindow method to open the PageSetup and Printer windows.

esriARDocumentPermissionsExport: Indicates whether permission exists to use the IARControl::ExportView method.

esriARDocumentPermissionsIdentify: Indicates whether permission exists to set the CurrentARTool property to the Identify tool to use the ShowARWindow method to open the Identify window.

esriARDocumentPermissionsFind: Indicates whether permission exists to use the ShowARWindow method to open the Find window.

esriARDocumentPermissionsChangeView: Indicates whether permission exists to set the CurrentView property.

esriARDocumentPermissionsChangeLayerVisibility: Indicates whether permission exists to set the IARLayer::Visible property.

esriARDocumentPermissionsHyperlink: Indicates whether permission exists to set the CurrentARTool property to the Hyperlinks tool.

esriARDocumentPermissionsMeasure: Indicates whether permission exists to set the CurrentARTool property to the Measure tool.

esriARDocumentPermissionsViewTOC: Indicates whether permission exists to set the TOCVisible property.

esriARDocumentPermissionsOnlyInArcReader: Indicates whether permission exists for Published Map File to be loaded into the ArcReaderControl.

esriARDocumentPermissionsQueryFeatures: Indicates whether permission exists to use the IARMap::SearchARFeatures, IARMap::QueryARFeatures, IARLayer::SearchARFeatures, and IARLayer::QueryARFeatures methods.

esriARDocumentPermissionsQueryValues: Indicates whether permission exists to use the IARFeature::Value property.

esriARDocumentPermissionsCopyViewToClipboard: Indicates whether permission exists to use the CopyViewToClipboard method.

esriARDocumentPermissionsInternalObjects: Indicates whether permission exists to get the IARPageLayout::InternalObject, IARMap::InternalObject, IARLayer::InternalObject and IARFeature::InternalObject properties. This permission is true if the publisher selected "Unrestriced access to contents of Published Map" at the time of publishing.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
docPermission - A com.esri.arcgis.controls.esriARDocumentPermissions constant (in)
Returns:
The hasPermission
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setShowScrollbars

void setShowScrollbars(int viewType,
                       boolean show)
                       throws IOException,
                              AutomationException
Indicates if the map and page layout scrollbars are visible.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
viewType - A com.esri.arcgis.controls.esriARViewType constant (in)
show - The show (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isShowScrollbars

boolean isShowScrollbars(int viewType)
                         throws IOException,
                                AutomationException
Indicates if the map and page layout scrollbars are visible.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
viewType - A com.esri.arcgis.controls.esriARViewType constant (in)
Returns:
The show
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTOCVisible

void setTOCVisible(boolean visible)
                   throws IOException,
                          AutomationException
Indicates if the Table of Contents (TOC) is visible.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

isTOCVisible

boolean isTOCVisible()
                     throws IOException,
                            AutomationException
Indicates if the Table of Contents (TOC) is visible.

Description

Indicates whether the Table of Contents (TOC) on the left hand side of the ArcReaderControl is visible. You may want to hide the TOC to have more area for displaying data. The width of the TOC can be changed by setting the TOCWidth property to the appropriate number of pixels. By default the TOCVisible property is set to true.

Remarks

Setting the TOCVisible property will return an error if the currently loaded document was not published with permission to ViewTOC. Use the IARControl::HasDocumentPermission method to determine this.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
The visible
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getHWnd

int getHWnd()
            throws IOException,
                   AutomationException
Handle to the window associated with the control.

Description

The operating environment identifies each window, form and control in an application by assigning it a handle, or hWnd. Many ArcObjects methods and Windows API calls require the hWnd as an argument.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
The window
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setShowMapTips

void setShowMapTips(boolean show)
                    throws IOException,
                           AutomationException
Indicates if map tips are shown when the current view is a map or page layout.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

isShowMapTips

boolean isShowMapTips()
                      throws IOException,
                             AutomationException
Indicates if map tips are shown when the current view is a map or page layout.

Description

Determines whether map tips are displayed (if they exist) as the mouse moves over layer features. Map tips will be present if they were present in the ArcMap document at the time of publishing. By default the ShowMapTips property is set to true.

Remarks

Map tips will only be shown when the CurrentView is an IARPageLayout::ARMap.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
The show
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

refresh

void refresh(boolean refreshNow)
             throws IOException,
                    AutomationException
Refresh the control's window.

Description

The Refresh method causes screen display area of the CurrentView to be completely redrawn by sending a windows paint event. This causes all data in the current map extent to be retieved and any map surround layout elements to be redrawn. Use the Refresh method to ensure the CurrentView is displaying the current state of the data. For example, if data is in an SDE server with many users editing the data, refreshing the CurrentView ensures the user of a ArcReaderControl application sees any new edits.

Specify whether to immediately redraw the CurrentView or whether to queue up the redraw to happen at some point in the future. For example, if there are many extent changes, but only the last extent needs displaying to the user pass False to the Refresh method. The paint event will be queued and the CurrentView will be redrawn once after the last extent change. However, if every extent change needs displaying to the user, pass True to the Refresh method. The CurrentView will be redrawn after every extent change. Likewise pass True after an extent change, but before flashing or flickering an ARFeature.

If the esriARWindows magnifier window if it is visible, the Refresh method will cause the contents of the window to be redrawn too.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
refreshNow - The refreshNow (in, optional, pass false if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCurrentViewType

int getCurrentViewType()
                       throws IOException,
                              AutomationException
The type of current view.

Description

Returns the type of CurrentView. If no document has been loaded esriARViewTypeNone will be returned.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
A com.esri.arcgis.controls.esriARViewType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getARConfiguration

IARConfiguration getARConfiguration()
                                    throws IOException,
                                           AutomationException
The ARConfiguration used by the control.

Description

This is the ARConfiguration object contained within the ArcReaderControl. It is a helper object for customising the appearance and behaviour of the ArcReaderControl. It consists of many property and value settings that are stored in a template file (.art), known as an ‘ArcReader Template’.

There are various ways to manage these property and value settings:

In order for the ArcReaderControl to update itself to match any updated settings the ARConfiguration object must be set back into the ArcReaderControl.

The ArcReaderControl will initially look for an template file in a users local profile. If no template file is found a default configuration file will be created containing default settings. The contents of the ARConfiguration can be stored in a template file in the current user profile and used as an initialization or "INI" file. The ArcReader desktop application does this using a
file called ArcReader.art. It is recommended not to reuse this file as it may break the ArcReader desktop application. Instead, use a location such as:

User profile\Application Data\CompanyName\ProductName\Templates\FileName.art

Once a template has been saved it can be loaded into the ArcReaderControl to suit a particular user or application. For example, a user may have a preference about the window position of the magnifier window and whether the table of contents is displayed. When the ArcReaderControl exits (typically when the form or container is closed) the value of these setting is updated back into the ARConfiguration. Additional custom settings can be added to the ARConfiguration, to store user preferences specific to the custom application.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
A reference to a com.esri.arcgis.controls.IARConfiguration
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setARConfigurationByRef

void setARConfigurationByRef(IARConfiguration ppConfiguration)
                             throws IOException,
                                    AutomationException
The ARConfiguration used by the control.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
ppConfiguration - A reference to a com.esri.arcgis.controls.IARConfiguration (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getARUnitConverter

IARUnitConverter getARUnitConverter()
                                    throws IOException,
                                           AutomationException
The ARUnitConverter contained by the control.

Description

The ARUnitConverter object is a helper object for firstly converting values between different esriARUnits and secondly for converting values and esriARUnits constants to strings.

Many user preferences are also maintained in the configuration, for example window position of the Magnifier, preferences for whether the TOC is displayed. When the ReaderControl exits, typically when a form is closed, the current value of many of the settings are updated back into the ARConfiguration.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
A reference to a com.esri.arcgis.controls.IARUnitConverter
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDocumentFilename

String getDocumentFilename()
                           throws IOException,
                                  AutomationException
The file name of the currently loaded Published Map File (*.PMF).

Description

Returns the file name of the currently loaded document.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
The bsFilename
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDocumentFilename

void setDocumentFilename(String bsFilename)
                         throws IOException,
                                AutomationException
The file name of the currently loaded Published Map File (*.PMF).

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

checkDocument

boolean checkDocument(String sFilename)
                      throws IOException,
                             AutomationException
Checks the document filename to determine if its a valid Published Map File (*.PMF), published with permission to load into the control.

Description

Determines whether the specified Published Map File (*.pmf) is a valid file and was published with permission to load into the ArcReaderControl.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

getARCommandInfo

IARCommandInfo getARCommandInfo(int tool)
                                throws IOException,
                                       AutomationException
The ARCommandInfo contained by the control.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
tool - A com.esri.arcgis.controls.esriARTool constant (in)
Returns:
A reference to a com.esri.arcgis.controls.IARCommandInfo
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

exportView

void exportView(int format,
                String sFilename)
                throws IOException,
                       AutomationException
Export the current map or page layout view to the file.

Description

Exports the CurrentView with the specified filename, in the specified format. The output will exactly reflect the state of the CurrentView as seen on the screen.

Remarks

The Export method will return an error if the currently loaded document was not published with permission to Export. Use the IARControl::HasDocumentPermission method to determine this.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
format - A com.esri.arcgis.controls.esriARExportFormat constant (in)
sFilename - The sFilename (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setEnableFileDrop

void setEnableFileDrop(boolean pvbValue)
                       throws IOException,
                              AutomationException
Indicates whether Published Map Files can be dropped onto the control.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

isEnableFileDrop

boolean isEnableFileDrop()
                         throws IOException,
                                AutomationException
Indicates whether Published Map Files can be dropped onto the control.

Description

Indicates if the ArcReaderControl will load Published Map Files (*.pmf) by the user interactively dropping files onto the ArcReaderControl from other applications such as ArcCatalog or Windows Explorer. The ArcReaderControl itself will determine if the file that has been dropped is a PMF document that can be loaded into the ArcReaderControl.

By default dragging a file over the ArcReaderControl will cause the mouse cursor to change to an ‘add data’ cursor. Setting the EnableFileDrop property to False, will cause the mouse cursor to change to a ‘no entry’ cursor when files are dragged over the ArcReaderControl.

If a document is successfully loaded the CurrentView and the CurrentARTool will be set. The default CurrentARTool is specified by the ‘DefaultDataTool’ and ‘DefaultLayoutTool’ settings in the ARConfiguration. The DocumentFilename property will update itself with the path and filename of the currently loaded document, and the DocumentComment property to update itself with any comments that were supplied by the publisher of the document.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
The pvbValue
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCustomProperty

Object getCustomProperty()
                         throws IOException,
                                AutomationException
A property to associate data with a control.

Description

Use the CustomProperty to associate any useful data with the ArcReaderControl. This is similar to a 'Tag' property, and can be use to store strings, numbers and objects.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCustomProperty

void setCustomProperty(Object pVal)
                       throws IOException,
                              AutomationException
A property to associate data with a control.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

getObject

Object getObject()
                 throws IOException,
                        AutomationException
A property that returns the underlying control. This can be used when the control is inside a wrapper object that has been added by a development environment.

Description

In some development environments it is not possible to query interface directly on the control to other COM interfaces, beacuse the control is contained within a wrapper object. To get the real control use the Object property.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
A reference to another Automation Object (IDispatch)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getViewTop

int getViewTop()
               throws IOException,
                      AutomationException
The number of pixels between the left edge of the control and the left side of the Active View.

Description

The top of the CurrentView display area in pixels. This will always return 0.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getViewLeft

int getViewLeft()
                throws IOException,
                       AutomationException
The number of pixels between the top of the control and the top of the Active View.

Description

The left side of the CurrentView display area in pixels. The ViewLeft is equal to the TOCWidth + 4 (the width of the splitter that separates the TOC from the CurrentView display area).

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getViewHeight

int getViewHeight()
                  throws IOException,
                         AutomationException
The height of the Active View in pixels.

Description

The height of the CurrentView display area in pixels.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getViewWidth

int getViewWidth()
                 throws IOException,
                        AutomationException
The width of the Active View in pixels.

Description

The width of the CurrentView display area in pixels. The ViewWidth is equal to the width of the ArcReaderControl - TOCWidth - 4 (the width of the splitter that separates the TOC from the CurrentView display area).

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isHasCustomARConfiguration

boolean isHasCustomARConfiguration()
                                   throws IOException,
                                          AutomationException
Is the current PMF using settings stored in the PMF.

Description

This property can be used to determine if the currently loaded document has been published with an embedded ArcReader Template File (ART).

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSwipeLayerByRef

void setSwipeLayerByRef(IARLayer ppLayer)
                        throws IOException,
                               AutomationException
The swipe layer used by the control.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
ppLayer - A reference to a com.esri.arcgis.controls.IARLayer (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSwipeLayer

IARLayer getSwipeLayer()
                       throws IOException,
                              AutomationException
The swipe layer used by the control.

Description

This property can be used to specify the ARLayer which is used by the esriARToolMapSwipe. Layers beneath the ArcReaderControl::SwipeLayer will be revealed when the esriARToolMapSwipe tool is used.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
A reference to a com.esri.arcgis.controls.IARLayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getViewWindow

int getViewWindow()
                  throws IOException,
                         AutomationException
Handle to the view window associated with the control.

Description

The operating environment identifies each window, form and control in an application by assigning it a handle, or hWnd. The ArcReaderControl is composed of several windows, this property returns the hWnd of window containing the CurrentView.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
The window
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMousePointer

void setMousePointer(int pcursor)
                     throws IOException,
                            AutomationException
The mouse cursor displayed over the document.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
pcursor - A com.esri.arcgis.controls.esriARMousePointer constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMousePointer

int getMousePointer()
                    throws IOException,
                           AutomationException
The mouse cursor displayed over the document.

Description

You can use MousePointer to set the system mouse pointer to be one of the standard built-in esriARMousePointers. This is useful if you want to display a wait cursor while you code performs a large process. The specified esriARMousePointer is displayed provided the ArcReaderControl::CurrentARTool is set to esriARToolNoneSelected.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
A com.esri.arcgis.controls.esriARMousePointer constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSelectedARLayer

IARLayer getSelectedARLayer()
                            throws IOException,
                                   AutomationException
The selected ARLayer in the TOC.

Description

Returns the ARLayer that has been selected in the Table Of Contents (TOC). If no layer has been selected in the TOC, this method will return nothing.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
A reference to a com.esri.arcgis.controls.IARLayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.