The app diagram is demonstrating the relationships between the main classes in the application and how they interact with each other to create the application window and handle user actions. The diagram also shows how the router handles routing for the application and how the menu bar and popup menu are created and used.
App: The main class that creates the application window and contains the router, menu bar, and popup menu.
AppMenuBar: The menu bar class that creates the application's menu bar and its associated menus. Behaves differentlyAppPopupMenu: The popup menu class that creates the MacOS application popup menu and its associated menu items.Router: The class that handles the routing for the application. It maps names to views and is responsible for loading and rendering the views on redirection. Router automatically registers all ViewPanel classes annotated with View.SystemActions: The class that handles system actions, such as quitting the application or opening the preferences dialog.%%{init: {"theme": "default"}%%
classDiagram
direction LR
App o--> Router : uses
App o--> AppMenuBar : creates
App o--> AppPopupMenu : creates
AppMenuBar ..> SystemActions: performs
AppPopupMenu ..> SystemActions : performs
Router --* IllegalRouteException : throws
Router --* RouterConfigException : throws
App ..> AppCfg : uses
AppCfg ..> DefaultCfg : uses
DefaultCfg <|-- GameConfig : extends
class App {
- SystemActions systemActions
- initTitle() void
- initFrame() void
- initMacOSMenus() void
- initApp() void
- initIcon() void
- initMenuBar() void
}
class AppCfg
class DefaultCfg
class GameConfig {
<<abstract>>
}
class AppMenuBar {
- setupMacOS() void
- initMenus() void
}
class AppPopupMenu {
- initMenuItems() void
}
class IllegalRouteException
class RouterConfigException
class Router {
- Container currentContainer
- Container defaultContainer
- Container owner
+ scanViews() void
+ getView(String) Class~ViewPanel~
+ createView(Class~ViewPanel~, View, Object[]) ViewPanel
+ createView(String, Object[]) ViewPanel
+ redirect(String, Object[]) void
+ registerView(Class~ViewPanel~) void
+ navigate() void
+ navigate(Container) void
+ getViewAnnotation(String) View
+ redirect(Class~ViewPanel~) void
}
class SystemActions {
+ quitApp() void
+ openGithubLink() void
+ openPreferencesDialog() void
+ openHelpDialog() void
+ openAboutDialog() void
}