Draw graphic elements on map

This sample demonstrates how to create a toolbar palette of drawing tools and graphic elements on a map. The palette is accessed from the ToolbarBean or by right-clicking the PageLayoutBean.
The addItem method is used in setBuddyControlAndTools to add new items to the ToolbarBean with their style set. In the PageLayoutBean OnMouseDown event, the popupPalette method is used to display the ToolbarPalette when the right mouse button is pressed.

How to use

See How to use ArcGIS samples for help on running the sample.

  1. Run the DrawGraphicElementsOnMap application.
  2. Click the palette, select a graphic element, and draw it on the map by clicking and dragging the mouse.

If you installed the samples feature, you will find the files associated with this sample in <Your Developer Kit install location>\DeveloperKit10.4\Java\Samples\ArcObjects.

toolbarbean/DrawGraphicElementsOnMap.java Main class

Development licensing Deployment licensing
Engine Developer Kit Engine
ArcGIS for Desktop Basic
ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced