com.esri.arcgis.controls
Interface IARControlEvents

All Superinterfaces:
EventListener, Serializable
All Known Implementing Classes:
IARControlEventsAdapter, IARControlEventsProxy

public interface IARControlEvents
extends EventListener, Serializable

Provides access to events that occur with interaction to the control.

Description

IARControlEvents is the main events interface for the ArcReaderControl. Generally there is no need to explicitly set event handlers, as most development environments will automatically provide event handlers. These events allow you to programmatically listen out for specific things happening inside of the ArcReaderControl such as the mouse being pressed down, or the CurrentView display being refreshed.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.


Method Summary
 void onAction(IARControlEventsOnActionEvent theEvent)
          Fires when an action takes place.
 void onAfterScreenDraw(IARControlEventsOnAfterScreenDrawEvent theEvent)
          Fires after the current map or page layout view redraws.
 void onBeforeScreenDraw(IARControlEventsOnBeforeScreenDrawEvent theEvent)
          Fires before the current map or page layout view redraws.
 void onCurrentViewChanged(IARControlEventsOnCurrentViewChangedEvent theEvent)
          Fires when the current view type is changed.
 void onDocumentLoaded(IARControlEventsOnDocumentLoadedEvent theEvent)
          Fires when a document is loaded into the control.
 void onDocumentUnloaded(IARControlEventsOnDocumentUnloadedEvent theEvent)
          Fires when a document is unloaded from the control.
 void onDoubleClick(IARControlEventsOnDoubleClickEvent theEvent)
          Fires when the user presses and releases any mouse button twice in quick succession, while over the current map or page layout view.
 void onFocusARMapChanged(IARControlEventsOnFocusARMapChangedEvent theEvent)
          Fires when the current focus map is changed to a new map.
 void onKeyDown(IARControlEventsOnKeyDownEvent theEvent)
          Fires after a key is pressed on the keyboard whilst the current map or page layout view has focus.
 void onKeyUp(IARControlEventsOnKeyUpEvent theEvent)
          Fires after a pressed key is released on the keyboard whilst the current map or page layout view has focus.
 void onMouseDown(IARControlEventsOnMouseDownEvent theEvent)
          Fires when the user presses any mouse button while over the current map or page layout view.
 void onMouseMove(IARControlEventsOnMouseMoveEvent theEvent)
          Fires when the user moves the mouse pointer over the current map or page layout view.
 void onMouseUp(IARControlEventsOnMouseUpEvent theEvent)
          Fires when the user releases any mouse button while over the current map or page layout view.
 

Method Detail

onMouseDown

void onMouseDown(IARControlEventsOnMouseDownEvent theEvent)
                 throws IOException,
                        AutomationException
Fires when the user presses any mouse button while over the current map or page layout view.

Description

The OnMouseDown event is triggered when the user presses a mouse button on the Map or PageLayout display area of the ArcReaderControl. Use the event to specify actions that will occur when a given mouse button is pressed.

button specifies which mouse button was pressed. 1 for the left mouse button, 2 for the right mouse button, and 4 for the middle mouse button.

shift specifies an integer corresponding to the state of the SHIFT (bit 0), CTRL (bit 1) and ALT (bit 2) keys. When none, some or all of these keys are pressed none, some or all the bits get set. These bits correspond to the values 1, 2, and 4, respectively. For example, if both SHIFT and ALT were pressed, ShiftState would return 5.

x is the X coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the CurrentView (the top left hand corner). x coordinates increase from left to right.

y is the Y coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the ArcReaderControl (the top left hand corner). y coordinates increase from top to bottom.

To find the origin of the CurrentView use ViewLeft and ViewTop properties. To convert x and y coorindates in pixels to map units and page units use the IARMap::ToMapPoint or IARPageLayout::ToPagePoint methods.

Remarks

Use the win32 SetCapture function to continue receiving mouse events (until the mouse is released) when the mouse is moved outside the control's display area. The win32 ReleaseCapture function releases the mouse.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

onBeforeScreenDraw

void onBeforeScreenDraw(IARControlEventsOnBeforeScreenDrawEvent theEvent)
                        throws IOException,
                               AutomationException
Fires before the current map or page layout view redraws.

Description

OnBeforeScreenDraw event corresponds to a Windows paint event and is triggered before the drawing of the CurrentView is started. The following are examples of when drawing occurs in the CurrentView:

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

onAfterScreenDraw

void onAfterScreenDraw(IARControlEventsOnAfterScreenDrawEvent theEvent)
                       throws IOException,
                              AutomationException
Fires after the current map or page layout view redraws.

Description

OnAfterScreenDraw event corresponds to a Windows paint event and is triggered when the drawing of the CurrentView is completed. The following are examples of when drawing occurs in the CurrentView:

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

onDocumentLoaded

void onDocumentLoaded(IARControlEventsOnDocumentLoadedEvent theEvent)
                      throws IOException,
                             AutomationException
Fires when a document is loaded into the control.

Description

The OnDocumentLoaded event is triggered whenever a document is loaded into the ArcReaderControl using the LoadDocument or ReloadDocument methods. It provides a mechanism for keeping track of the path and filename of the currently loaded document.

sDocument specifies the DocumentFilename of the currently loaded Published Map File.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

onDocumentUnloaded

void onDocumentUnloaded(IARControlEventsOnDocumentUnloadedEvent theEvent)
                        throws IOException,
                               AutomationException
Fires when a document is unloaded from the control.

Description

The OnDocumentUnloaded event is triggered whenever a document is unloaded from the ArcReaderControl using the UnloadDocument or ReloadDocument methods.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

onFocusARMapChanged

void onFocusARMapChanged(IARControlEventsOnFocusARMapChangedEvent theEvent)
                         throws IOException,
                                AutomationException
Fires when the current focus map is changed to a new map.

Description

The OnFocusARMapChanged event is triggered whenever a new ARMap is made the IARPageLayout::FocusARMap. A number of situations may cause the focus map to change:

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

onCurrentViewChanged

void onCurrentViewChanged(IARControlEventsOnCurrentViewChangedEvent theEvent)
                          throws IOException,
                                 AutomationException
Fires when the current view type is changed.

Description

The OnCurrentViewChanged event is triggered whenever the CurrentView is changed, such as when the LoadDocument, ReloadDocument, UnloadDocument methods are used or when the CurrentView property is explicitly changed or when the user interactively toggles the view.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

onMouseUp

void onMouseUp(IARControlEventsOnMouseUpEvent theEvent)
               throws IOException,
                      AutomationException
Fires when the user releases any mouse button while over the current map or page layout view.

Description

The OnMouseUp event is triggered when the user releases a mouse button on the Map or PageLayout display area of the ArcReaderControl. Use the event to specify actions that will occur when a given mouse button is released.

button specifies which mouse button was pressed. 1 for the left mouse button, 2 for the right mouse button, and 4 for the middle mouse button.

shift specifies an integer corresponding to the state of the SHIFT (bit 0), CTRL (bit 1) and ALT (bit 2) keys. When none, some or all of these keys are pressed none, some or all the bits get set. These bits correspond to the values 1, 2, and 4, respectively. For example, if both SHIFT and ALT were pressed, ShiftState would return 5.

x is the X coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the CurrentView (the top left hand corner). x coordinates increase from left to right.

y is the Y coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the ArcReaderControl (the top left hand corner). y coordinates increase from top to bottom.

To find the origin of the CurrentView use ViewLeft and ViewTop properties. To convert x and y coordinates in pixels to map units and page units use the IARMap::ToMapPoint or IARPageLayout::ToPagePoint methods.

Remarks

Use the win32 SetCapture function to continue receiving mouse events (until the mouse is released) when the mouse is moved outside the control's display area. The win32 ReleaseCapture function releases the mouse.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

onMouseMove

void onMouseMove(IARControlEventsOnMouseMoveEvent theEvent)
                 throws IOException,
                        AutomationException
Fires when the user moves the mouse pointer over the current map or page layout view.

Description

The OnMouseMove event is triggered continually as the mouse moves over the Map or PageLayout display area of the ArcReaderControl.

button specifies which mouse button was pressed. 1 for the left mouse button, 2 for the right mouse button, and 4 for the middle mouse button.

shift specifies an integer corresponding to the state of the SHIFT (bit 0), CTRL (bit 1) and ALT (bit 2) keys. When none, some or all of these keys are pressed none, some or all the bits get set. These bits correspond to the values 1, 2, and 4, respectively. For example, if both SHIFT and ALT were pressed, ShiftState would return 5.

x is the X coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the CurrentView (the top left hand corner). x coordinates increase from left to right.

y is the Y coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the ArcReaderControl (the top left hand corner). y coordinates increase from top to bottom.

To find the origin of the CurrentView use ViewLeft and ViewTop properties. To convert x and y coordinates in pixels to map units and page units use the IARMap::ToMapPoint or IARPageLayout::ToPagePoint methods.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

onDoubleClick

void onDoubleClick(IARControlEventsOnDoubleClickEvent theEvent)
                   throws IOException,
                          AutomationException
Fires when the user presses and releases any mouse button twice in quick succession, while over the current map or page layout view.

Description

button specifies which mouse button was pressed. 1 for the left mouse button, 2 for the right mouse button, and 4 for the middle mouse button.

shift specifies an integer corresponding to the state of the SHIFT (bit 0), CTRL (bit 1) and ALT (bit 2) keys. When none, some or all of these keys are pressed none, some or all the bits get set. These bits correspond to the values 1, 2, and 4, respectively. For example, if both SHIFT and ALT were pressed, ShiftState would return 5.

x is the X coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the CurrentView (the top left hand corner). x coordinates increase from left to right.

y is the Y coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the ArcReaderControl (the top left hand corner). y coordinates increase from top to bottom.

To find the origin of the CurrentView use ViewLeft and ViewTop properties. To convert x and y coordinates in pixels to map units and page units use the IARMap::ToMapPoint or IARPageLayout::ToPagePoint methods.

Remarks

The OnDoubleClick event is triggered when the user releases and presses a mouse button and then presses and releases it again on the Map or PageLayout display area of the ArcReaderControl. If the double click does not occur within the system's double click time limit, the ArcReaderControl will recognise another OnMouseDown event. Otherwise the event sequence is as follows:

OnMouseDown
OnMouseUp
OnDoubleClick
OnMouseUp

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

onKeyDown

void onKeyDown(IARControlEventsOnKeyDownEvent theEvent)
               throws IOException,
                      AutomationException
Fires after a key is pressed on the keyboard whilst the current map or page layout view has focus.

Description

The OnKeyDown event is triggered when the user presses a key whilst the Map or PageLayout display area of the ArcReaderControl has focus.

keyCode specifies a virtual key code value of the key pressed on the keyboard. For alpha-numeric keys this corresponds to the ASCII value, for example "A" key returns 65 which is the ASCII value for capital A. Other key codes are F1 to F12 are 112 to 123 respectively.

Shift specifies an integer corresponding to the state of the SHIFT (bit 0), CTRL (bit 1) and ALT (bit 2) keys. When none, some or all of these keys are pressed none, some or all the bits get set. These bits correspond to the values 1, 2, and 4, respectively. For example, if both SHIFT and ALT were pressed, Shift would return 5.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

onKeyUp

void onKeyUp(IARControlEventsOnKeyUpEvent theEvent)
             throws IOException,
                    AutomationException
Fires after a pressed key is released on the keyboard whilst the current map or page layout view has focus.

Description

The OnKeyUp event is triggered when the user releases a key whilst the Map or PageLayout display area of the ArcReaderControl has focus.

keyCode specifies a virtual key code value of the key pressed on the keyboard. For alpha-numeric keys this corresponds to the ASCII value, for example "A" key returns 65 which is the ASCII value for capital A. Other key codes are F1 to F12 are 112 to 123 respectively.

Shift specifies an integer corresponding to the state of the SHIFT (bit 0), CTRL (bit 1) and ALT (bit 2) keys. When none, some or all of these keys are pressed none, some or all the bits get set. These bits correspond to the values 1, 2, and 4, respectively. For example, if both SHIFT and ALT were pressed, Shift would return 5.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

onAction

void onAction(IARControlEventsOnActionEvent theEvent)
              throws IOException,
                     AutomationException
Fires when an action takes place.

Description

The OnAction event triggers before an action occurs with the ArcReaderControl, and provides you with a mechanism for suppressing the action from taking place or customising the action that will take place. For example, by default any hyperlinks that are accessed when the CurrentARTool is the esriARToolMapHyperlinks tool open in the systems default browser. You may want to suppress this default action and open the hyperlinks in a web browser control.

action indicates the type of action taking place.

data supplied as part of the action.

suppressAction specifies a boolean indicating whether the default action will be suppressed. By default the action will not be suppressed

Remarks

esriARActionMapProperties: Occurs when the user right clicks on a map in the Table of Contents (TOC) and chooses properties from the drop down context menu. The data passed to the event is an ARMap .

esriARActionLayerProperties: Occurs when the user right clicks on a layer in the Table of Contents (TOC) and chooses properties ffrom the drop down context menu. The data passed to the event is an ARLayer.

esriARActionHyperlink: Occurs when the user accesses a hyperlink, either through the CurrentARTool when it is set to the esriARToolMapHyperlink tool, or when accessing hyperlinks through the identify dialog when the CurrentARTool is the esriARToolMapIdentify tool. The data passed to the event is a string representing the URL of the hyperlink.

esriARActionIdentify: Occurs when the CurrentARTool is the esriARToolMapIdentify tool and is used on the CurrentView. The data passed to the event is an array or map coordinates. In the mouse down event of the tool, the array consists of an x and y coordinate. In the mouse up event of the tool, the array consists of the starting x and y coordinates and the finishing x and y coordinates. These four coordinates will be different is the user has tracked a rectangle with the tool. If the user has clicked a point these coordinates will be duplicated.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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