com.esri.arcgis.controls
Class ControlsMapZoomToolControl

java.lang.Object
  extended by com.esri.arcgis.controls.ControlsMapZoomToolControl
All Implemented Interfaces:
IActiveViewEvents, ITransformEvents, com.esri.arcgis.interop.RemoteObjRef, ICommand, IToolControl, Serializable, EventListener

public class ControlsMapZoomToolControl
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ICommand, IToolControl, IActiveViewEvents, ITransformEvents

Zooms the map by a particular percentage.

Description

The CLSID of this command is: {0F808A33-6E83-422B-9C0C-78534560EC84}.

This command works with the ToolbarControl, PageLayoutControl, MapControl and ArcMap.

Product Availability

Available with ArcGIS Engine.

See Also:
Serialized Form

Constructor Summary
ControlsMapZoomToolControl()
          Constructs a ControlsMapZoomToolControl using ArcGIS Engine.
ControlsMapZoomToolControl(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
ControlsMapZoomToolControl theControlsMapZoomToolControl = (ControlsMapZoomToolControl) obj;
 
Method Summary
 void afterDraw(IActiveViewEventsAfterDrawEvent theEvent)
          Fired after the specified phase is drawn.
 void afterItemDraw(IActiveViewEventsAfterItemDrawEvent theEvent)
          Fired after an individual view item is drawn.
 void boundsUpdated(ITransformEventsBoundsUpdatedEvent theEvent)
          Notifies clients when the bounds is updated.
 void contentsChanged(IActiveViewEventsContentsChangedEvent theEvent)
          Fired when the contents of the view changes.
 void contentsCleared(IActiveViewEventsContentsClearedEvent theEvent)
          Fired when the contents of the view is cleared.
 void deviceFrameUpdated(ITransformEventsDeviceFrameUpdatedEvent theEvent)
          Notifies clients when the device frame is updated.
 boolean equals(Object o)
          Compare this object with another
 void focusMapChanged(IActiveViewEventsFocusMapChangedEvent theEvent)
          Fired when a new map is made active.
 int getBitmap()
          The bitmap that is used as the icon on this command.
 String getCaption()
          The caption of this command.
 String getCategory()
          The name of the category with which this command is associated.
static String getClsid()
          getClsid.
 int getHelpContextID()
          The help context ID associated with this command.
 String getHelpFile()
          The name of the help file associated with this command.
 int getHWnd()
          The handle of the control.
 String getMessage()
          The statusbar message for this command.
 String getName()
          The name of this commmand.
 String getTooltip()
          The tooltip for this command.
 int hashCode()
          the hashcode for this object
 boolean isChecked()
          Indicates if this command is checked.
 boolean isEnabled()
          Indicates if this command is enabled.
 void itemAdded(IActiveViewEventsItemAddedEvent theEvent)
          Fired when an item is added to the view.
 void itemDeleted(IActiveViewEventsItemDeletedEvent theEvent)
          Fired when an item is deleted from the view.
 void itemReordered(IActiveViewEventsItemReorderedEvent theEvent)
          Fired when a view item is reordered.
 void onClick()
          Occurs when this command is clicked.
 void onCreate(Object hook)
          Occurs when this command is created.
 boolean onDrop(int barType)
          Indicates if the drag-drop operation is valid.
 void onFocus(ICompletionNotify complete)
          Occurs when the control gains focus.
 void resolutionUpdated(ITransformEventsResolutionUpdatedEvent theEvent)
          Notifies clients when the resolution is updated.
 void rotationUpdated(ITransformEventsRotationUpdatedEvent theEvent)
          Notifies clients when the rotation angle is updated.
 void selectionChanged(IActiveViewEventsSelectionChangedEvent theEvent)
          Call this function to fire the selection changed event.
 void spatialReferenceChanged(IActiveViewEventsSpatialReferenceChangedEvent theEvent)
          Fired when the spatial reference is changed.
 void unitsUpdated(ITransformEventsUnitsUpdatedEvent theEvent)
          Notifies clients when the units are updated.
 void viewRefreshed(IActiveViewEventsViewRefreshedEvent theEvent)
          Fired when view is refreshed before draw happens.
 void visibleBoundsUpdated(ITransformEventsVisibleBoundsUpdatedEvent theEvent)
          Notifies clients when the visible bounds is updated.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

ControlsMapZoomToolControl

public ControlsMapZoomToolControl()
                           throws IOException,
                                  UnknownHostException
Constructs a ControlsMapZoomToolControl using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

ControlsMapZoomToolControl

public ControlsMapZoomToolControl(Object obj)
                           throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
ControlsMapZoomToolControl theControlsMapZoomToolControl = (ControlsMapZoomToolControl) obj;

Construct a ControlsMapZoomToolControl using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to ControlsMapZoomToolControl.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

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

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

isEnabled

public boolean isEnabled()
                  throws IOException,
                         AutomationException
Indicates if this command is enabled.

Remarks

When implementing ICommand to create a custom command, add some logic to the Enabled property to specify in what state the application should be in for the command to be enabled.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isEnabled in interface ICommand
Returns:
The enabled
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isChecked

public boolean isChecked()
                  throws IOException,
                         AutomationException
Indicates if this command is checked.

Remarks

The Checked property indicates the state of this Command. If a command item appears depressed on a commandbar, the command is checked. The active tool will appear checked. Also commands that serve as a toggle will be checked when that toggle is on.
A system event is periodically called to set the state of the commands on the commandbars indicating which ones are checked.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isChecked in interface ICommand
Returns:
The checked
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getName

public String getName()
               throws IOException,
                      AutomationException
The name of this commmand.

Remarks

The Name property of a command is a programmatic identifying name string. By convention, a command's name should include its category name. The format of the Name string should be <Category>_<Caption>. For example, the name of the builtin ArcMap command About ArcMap is "Help_About". Since it is an identifier of the command, the Name property should not be localized.

When implementing ICommand to create a custom command, use the Name property to set the internal name of this command.

Note, the Caption property of a command is the string that appears when the command is placed on a command bar.

Example:

 

public String getName () {
     return "MyCustomTool_MyTool";
}

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getName in interface ICommand
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCaption

public String getCaption()
                  throws IOException,
                         AutomationException
The caption of this command.

Remarks

The Caption property of a command is the string that appears when the command is placed on a command bar.

When implementing ICommand to create a custom command, use the Caption property to set the caption of the command.

Example:

public String getCaption() {
     return "MyTool";
}

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getCaption in interface ICommand
Returns:
The caption
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTooltip

public String getTooltip()
                  throws IOException,
                         AutomationException
The tooltip for this command.

Remarks

When implementing ICommand to create a custom command, use the ToolTip property to set the string that appears in the screen tip when the mouse hovers over the command.

Example:

public String getTooltip () {
    return "MyTool";
}

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getTooltip in interface ICommand
Returns:
The tooltip
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMessage

public String getMessage()
                  throws IOException,
                         AutomationException
The statusbar message for this command.

Remarks

When implementing ICommand to create a custom command, use the Message property to set the message string that appears in the statusbar of the application when the mouse passes over the command.

Example:

public String getMessage() {
     return "This is my custom tool";
}

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getMessage in interface ICommand
Returns:
The message
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getHelpFile

public String getHelpFile()
                   throws IOException,
                          AutomationException
The name of the help file associated with this command.

Description

The HelpFile property is used to specify the name of the help file that contains the context sensitive help topic for your custom command.

Remarks

If you set both the HelpFile and HelpContextID properties, then an end-user of your command can use the "What's This?" command in ArcMap or ArcCatalog to get help on your command. Note, if you want your What's This help to look and behave the same as the standard ArcGIS commands, then you should create a WinHelp file instead of a HTMLHelp file.

If you have a WinHelp file (*.hlp), set ICommand_HelpFile to the name of the help file containing the topic that describes the command and set ICommand_HelpContextID to the topic ID's mapped numeric value. The topic ID is the so-called # footnote in the RTF file you include in your WinHelp file. You can use Help Workshop to add this numeric value by opening the HPJ file, clicking Map and then clicking Add (to add the mapping for an individual topic). See the help topic "To enable a program to display an individual Help topic" in the Help Workshop's help file.

If you have an HTMLHelp file (*.chm) the procedure is similar; specifiy the .chm file as ICommand_HelpFile and the mapped numeric value as ICommand_HelpContextID. Popup topics are problematic with HTMLHelp, but the help topic will display in a default or user-defined window.

As part of your deployment strategy register the name of the WinHelp file (*.hlp) as a new string value in:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help

Or if you're working with a HTMLHelp file (*.chm) register its name as a new string value in:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\HTMLHelp.

Note, if you want to create a custom command that launches your help system, you can call an entire help file and/or use the functionality of the appropriate Help APIs by declaring and using the Windows API WinHelp() function or HTMLHelp() function.

Once you have one of these help functions declared, the OnClick event of your command could call the help function.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getHelpFile in interface ICommand
Returns:
The helpFile
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ICommand.getHelpContextID()

getHelpContextID

public int getHelpContextID()
                     throws IOException,
                            AutomationException
The help context ID associated with this command.

Description

The HelpContextID property is used to specify the mapped numeric value of the topic ID of the context sensitive help topic for your custom command. Specify the name of your help file in the HelpFile property.

Remarks

If you set both the HelpFile and HelpContextID properties, then an end-user of your command can use the "What's This?" command in ArcMap or ArcCatalog to get help on your command. Note, if you want your What's This help to look and behave the same as the standard ArcGIS commands, then you should create a WinHelp file instead of a HTMLHelp file.

If you have a WinHelp file (*.hlp), set ICommand_HelpFile to the name of the help file containing the topic that describes the command and set ICommand_HelpContextID to the topic ID's mapped numeric value. The topic ID is the so-called # footnote in the RTF file you include in your WinHelp file. You can use Help Workshop to add this numeric value by opening the HPJ file, clicking Map and then clicking Add (to add the mapping for an individual topic). See the help topic "To enable a program to display an individual Help topic" in the Help Workshop's help file.

If you have an HTMLHelp file (*.chm) the procedure is similar; specifiy the
.chm file as ICommand_HelpFile and the mapped numeric value as
ICommand_HelpContextID. Popup topics are problematic with HTMLHelp, but the help topic will display in a default or user-defined window.

As part of your deployment strategy register the name of the WinHelp file (*.hlp) as a new string value in:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Help

Or if you're working with a HTMLHelp file (*.chm) register its name as a new string value in:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\HTMLHelp.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getHelpContextID in interface ICommand
Returns:
The helpID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ICommand.getHelpFile()

getBitmap

public int getBitmap()
              throws IOException,
                     AutomationException
The bitmap that is used as the icon on this command.

Remarks

When implementing ICommand to create a custom command, use the Bitmap property to set the bitmap to be used as the icon on this command. In your Visual Basic project for this command, the bitmap can be stored in a resource file or in a PictureBox control on a form.

You must use a Bitmap file (.bmp) for the Bitmap property; Icon files (.ico) are not supported. Bitmap files should be 16 X 16 pixels. The color of the upper left pixel of the bitmap is treated as the transparent color. For example, if the upper left pixel of the bitmap is red, then all of the red pixels in the bitmap will be converted to transparent.

When a command is put on a toolbar, the command is displayed with the bitmap only by default; the display type is set to Image Only (ICommandItem::Style = esriCommandStyleIconOnly). When a command is put on a menu, the command is displayed with the bitmap and caption by default; the display type is set to Image and Text (ICommandItem::Style = esriCommandStyleIconAndText). However, if the Bitmap property is not set for this command, then the command will be displayed with the caption only by default when it is put on a toolbar or menu; the display type is set to Text Only (ICommandItem::Style = esriCommandStyleTextOnly).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

When implementing ICommand to create a custom command, there is no need to implement this method. In the custom Java Command class, set the bitmapPath String to the physical location of the bitmap file to be used on the toolbar.

bitmapPath = "/images/mybitmap.bmp";

You must use a Bitmap file (.bmp); Icon files (.ico) are not supported. Bitmap files should be 16 X 16 pixels. The color of the upper left pixel of the bitmap is treated as the transparent color. For example, if the upper left pixel of the bitmap is red, then all of the red pixels in the bitmap will be converted to transparent.

When a command is put on a toolbar, the command is displayed with the bitmap only by default; the display type is set to Image Only (esriCommandStyles.esriCommandStyleIconOnly). When a command is put on a menu, the command is displayed with the bitmap and caption by default; the display type is set to Image and Text (esriCommandStyles.esriCommandStyleIconAndText). However, if the Bitmap property is not set for this command, then the command will be displayed with the caption only by default when it is put on a toolbar or menu; the display type is set to Text Only (esriCommandStyles.esriCommandStyleTextOnly).

Specified by:
getBitmap in interface ICommand
Returns:
The bitmap (A COM typedef)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCategory

public String getCategory()
                   throws IOException,
                          AutomationException
The name of the category with which this command is associated.

Remarks

Category determines where the command will appear in the Commands panel of the Customize dialog.

When implementing ICommand to create a custom command, use the Category property to set the category of this command.

Example:

public String getCategory() {
   return "MyCustomTool";
}

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getCategory in interface ICommand
Returns:
The categoryName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onCreate

public void onCreate(Object hook)
              throws IOException,
                     AutomationException
Occurs when this command is created.

Description

hook is a reference to an IApplication object or any of the Controls.

Remarks

The OnCreate method gives the command a hook into the application.

When implementing ICommand to create a custom command, use the OnCreate method to get a hook to the application.

When you implement ICommand to create a custom command, you will find that your class constructor and destructor are called more than once per session. Commands are constructed once initially to get information about them, like the name, bitmap, etc and then they are destroyed. When the final, complete construction takes place, the OnCreate method gets called. OnCreate gets called only once, so you can rely on it to perform initialization of member variables. You can check for initialized member variables in the class destructor to find out if OnCreate has been called previously.

Example:

Object buddyControl = null;

MapControl mapControl = null; 
 
//If your buddy control is of type mapcontrol
 
public void onCreate(Object hook) {
      try { 
      // The hook argument is an instance of control to which this tool is added. 
      // Normally toolbar control.          
      ToolbarControl toolbarControl = new ToolbarControl(hook); 
      //Get the buddy control to which the toolbarcontrol is associated to.         
      buddyControl = toolbarControl.getBuddy();
      mapControl = new MapControl(buddyControl);
       }
      catch (IOException ex) {
      }
}

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
onCreate in interface ICommand
Parameters:
hook - A reference to another Automation Object (IDispatch) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IApplication

onClick

public void onClick()
             throws IOException,
                    AutomationException
Occurs when this command is clicked.

Remarks

When implementing ICommand to create a custom command, write the code that performs the action when the command is clicked in the OnClick method.

Example:

public void onClick() {     
   //In this example, a message is displayed in console.     
   System.out.println("Clicked on my command");
}

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

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

getHWnd

public int getHWnd()
            throws IOException,
                   AutomationException
The handle of the control.

Remarks

When implementing IToolControl to create a custom tool, use the hWnd property to pass window handle of the control to the application.

For example, if you want your ToolControl to be a simple ComboBox control, put a ComboBox control on a form and then pass the hWnd of the ComboBox control to the ToolControl. If you want you ToolControl to be more complex such as a ComboBox with a label, you can put the ComboBox and Label in a Frame control or PictureBox control, and then pass the hWnd of the Frame or PictureBox to the ToolControl.

Only one instance of a ToolControl can exist within an application framework at any give time. This
is because the hWnd property is passed a window handle to the control. To prevent a user from dragging two instances of a ToolControl into an application framework set the ICommand::Category property to an empty string. This will prevent the ToolControl from appearing in the customzie dialog.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

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

onFocus

public void onFocus(ICompletionNotify complete)
             throws IOException,
                    AutomationException
Occurs when the control gains focus.

Description

complete is a reference to a ICompletionNotify object. The ToolControl object uses this complete object to indicate when it's finished.

Remarks

When the ToolControl object gains focus, an ICompletionNotify object is passed to the ToolControl as the complete parameter in the OnFocus method. In your code in the OnFocus method, you would set a variable to the complete object.

The ToolControl needs to call the ICompletionNotify::SetComplete method when it's finished to let the application know that the control should lose focus.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
onFocus in interface IToolControl
Parameters:
complete - A reference to a com.esri.arcgis.systemUI.ICompletionNotify (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ICompletionNotify

onDrop

public boolean onDrop(int barType)
               throws IOException,
                      AutomationException
Indicates if the drag-drop operation is valid.

Description

barType specifies which type of commandbar on which this ToolControl can be dropped. Use one of the esriCmdBarType constants.

Remarks

In most cases, a ToolControl should only be used on a toolbar.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
onDrop in interface IToolControl
Parameters:
barType - A com.esri.arcgis.systemUI.esriCmdBarType constant (in)
Returns:
The bValid
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
esriCmdBarType

contentsChanged

public void contentsChanged(IActiveViewEventsContentsChangedEvent theEvent)
                     throws IOException,
                            AutomationException
Fired when the contents of the view changes.

Remarks

The Map object fires this event when a new document is loaded. Adding a new layer to a Map does not trigger this event.

The PageLayout object fires the event when IGraphicsContainer::DeleteAllElements in called and when a new document is loaded.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
contentsChanged in interface IActiveViewEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IActiveView.contentsChanged()

contentsCleared

public void contentsCleared(IActiveViewEventsContentsClearedEvent theEvent)
                     throws IOException,
                            AutomationException
Fired when the contents of the view is cleared.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
contentsCleared in interface IActiveViewEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

itemAdded

public void itemAdded(IActiveViewEventsItemAddedEvent theEvent)
               throws IOException,
                      AutomationException
Fired when an item is added to the view.

Remarks

The Map fires the event every time a new layer is added.

The PageLayout fires this event whenever a new element is added to the layout. Elements include not only graphics but data frames as well.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
itemAdded in interface IActiveViewEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

itemDeleted

public void itemDeleted(IActiveViewEventsItemDeletedEvent theEvent)
                 throws IOException,
                        AutomationException
Fired when an item is deleted from the view.

Remarks

The PageLayout object fires this event whenever elements are deleted from the layout.

The Map object fires this event when a layer is removed.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
itemDeleted in interface IActiveViewEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

itemReordered

public void itemReordered(IActiveViewEventsItemReorderedEvent theEvent)
                   throws IOException,
                          AutomationException
Fired when a view item is reordered.

Remarks

The Map objects only fire this event whenever IMap::MoveLayer is called. In the ArcMap application, this occurs when you reorder layers in the table of contents. The Map will also fire this event when new layers are added.

The PageLayout object fires this event when changing the order of graphics. For example, IGraphicsContainer::BringToFront, PutElementOrder, SendToBack, SendBackward, and BringForward all fire this event. These functions are on ArcMap's Drawing menu under the Order pull right menu. Although the Map object is also a graphics container, it does not fire this event when its graphics are reordered.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
itemReordered in interface IActiveViewEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

selectionChanged

public void selectionChanged(IActiveViewEventsSelectionChangedEvent theEvent)
                      throws IOException,
                             AutomationException
Call this function to fire the selection changed event.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
selectionChanged in interface IActiveViewEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

viewRefreshed

public void viewRefreshed(IActiveViewEventsViewRefreshedEvent theEvent)
                   throws IOException,
                          AutomationException
Fired when view is refreshed before draw happens.

Description

Method that gets fired in response to IActiveView::Refresh and IActiveView::PartialRefresh.

Remarks

This event is useful in the case where you're watching for something to change in the view and there aren't any specific events for that change (e.g. ContentsChanged, ItemAdded). You can always listen for this method as a last resort. Care must be taken however to be very efficient in your implementation of this event because it will be called quite often.

The event parameters directly coincide with the arguments to IActiveView::PartialRefresh. For additional information about the arguments, see the help for that method.

If the event object connects to both the layout and a map, then the view parameter tells you which object initiated the event.

In an implementation of this method you typically want to check the phase and respond to only one. Otherwise, your code will execute multiple times per drawing sequence.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
viewRefreshed in interface IActiveViewEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

afterDraw

public void afterDraw(IActiveViewEventsAfterDrawEvent theEvent)
               throws IOException,
                      AutomationException
Fired after the specified phase is drawn.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
afterDraw in interface IActiveViewEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

afterItemDraw

public void afterItemDraw(IActiveViewEventsAfterItemDrawEvent theEvent)
                   throws IOException,
                          AutomationException
Fired after an individual view item is drawn. Example: view items include layers in a map or elements in a page layout.

Remarks

AfterItemDraw can be used to execute after each individual item has drawn. Event firing can be an expensive operation (time consuming) when there are many layers in a map, however. As a result, the AfterItemDraw event is only fired when the IViewManger::VerboseEvents property is set to True. By default this property is False.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
afterItemDraw in interface IActiveViewEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

focusMapChanged

public void focusMapChanged(IActiveViewEventsFocusMapChangedEvent theEvent)
                     throws IOException,
                            AutomationException
Fired when a new map is made active.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
focusMapChanged in interface IActiveViewEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

spatialReferenceChanged

public void spatialReferenceChanged(IActiveViewEventsSpatialReferenceChangedEvent theEvent)
                             throws IOException,
                                    AutomationException
Fired when the spatial reference is changed.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
spatialReferenceChanged in interface IActiveViewEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

boundsUpdated

public void boundsUpdated(ITransformEventsBoundsUpdatedEvent theEvent)
                   throws IOException,
                          AutomationException
Notifies clients when the bounds is updated.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
boundsUpdated in interface ITransformEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

visibleBoundsUpdated

public void visibleBoundsUpdated(ITransformEventsVisibleBoundsUpdatedEvent theEvent)
                          throws IOException,
                                 AutomationException
Notifies clients when the visible bounds is updated.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
visibleBoundsUpdated in interface ITransformEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deviceFrameUpdated

public void deviceFrameUpdated(ITransformEventsDeviceFrameUpdatedEvent theEvent)
                        throws IOException,
                               AutomationException
Notifies clients when the device frame is updated.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
deviceFrameUpdated in interface ITransformEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

resolutionUpdated

public void resolutionUpdated(ITransformEventsResolutionUpdatedEvent theEvent)
                       throws IOException,
                              AutomationException
Notifies clients when the resolution is updated.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
resolutionUpdated in interface ITransformEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

rotationUpdated

public void rotationUpdated(ITransformEventsRotationUpdatedEvent theEvent)
                     throws IOException,
                            AutomationException
Notifies clients when the rotation angle is updated.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
rotationUpdated in interface ITransformEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

unitsUpdated

public void unitsUpdated(ITransformEventsUnitsUpdatedEvent theEvent)
                  throws IOException,
                         AutomationException
Notifies clients when the units are updated.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
unitsUpdated in interface ITransformEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.