|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Canvas com.esri.arcgis.interop.Ocx com.esri.arcgis.controls.ArcReaderControl
public class ArcReaderControl
Esri ArcReaderControl
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.
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.
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.lang.Object |
---|
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public ArcReaderControl()
public ArcReaderControl(Object o)
Method Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public void addIARControlEventsListener(IARControlEvents theListener) throws IOException
theListener
- An object that implements the com.esri.arcgis.controls.IARControlEvents interface.
IOException
- If there are communications problems.public void removeIARControlEventsListener(IARControlEvents theListener) throws IOException
theListener
- An object that implements the com.esri.arcgis.controls.IARControlEvents interface.
IOException
- If there are communications problems.public void addNotify()
addNotify
in class com.esri.arcgis.interop.Ocx
public void setBorderStyle(int pstyle) throws IOException, AutomationException
setBorderStyle
in interface IARControl
setBorderStyle
in interface IARControlDefault
pstyle
- A com.esri.arcgis.controls.esriARBorderStyle constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getBorderStyle() throws IOException, AutomationException
Returns or sets the border style of a ArcReaderControl. By default a border is drawn.
getBorderStyle
in interface IARControl
getBorderStyle
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void esri_setEnabled(boolean pbool) throws IOException, AutomationException
esri_setEnabled
in interface IARControl
esri_setEnabled
in interface IARControlDefault
pbool
- The pbool (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean esri_isEnabled() throws IOException, AutomationException
esri_isEnabled
in interface IARControl
esri_isEnabled
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setAppearance(int pappearance) throws IOException, AutomationException
setAppearance
in interface IARControl
setAppearance
in interface IARControlDefault
pappearance
- A com.esri.arcgis.controls.esriARAppearance constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getAppearance() throws IOException, AutomationException
Returns or sets the paint style of the ArcReaderControl to either Flat or 3D. By default the appearance is flat.
getAppearance
in interface IARControl
getAppearance
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void aboutBox() throws IOException, AutomationException
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.
aboutBox
in interface IARControl
aboutBox
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void loadDocument(String sFilename, String sPassword) throws IOException, AutomationException
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.
The LoadDocument method triggers the following events:
OnDocumentLoaded
OnCurrentViewChanged
OnBeforeScreenDraw
OnAfterScreenDraw
loadDocument
in interface IARControl
loadDocument
in interface IARControlDefault
sFilename
- The sFilename (in)sPassword
- The sPassword (in, optional, pass if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void unloadDocument() throws IOException, AutomationException
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.
The UnloadDocument method triggers the following events:
OnDocumentUnloaded
OnCurrentViewChanged
unloadDocument
in interface IARControl
unloadDocument
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void reloadDocument(String sPassword) throws IOException, AutomationException
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.
The ReloadDocument method triggers the following events:
OnDocumentUnloaded
OnCurrentViewChanged
OnDocumentLoaded
OnCurrentViewChanged
OnBeforeScreenDraw
OnAfterScreenDraw
reloadDocument
in interface IARControl
reloadDocument
in interface IARControlDefault
sPassword
- The sPassword (in, optional, pass if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setCurrentViewByRef(Object ppCurrentView) throws IOException, AutomationException
setCurrentViewByRef
in interface IARControl
setCurrentViewByRef
in interface IARControlDefault
ppCurrentView
- A reference to another Automation Object (IDispatch) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getCurrentView() throws IOException, AutomationException
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.
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.
getCurrentView
in interface IARControl
getCurrentView
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getDocumentComment() throws IOException, AutomationException
Returns any comments that were specified when the currently loaded document was published.
getDocumentComment
in interface IARControl
getDocumentComment
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IARPageLayout getARPageLayout() throws IOException, AutomationException
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.
getARPageLayout
in interface IARControl
getARPageLayout
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void showARWindow(int win, boolean show, Object data) throws IOException, AutomationException
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.
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.
showARWindow
in interface IARControl
showARWindow
in interface IARControlDefault
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isARWindowVisible(int win) throws IOException, AutomationException
isARWindowVisible
in interface IARControl
isARWindowVisible
in interface IARControlDefault
win
- A com.esri.arcgis.controls.esriARWindows constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void suppressResizeDrawing(boolean suppressResize, int resizeHWnd) throws IOException, AutomationException
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.
suppressResizeDrawing
in interface IARControl
suppressResizeDrawing
in interface IARControlDefault
suppressResize
- The suppressResize (in)resizeHWnd
- The resizeHWnd (in, optional, pass 0 if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setTOCWidth(int lWidth) throws IOException, AutomationException
setTOCWidth
in interface IARControl
setTOCWidth
in interface IARControlDefault
lWidth
- The lWidth (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getTOCWidth() throws IOException, AutomationException
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.
getTOCWidth
in interface IARControl
getTOCWidth
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void printView() throws IOException, AutomationException
Sends the CurrentView to either the system default printer or the last printer selected in either the esriARWindowsPageSetup or esriARWindowsPrinter window.
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.
printView
in interface IARControl
printView
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void copyViewToClipboard() throws IOException, AutomationException
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.
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.
copyViewToClipboard
in interface IARControl
copyViewToClipboard
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setCurrentARTool(int tool) throws IOException, AutomationException
setCurrentARTool
in interface IARControl
setCurrentARTool
in interface IARControlDefault
tool
- A com.esri.arcgis.controls.esriARTool constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getCurrentARTool() throws IOException, AutomationException
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. |
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:
getCurrentARTool
in interface IARControl
getCurrentARTool
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean hasDocumentPermission(int docPermission) throws IOException, AutomationException
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.
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.
hasDocumentPermission
in interface IARControl
hasDocumentPermission
in interface IARControlDefault
docPermission
- A com.esri.arcgis.controls.esriARDocumentPermissions constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setShowScrollbars(int viewType, boolean show) throws IOException, AutomationException
setShowScrollbars
in interface IARControl
setShowScrollbars
in interface IARControlDefault
viewType
- A com.esri.arcgis.controls.esriARViewType constant (in)show
- The show (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isShowScrollbars(int viewType) throws IOException, AutomationException
isShowScrollbars
in interface IARControl
isShowScrollbars
in interface IARControlDefault
viewType
- A com.esri.arcgis.controls.esriARViewType constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setTOCVisible(boolean visible) throws IOException, AutomationException
setTOCVisible
in interface IARControl
setTOCVisible
in interface IARControlDefault
visible
- The visible (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isTOCVisible() throws IOException, AutomationException
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.
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.
isTOCVisible
in interface IARControl
isTOCVisible
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getHWnd() throws IOException, AutomationException
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.
getHWnd
in interface IARControl
getHWnd
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setShowMapTips(boolean show) throws IOException, AutomationException
setShowMapTips
in interface IARControl
setShowMapTips
in interface IARControlDefault
show
- The show (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isShowMapTips() throws IOException, AutomationException
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.
Map tips will only be shown when the CurrentView is an IARPageLayout::ARMap.
isShowMapTips
in interface IARControl
isShowMapTips
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void refresh(boolean refreshNow) throws IOException, AutomationException
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.
refresh
in interface IARControl
refresh
in interface IARControlDefault
refreshNow
- The refreshNow (in, optional, pass false if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getCurrentViewType() throws IOException, AutomationException
Returns the type of CurrentView. If no document has been loaded esriARViewTypeNone will be returned.
getCurrentViewType
in interface IARControl
getCurrentViewType
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IARConfiguration getARConfiguration() throws IOException, AutomationException
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.
getARConfiguration
in interface IARControl
getARConfiguration
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setARConfigurationByRef(IARConfiguration ppConfiguration) throws IOException, AutomationException
setARConfigurationByRef
in interface IARControl
setARConfigurationByRef
in interface IARControlDefault
ppConfiguration
- A reference to a com.esri.arcgis.controls.IARConfiguration (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IARUnitConverter getARUnitConverter() throws IOException, AutomationException
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.
getARUnitConverter
in interface IARControl
getARUnitConverter
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getDocumentFilename() throws IOException, AutomationException
Returns the file name of the currently loaded document.
getDocumentFilename
in interface IARControl
getDocumentFilename
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setDocumentFilename(String bsFilename) throws IOException, AutomationException
setDocumentFilename
in interface IARControl
setDocumentFilename
in interface IARControlDefault
bsFilename
- The bsFilename (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean checkDocument(String sFilename) throws IOException, AutomationException
Determines whether the specified Published Map File (*.pmf) is a valid file and was published with permission to load into the ArcReaderControl.
checkDocument
in interface IARControl
checkDocument
in interface IARControlDefault
sFilename
- The sFilename (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IARCommandInfo getARCommandInfo(int tool) throws IOException, AutomationException
getARCommandInfo
in interface IARControl
getARCommandInfo
in interface IARControlDefault
tool
- A com.esri.arcgis.controls.esriARTool constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void exportView(int format, String sFilename) throws IOException, AutomationException
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.
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.
exportView
in interface IARControl
exportView
in interface IARControlDefault
format
- A com.esri.arcgis.controls.esriARExportFormat constant (in)sFilename
- The sFilename (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setEnableFileDrop(boolean pvbValue) throws IOException, AutomationException
setEnableFileDrop
in interface IARControl
setEnableFileDrop
in interface IARControlDefault
pvbValue
- The pvbValue (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isEnableFileDrop() throws IOException, AutomationException
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.
isEnableFileDrop
in interface IARControl
isEnableFileDrop
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getCustomProperty() throws IOException, AutomationException
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.
getCustomProperty
in interface IARControl
getCustomProperty
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setCustomProperty(Object pVal) throws IOException, AutomationException
setCustomProperty
in interface IARControl
setCustomProperty
in interface IARControlDefault
pVal
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getObject() throws IOException, AutomationException
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.
getObject
in interface IARControl
getObject
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getViewTop() throws IOException, AutomationException
The top of the CurrentView display area in pixels. This will always return 0.
getViewTop
in interface IARControl
getViewTop
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getViewLeft() throws IOException, AutomationException
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).
getViewLeft
in interface IARControl
getViewLeft
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getViewHeight() throws IOException, AutomationException
The height of the CurrentView display area in pixels.
getViewHeight
in interface IARControl
getViewHeight
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getViewWidth() throws IOException, AutomationException
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).
getViewWidth
in interface IARControl
getViewWidth
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isHasCustomARConfiguration() throws IOException, AutomationException
This property can be used to determine if the currently loaded document has been published with an embedded ArcReader Template File (ART).
isHasCustomARConfiguration
in interface IARControl
isHasCustomARConfiguration
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSwipeLayerByRef(IARLayer ppLayer) throws IOException, AutomationException
setSwipeLayerByRef
in interface IARControl
setSwipeLayerByRef
in interface IARControlDefault
ppLayer
- A reference to a com.esri.arcgis.controls.IARLayer (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IARLayer getSwipeLayer() throws IOException, AutomationException
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.
getSwipeLayer
in interface IARControl
getSwipeLayer
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getViewWindow() throws IOException, AutomationException
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.
getViewWindow
in interface IARControl
getViewWindow
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setMousePointer(int pcursor) throws IOException, AutomationException
setMousePointer
in interface IARControl
setMousePointer
in interface IARControlDefault
pcursor
- A com.esri.arcgis.controls.esriARMousePointer constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getMousePointer() throws IOException, AutomationException
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.
getMousePointer
in interface IARControl
getMousePointer
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IARLayer getSelectedARLayer() throws IOException, AutomationException
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.
getSelectedARLayer
in interface IARControl
getSelectedARLayer
in interface IARControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |