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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access