Getting started with the ToolbarControl property editor
Do the following to get started with the ToolbarControl property editor:
- Design a new ArcGIS Engine project in the Eclipse IDE using the ToolbarControl (for more information, see How to build an application in Eclipse using visual beans). The following screen shot shows an example JFrame in design mode:
- Right-click the ESRI ToolbarControl and click Customize Java Bean; the Java Property Editor dialog box appears. The visual properties of the ToolbarControl, such as Border Style, Appearance, and Mouse Pointer can be set using the Java Property Editor. See the following screen shot:
- On the preceding Java Property Editor dialog box, click the General tab. The following table explains the other areas that can be selected under the General tab:LabelsToolbarControl methodsDescriptionDefault valueEnabledIndicates whether the ToolbarControl can respond to user generated events.TrueArrow Key InterceptA property that specifies interception of key strokes that are normally handled by the container. When intercepted, the OnKeyDown and OnKeyUp events will be called.0
- The Java Property Editor dialog box is also used to add command items to the ToolbarControl during design time. Do the following to set the properties on the Java Property Editor dialog box for the ToolbarControl:
- Click the Items tab on the Java Property Editor dialog box. See the following screen shot:
- Click Add on the preceding Java Property Editor dialog box; the Controls Commands dialog box appears. The Controls Commands dialog box shows a Commands tab, which lists out-of-the-box standard categories and commands. See the following screen shot:
- On the preceding Controls Commands dialog box, click the appropriate command or commands, then click Add Command. Click Close after the command items are added; the commands are added to the Java Property Editor dialog box under the Items tab. See the following screen shot:
- The Remove All button on the preceding Java Property Editor dialog box removes all added command items together. Other properties of the ToolbarControl, such as Item Appearance, Text Alignment, and Update Interval can be set. Update interval determines the frequency in milliseconds in which the update method is called on the ToolbarControl. The following table explains the other areas that can be selected under the Items tab:LabelToolbarControl methodsDescriptionDefault valueLarge IconShows large icons for all items on the ToolbarControl.FalseTooltipsShows ToolTips.TrueMenuTrackingEnables menu tracking on the ToolbarControl.False
-
Right-click a command item to delete or modify individual commands, such as the following Style and Begin Group:
-
Style determines how command items show on the toolbar, such as Text Only (command name), Image Only (command icon), or Image and Text (command icon and name). By default, the Style property is set to Image Only.
-
Begin Group determines if a separator shows before the command item. By default, the Begin Group Property is set to false.
See the following screen shot: - Alternatively, properties, such as the BuddyControl can also be modified using the Properties window in the Eclipse IDE. Click the BuddyControl property on the Properties window and choose the appropriate buddy from the drop-down list under the Value column. The buddy can be a globe, scene, page layout, or map bean. See the following screen shot:
- Similarly, command items of the ToolbarControl can also be added using the Properties window in the Eclipse IDE. Click the Ellipses (…) button under the Value column for the ItemsString property to add command items to the toolbar. See the following screen shot:
The TOCControl properties can be modified using the Java Property Editor and Properties window in the Eclipse IDE.
See Also:
ToolbarControl classToolbar control overview
How to build an application in Eclipse using visual beans
Development licensing | Deployment licensing |
---|---|
Engine Developer Kit | Engine Runtime |
ArcView | |
ArcEditor | |
ArcInfo |