com.esri.arcgis.addins.desktop
Class Extension

java.lang.Object
  extended by com.esri.arcgis.addins.desktop.Extension

public abstract class Extension
extends java.lang.Object

Abstract base implementation of ArcMap extensions.

This class should be subclassed by clients wishing to define new ArcMap extensions. The name of the subclass should be given as the "class" attribute in a Extension extension contributed to the ArcGIS application framework

For example, the add-in's XML markup might contain:

    <Extensions>
          <Extension id="com.acme.addins.AcmeExtension" 
              class="com.acme.addins.AcmeExtension" 
              name="AcmeExtension" product="Acme Extension" 
              description="Acme Co Extension">
          </Extension>
      </Extensions>
 
where com.acme.addins.AcmeExtension is the name of the Extension subclass.

Subclasses must implement the following methods:

Subclasses may extend or reimplement the following methods as required:


Constructor Summary
Extension()
           
 
Method Summary
abstract  void init(IApplication app)
          Initializes this application extension with the ArcMap application instance it is hosted in.
 void shutdown()
          Called when ArcMap shuts down.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Extension

public Extension()
Method Detail

init

public abstract void init(IApplication app)
                   throws java.io.IOException,
                          AutomationException
Initializes this application extension with the ArcMap application instance it is hosted in.

This method is automatically called by the host ArcMap application. It marks the start of the extension's lifecycle. Clients must not call this method.

Parameters:
app - is a reference to ArcMap's IApplication interface
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

shutdown

public void shutdown()
              throws java.io.IOException,
                     AutomationException
Called when ArcMap shuts down.

This is the last method called on the Extension.

Within this method an extension may release any resources, fonts, images, etc.  held by it.

Clients should not call this method (the framework calls this method at appropriate times).

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