How dj-raven/swing-modal-dialog works
Project type and purpose
• This is a Java Swing UI component library (“modal-dialog”) plus a demo application that exercises it.
• Purpose: provide modal dialogs, drawers, and toast notifications with animations and FlatLaf theming for desktop apps.
File structure
• Top-level:
• pom.xml (parent Maven aggregator)
• Two modules:
– modal-dialog (the library)
– demo (a standalone demo application)
• .github (CI/CD release workflow)
• modal-dialog/src/main/java/raven/modal/... → core library packages:
• modal (dialog classes)
• drawer (side-menu)
• toast (notification)
• component & layout sub-packages (renderers, controllers, transitions)
• extras & utils (helper widgets, animation utilities)
• demo/src/main/java/raven/modal/demo/... → example usage: forms, charts, themes, menus
• demo/src/test → unit/integration tests for demo components
README
• Confirms: Swing library with FlatLaf, MigLayout dependencies
• Features: modal dialog, drawer, toast
• Demo packaged as a JAR, showcased via screenshots
Main components and interactions
1. Parent Maven Project (aggregator)
2. Library Module (“modal-dialog”)
• Core API: ModalDialog, Drawer, Toast
• Component Layer: Abstract* containers & controllers
• Layout Layer: ModalLayout, DrawerMenuLayout, ToastLayout
• Extras: AvatarIcon, SlidePane, LightDarkButton
• Utils: CustomAnimation, EasingInterpolator, ModalUtils
3. Demo Application Module
• Demo UI: Demo.java, FormManager, sample forms, charts, themes
4. External Dependencies
• FlatLaf (look-and-feel library)
• MigLayout (layout manager)
• JFreeChart or other chart libs used in demo
5. Test Modules
• demo/src/test (functional tests for demo components)
• Demo App → depends on → Library Module
• Library Module → depends on → FlatLaf, MigLayout
• Parent POM → aggregates → Library, Demo, CI/CD release workflow
• Tests → depend on → Library Module & Demo resources
c. Architectural patterns / design principles:
• Layered UI architecture
– API Layer (public classes: ModalDialog, Drawer, Toast)
– Component Layer (controllers, renderers)
– Layout Layer (pluggable layout strategies)
– Util Layer (animations, theming helpers)
• Maven multi-module structure for clear separation
• Use of dependency injection via builder patterns (DrawerBuilder, ModalBuilder)
d. Key technologies / frameworks
• Java Swing
• FlatLaf (UI theming)
• MigLayout (layout management)
• Maven for build and dependency management
• GitHub Actions for CI/CD (release.yml)