AppSubMenu

AppSubMenu is an abstract class, meaning that it will never be directly instantiated and all descendent classes will implement its methods. It is used as the ancestor for all submenu classes that are placed within the menu or toolbar through the MenuBarManager class described earlier. The code for the AppSubMenu class is shown in Figure 9-7.

The AppSubMenu class has two class variables defined that take the form of the getter naming style. But unlike those declared in the MenuBarManager class, these are declared as protected, as the descendent classes will need access to them.

The {constructor} for AppSubMenu calls two class methods, which are declared as abstract. The {create-menubar} and {create-toolbar-items} methods will both be ...

Get Enterprise Curl now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.