init() methodWhen working with one of the ArcGIS Desktop applications it is quite possible that you might need to access various items within the applications. For example, in ArcMap you might wish to access the map (that is, data frame) or layers contained within a map. Your Java application cannot just instantiate an instance of the ArcMap application; instead you are passed a reference to an object that will give you the application that the tool is contained within. The init() method serves this purpose as well as defining any logic that is necessary to initialize your tool (for example: instantiate objects that are needed in your mousePressed() method as one example).
Initializes this button with the ArcGIS application it is hosted in. This method is automatically called by the host ArcGIS application when the button is initialized. It marks the start of the button's lifecycle. Clients must not call this method.
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.