A menu item is a line of a menu that has an associated action. In this example, we will add a menu item in the first position of the "Window" menu. The action associated with this menu item will be a warning dialog box.
The creation of a menu item requires one INT module that is part of the INTViewer platform:
See the list of INTViewer modules to load the INTViewer platform and for a description of each module.
This requires the import of com.interactive.intviewerapi.util.DialogManager. You can download the DemoMenuItemAction.java file from the attachments at the bottom this page.
More details about dialog boxes are available.
Modify the layer.xml file as follow:
In this layer.xml file:
You can download the layer.xml file from the attachments at the bottom this page.
Click the green arrow in the Netbeans toolbar to run your customized INTViewer. Your menu item should be available from the Window menu:
When clicked, this menu item should display this dialog box: