com.esri.arcgis.controls
Class ArcReaderControl

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Canvas
          extended by com.esri.arcgis.interop.Ocx
              extended by com.esri.arcgis.controls.ArcReaderControl
All Implemented Interfaces:
IARControl, IARControlDefault, com.esri.arcgis.interop.RemoteObjRef, ImageObserver, MenuContainer, Serializable, Accessible

public class ArcReaderControl
extends com.esri.arcgis.interop.Ocx
implements com.esri.arcgis.interop.RemoteObjRef, IARControl, IARControlDefault

Esri ArcReaderControl

Description

The ArcReaderControl displays the 'data' and 'layout' views of the ArcReader desktop application, together with its Table of Contents. It provides all of the functionality in the ArcReader desktop application except for a toolbar and status bar.

The ArcReaderControl CoClass provides properties, methods and events for managing the general appearance of the control, checking and loading Published Map Files and checking document permissions. The IARControl::ShowARWindow method can be used to display the built in Find, Printer and Magnifier windows and the IARControl::CurrentARTool property can be used to set the current tool to one of the built in navigation, identify or hyperlink tools.

One of the most important aspects of the ArcReaderControl is the notion of its views;the place where data is drawn. The ArcReaderControl has two views, an ARPageLayout view and an ARMap view. Only one of these views can be visible at a time, and is known as the CurrentView. To perform a spatial or attribute search on a ARMap or Layer use the ArcReaderSearchDef object in conjunction the SearchARFeatures or QueryARFeatures methods on the IARMap or IARLayer interfaces.

The ArcReaderConfiguration object can be used to customize the appearance and behavior of the ArcReaderControl and its built in windows.

Remarks

The ArcReaderControl and ReaderControl are very similar and have the same self contained object model. The table below summarizes differences between the ArcReaderControl and the ReaderControl.

ArcReaderControl ReaderControl
Control name ArcReaderControl ReaderControl
Type library name esriArcReaderControl esriReaderControl
Required design time license ArcGIS Publisher Extension License ArcGIS Engine Designer License
Required runtime deployment Free ArcReader Application Licensed ArcGIS Engine Runtime
Supported API's COM (ActiveX Control), .NET (Windows Control) COM (ActiveX Control), .NET (Windows Control), Java (Visual Java Bean), C++ (Motif and GTK Widgets)
Supported platforms Windows Windows, UNIX
Contains a set of Reader Commands No Yes
CoCreatable objects ArcReaderSearchDef, ArcReaderConfiguration ARSearchDef, ARConfiguration
Extend with ESRI ArcObjects No Yes, for PMF's published with permission to load into a customized application, and published with unrestriced access to its contents
Develop applications in conjunction with the ToolbarControl and TOCControl No Yes, for PMF's published with permission to load into a customized application, and published with unrestriced access to its contents

There is no need to declare the ArcReaderControl's outbound interface as described below in most development environments, because the interface is automaticlly implemented.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Canvas
Canvas.AccessibleAWTCanvas
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class com.esri.arcgis.interop.Ocx
rootParentContainers, rootWindows
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ArcReaderControl()
          Constructs a ArcReaderControl using ArcGIS Engine.
ArcReaderControl(Object o)
          Constructs a ArcReaderControl.
 
Method Summary
 void aboutBox()
          Displays a dialog of information about the control.
 void addIARControlEventsListener(IARControlEvents theListener)
          addIARControlEventsListener.
 void addNotify()
           
 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 equals(Object o)
          Compare this object with another
 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.
static String getClsid()
          getClsid.
 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 removeIARControlEventsListener(IARControlEvents theListener)
          removeIARControlEventsListener.
 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.
 
Methods inherited from class com.esri.arcgis.interop.Ocx
checkIfVisible, dispose, finalize, getCanvasWindowHandle, getControlWindowHandle, getMinimumSize, getObjRef, getPreferredSize, paint, removeNotify, setBounds, setBounds, setSize, setSize, zz_doQueuedSets, zz_get, zz_get, zz_get, zz_get, zz_get, zz_get, zz_get, zz_get, zz_queueSet, zz_queueSet, zz_queueSet, zz_queueSet, zz_queueSet, zz_queueSet, zz_queueSet, zz_queueSet
 
Methods inherited from class java.awt.Canvas
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

ArcReaderControl

public ArcReaderControl()
Constructs a ArcReaderControl using ArcGIS Engine.


ArcReaderControl

public ArcReaderControl(Object o)
Constructs a ArcReaderControl.

Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

addIARControlEventsListener

public void addIARControlEventsListener(IARControlEvents theListener)
                                 throws IOException
addIARControlEventsListener. Listen to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.controls.IARControlEvents interface.
Throws:
IOException - If there are communications problems.

removeIARControlEventsListener

public void removeIARControlEventsListener(IARControlEvents theListener)
                                    throws IOException
removeIARControlEventsListener. Stop listening to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.controls.IARControlEvents interface.
Throws:
IOException - If there are communications problems.

addNotify

public void addNotify()
Overrides:
addNotify in class com.esri.arcgis.interop.Ocx

setBorderStyle

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

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
setBorderStyle in interface IARControl
Specified by:
setBorderStyle in interface IARControlDefault
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

public 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.

Specified by:
getBorderStyle in interface IARControl
Specified by:
getBorderStyle in interface IARControlDefault
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

public 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.

Specified by:
esri_setEnabled in interface IARControl
Specified by:
esri_setEnabled in interface IARControlDefault
Parameters:
pbool - The pbool (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_isEnabled

public 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.

Specified by:
esri_isEnabled in interface IARControl
Specified by:
esri_isEnabled in interface IARControlDefault
Returns:
The pbool
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAppearance

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

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
setAppearance in interface IARControl
Specified by:
setAppearance in interface IARControlDefault
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

public 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.

Specified by:
getAppearance in interface IARControl
Specified by:
getAppearance in interface IARControlDefault
Returns:
A com.esri.arcgis.controls.esriARAppearance constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

aboutBox

public 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.

Specified by:
aboutBox in interface IARControl
Specified by:
aboutBox in interface IARControlDefault
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

loadDocument

public 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.

Specified by:
loadDocument in interface IARControl
Specified by:
loadDocument in interface IARControlDefault
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

public 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.

Specified by:
unloadDocument in interface IARControl
Specified by:
unloadDocument in interface IARControlDefault
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

reloadDocument

public 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.

Specified by:
reloadDocument in interface IARControl
Specified by:
reloadDocument in interface IARControlDefault
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

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

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
setCurrentViewByRef in interface IARControl
Specified by:
setCurrentViewByRef in interface IARControlDefault
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

public 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.

Specified by:
getCurrentView in interface IARControl
Specified by:
getCurrentView in interface IARControlDefault
Returns:
A reference to another Automation Object (IDispatch)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDocumentComment

public 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.

Specified by:
getDocumentComment in interface IARControl
Specified by:
getDocumentComment in interface IARControlDefault
Returns:
The sComment
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getARPageLayout

public 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.

Specified by:
getARPageLayout in interface IARControl
Specified by:
getARPageLayout in interface IARControlDefault
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

public 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.

Specified by:
showARWindow in interface IARControl
Specified by:
showARWindow in interface IARControlDefault
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

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

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
isARWindowVisible in interface IARControl
Specified by:
isARWindowVisible in interface IARControlDefault
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

public 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.

Specified by:
suppressResizeDrawing in interface IARControl
Specified by:
suppressResizeDrawing in interface IARControlDefault
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

public 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.

Specified by:
setTOCWidth in interface IARControl
Specified by:
setTOCWidth in interface IARControlDefault
Parameters:
lWidth - The lWidth (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTOCWidth

public 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.

Specified by:
getTOCWidth in interface IARControl
Specified by:
getTOCWidth in interface IARControlDefault
Returns:
The lWidth
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

printView

public 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.

Specified by:
printView in interface IARControl
Specified by:
printView in interface IARControlDefault
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

copyViewToClipboard

public 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.

Specified by:
copyViewToClipboard in interface IARControl
Specified by:
copyViewToClipboard in interface IARControlDefault
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCurrentARTool

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

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
setCurrentARTool in interface IARControl
Specified by:
setCurrentARTool in interface IARControlDefault
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

public 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.

Specified by:
getCurrentARTool in interface IARControl
Specified by:
getCurrentARTool in interface IARControlDefault
Returns:
A com.esri.arcgis.controls.esriARTool constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

hasDocumentPermission

public 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.

Specified by:
hasDocumentPermission in interface IARControl
Specified by:
hasDocumentPermission in interface IARControlDefault
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

public 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.

Specified by:
setShowScrollbars in interface IARControl
Specified by:
setShowScrollbars in interface IARControlDefault
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

public 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.

Specified by:
isShowScrollbars in interface IARControl
Specified by:
isShowScrollbars in interface IARControlDefault
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

public 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.

Specified by:
setTOCVisible in interface IARControl
Specified by:
setTOCVisible in interface IARControlDefault
Parameters:
visible - The visible (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isTOCVisible

public 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.

Specified by:
isTOCVisible in interface IARControl
Specified by:
isTOCVisible in interface IARControlDefault
Returns:
The visible
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getHWnd

public 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.

Specified by:
getHWnd in interface IARControl
Specified by:
getHWnd in interface IARControlDefault
Returns:
The window
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setShowMapTips

public 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.

Specified by:
setShowMapTips in interface IARControl
Specified by:
setShowMapTips in interface IARControlDefault
Parameters:
show - The show (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isShowMapTips

public 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.

Specified by:
isShowMapTips in interface IARControl
Specified by:
isShowMapTips in interface IARControlDefault
Returns:
The show
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

refresh

public 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.

Specified by:
refresh in interface IARControl
Specified by:
refresh in interface IARControlDefault
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

public 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.

Specified by:
getCurrentViewType in interface IARControl
Specified by:
getCurrentViewType in interface IARControlDefault
Returns:
A com.esri.arcgis.controls.esriARViewType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getARConfiguration

public 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.

Specified by:
getARConfiguration in interface IARControl
Specified by:
getARConfiguration in interface IARControlDefault
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

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

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
setARConfigurationByRef in interface IARControl
Specified by:
setARConfigurationByRef in interface IARControlDefault
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

public 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.

Specified by:
getARUnitConverter in interface IARControl
Specified by:
getARUnitConverter in interface IARControlDefault
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

public 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.

Specified by:
getDocumentFilename in interface IARControl
Specified by:
getDocumentFilename in interface IARControlDefault
Returns:
The bsFilename
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDocumentFilename

public 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.

Specified by:
setDocumentFilename in interface IARControl
Specified by:
setDocumentFilename in interface IARControlDefault
Parameters:
bsFilename - The bsFilename (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

checkDocument

public 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.

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

getARCommandInfo

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

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
getARCommandInfo in interface IARControl
Specified by:
getARCommandInfo in interface IARControlDefault
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

public 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.

Specified by:
exportView in interface IARControl
Specified by:
exportView in interface IARControlDefault
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

public 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.

Specified by:
setEnableFileDrop in interface IARControl
Specified by:
setEnableFileDrop in interface IARControlDefault
Parameters:
pvbValue - The pvbValue (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isEnableFileDrop

public 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.

Specified by:
isEnableFileDrop in interface IARControl
Specified by:
isEnableFileDrop in interface IARControlDefault
Returns:
The pvbValue
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCustomProperty

public 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.

Specified by:
getCustomProperty in interface IARControl
Specified by:
getCustomProperty in interface IARControlDefault
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCustomProperty

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

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

getObject

public 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.

Specified by:
getObject in interface IARControl
Specified by:
getObject in interface IARControlDefault
Returns:
A reference to another Automation Object (IDispatch)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getViewTop

public 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.

Specified by:
getViewTop in interface IARControl
Specified by:
getViewTop in interface IARControlDefault
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getViewLeft

public 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.

Specified by:
getViewLeft in interface IARControl
Specified by:
getViewLeft in interface IARControlDefault
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getViewHeight

public 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.

Specified by:
getViewHeight in interface IARControl
Specified by:
getViewHeight in interface IARControlDefault
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getViewWidth

public 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.

Specified by:
getViewWidth in interface IARControl
Specified by:
getViewWidth in interface IARControlDefault
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isHasCustomARConfiguration

public 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.

Specified by:
isHasCustomARConfiguration in interface IARControl
Specified by:
isHasCustomARConfiguration in interface IARControlDefault
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSwipeLayerByRef

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

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
setSwipeLayerByRef in interface IARControl
Specified by:
setSwipeLayerByRef in interface IARControlDefault
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

public 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.

Specified by:
getSwipeLayer in interface IARControl
Specified by:
getSwipeLayer in interface IARControlDefault
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

public 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.

Specified by:
getViewWindow in interface IARControl
Specified by:
getViewWindow in interface IARControlDefault
Returns:
The window
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMousePointer

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

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Specified by:
setMousePointer in interface IARControl
Specified by:
setMousePointer in interface IARControlDefault
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

public 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.

Specified by:
getMousePointer in interface IARControl
Specified by:
getMousePointer in interface IARControlDefault
Returns:
A com.esri.arcgis.controls.esriARMousePointer constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSelectedARLayer

public 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.

Specified by:
getSelectedARLayer in interface IARControl
Specified by:
getSelectedARLayer in interface IARControlDefault
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.