Commons-demo¶
commons-demo is the shared library that powers the demo applications for Flowing Code's Vaadin add-ons. It provides the layout, source-code viewer, and theme-switching infrastructure used by sites like addonsv25.flowingcode.com and the per-add-on demo projects.
What's in the library¶
- Tabbed Demo —
TabbedDemo, the main layout. A split layout that pairs each demo view with its source code, supports multiple demos in tabs, theme switching, and orientation toggling. - Source Code Viewer —
SourceCodeViewer, which fetches and renders Java source alongside the demo. Handles license abbreviation, boilerplate removal, conditional code based on Vaadin version, synthetic-source rewriting, fragment highlighting, and multiple-source tabs. - Dynamic Theme — Vaadin 25+ runtime theme switching between Lumo, Aura, and minimal base styles.
Supported versions¶
| Vaadin version | Library version |
|---|---|
| 24–25 | 5.x |
| 14–23 | 3.x |
Source code¶
CommonsDemo on GitHub — distributed under Apache License 2.0.