|
1 | 1 | #  SnapFX - Lightweight JavaFX Docking Framework |
2 | 2 |
|
3 | | -A high-performance, lightweight JavaFX docking framework that behaves like native professional software (IntelliJ, Visual Studio). |
4 | | - |
5 | | -## MainDemo Preview |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
6 | 8 |
|
7 | 9 |  |
| 10 | +*MainDemo application showing docking and tabbing.* |
8 | 11 |
|
9 | | -## Documentation Map |
| 12 | +A high-performance, lightweight JavaFX docking framework that behaves like native professional software (IntelliJ, Visual Studio). |
10 | 13 |
|
11 | | -| File | Purpose | |
12 | | -|------------------------------------|------------------------------------------------------------------------------| |
13 | | -| [README.md](README.md) | Entry point, feature overview, and quick start | |
14 | | -| [SETUP.md](SETUP.md) | Local development environment setup | |
15 | | -| [ARCHITECTURE.md](ARCHITECTURE.md) | Technical architecture and design | |
16 | | -| [STATUS.md](STATUS.md) | Current state and open issues | |
17 | | -| [ROADMAP.md](ROADMAP.md) | Planned work and future priorities | |
18 | | -| [DONE.md](DONE.md) | Completed milestones and delivered capabilities | |
19 | | -| [CHANGELOG.md](CHANGELOG.md) | Versioned release history grouped by tags | |
20 | | -| [TESTING_POLICY.md](TESTING_POLICY.md) | Stable testing rules and quality gates | |
21 | | -| [CONTRIBUTING.md](CONTRIBUTING.md) | Contribution workflow, branch strategy, and PR checklist | |
22 | | -| [RELEASING.md](RELEASING.md) | Maintainer release process, versioning, tags, and CI release flow | |
23 | | -| [AGENTS.md](AGENTS.md) | Collaboration and workflow rules for AI agents | |
24 | | -| `docs/adr/*.md` | Architecture Decision Records (context, decisions, and trade-offs) | |
| 14 | +* [x] JPMS compatible |
| 15 | +* [x] No reflection hacks |
| 16 | +* [x] Production-ready architecture |
| 17 | +* [x] Cross-window drag & dock |
25 | 18 |
|
26 | | -## Hosted Documentation |
| 19 | +## Getting Started |
27 | 20 |
|
28 | | -- Documentation portal: `https://snapfx.org/` |
29 | | -- Public API JavaDoc: `https://snapfx.org/api/` |
| 21 | +Maven Central publishing is currently in progress and not yet publicly available. |
| 22 | +Until then, use the project source directly and/or the demo assets from GitHub Releases. |
30 | 23 |
|
31 | 24 | ## Public Preview Status |
32 | 25 |
|
33 | | -- SnapFX is currently in a release-readiness/public-preview phase (`0.x`) on the path to `1.0.0`. |
| 26 | +- **Status:** Public Preview (0.6.1) |
| 27 | +- API considered stable but packaging is still being finalized. |
34 | 28 | - Maven Central publishing is not live yet; current work focuses on packaging hardening and publishing readiness. |
35 | 29 | - Planned first Maven coordinates remain: `org.snapfx:snapfx-core`. |
36 | 30 | - Current project state and open items are tracked in [STATUS.md](STATUS.md) and [ROADMAP.md](ROADMAP.md). |
37 | 31 |
|
38 | | -## Features |
| 32 | +### Installation |
39 | 33 |
|
40 | | -### Core Architecture |
41 | | -- **Tree-Based Model**: Logical structure (DockGraph) decoupled from the visual representation |
42 | | -- **Minimal Wrapper**: Simple API `SnapFX.dock(myNode, "Title")` |
43 | | -- **Smart Splitting**: Automatic flattening when orientation matches |
44 | | -- **Auto-Cleanup**: Empty containers remove themselves automatically |
45 | | -- **Java Module**: Full support for Java Platform Module System (JPMS) |
46 | | - |
47 | | -### Visual Features |
48 | | -- **Drag & Drop**: Global drag service with visual feedback |
49 | | -- **Dock Zones**: 5 zones (Top, Bottom, Left, Right, Center) |
50 | | -- **Floating Windows**: Custom undecorated floating windows with attach/maximize/restore/close controls |
51 | | -- **Cross-Window D&D**: Dock nodes between main layout and floating windows, including split/tab targets |
52 | | -- **Quick Float Actions**: Float buttons in title bars and tab headers |
53 | | -- **Context Menus**: Right-click actions for tabs, splitters, dock headers, and floating title bars (`Attach to Layout`, always-on-top toggle) |
54 | | -- **Resizable Floating Windows**: Resize from edges and corners (undecorated behavior) |
55 | | -- **Locked Mode**: Lock the layout; no D&D; no close buttons |
56 | | -- **Configurable Keyboard Shortcuts**: Default actions (`Ctrl+W`, `Ctrl+Tab`, `Ctrl+Shift+Tab`, `Escape`, `Ctrl+Shift+P`) can be remapped or disabled via API |
57 | | -- **Title Bar Modes**: ALWAYS/NEVER/AUTO; AUTO hides title bars for tabbed nodes to save space, so those nodes are moved via tabs only (pairs well with compact/locked layouts) |
58 | | - |
59 | | -### Persistence |
60 | | -- **Layout Save/Load**: JSON-based serialization |
61 | | -- **Full Structure**: Positions and split percentages |
62 | | -- **Runtime Floating Memory**: Float/attach toggles preserve last floating bounds per node in-session |
63 | | - |
64 | | -### Look & Feel |
65 | | -- **Native Look**: Seamless integration with the JavaFX Modena theme |
66 | | -- **CSS-based**: Fully customizable |
| 34 | +**Gradle** |
| 35 | +``` |
| 36 | +implementation("org.snapfx:snapfx-core:<version>") |
| 37 | +``` |
67 | 38 |
|
68 | | -## Quick Start |
| 39 | +Temporarily build from source: |
69 | 40 |
|
70 | | -Maven Central publishing is currently in progress and not yet publicly available. |
71 | | -Until then, use the project source directly and/or the demo assets from GitHub Releases. |
72 | | -Planned first Maven coordinates: `org.snapfx:snapfx-core`. |
| 41 | +```bash |
| 42 | +git clone https://github.com/Beowolve/SnapFX.git |
| 43 | +./gradlew publishToMavenLocal |
| 44 | +``` |
73 | 45 |
|
74 | 46 | ### Simple Example |
75 | 47 |
|
@@ -157,104 +129,109 @@ try { |
157 | 129 | } |
158 | 130 | ``` |
159 | 131 |
|
160 | | -## Architecture |
| 132 | +## Documentation Map |
| 133 | + |
| 134 | +| File | Purpose | |
| 135 | +|------------------------------------|------------------------------------------------------------------------------| |
| 136 | +| [README.md](README.md) | Entry point, feature overview, and quick start | |
| 137 | +| [SETUP.md](SETUP.md) | Local development environment setup | |
| 138 | +| [ARCHITECTURE.md](ARCHITECTURE.md) | Technical architecture and design | |
| 139 | +| [STATUS.md](STATUS.md) | Current state and open issues | |
| 140 | +| [ROADMAP.md](ROADMAP.md) | Planned work and future priorities | |
| 141 | +| [DONE.md](DONE.md) | Completed milestones and delivered capabilities | |
| 142 | +| [CHANGELOG.md](CHANGELOG.md) | Versioned release history grouped by tags | |
| 143 | +| [TESTING_POLICY.md](TESTING_POLICY.md) | Stable testing rules and quality gates | |
| 144 | +| [CONTRIBUTING.md](CONTRIBUTING.md) | Contribution workflow, branch strategy, and PR checklist | |
| 145 | +| [RELEASING.md](RELEASING.md) | Maintainer release process, versioning, tags, and CI release flow | |
| 146 | +| [AGENTS.md](AGENTS.md) | Collaboration and workflow rules for AI agents | |
| 147 | +| `docs/adr/*.md` | Architecture Decision Records (context, decisions, and trade-offs) | |
| 148 | + |
| 149 | +## Hosted Documentation |
161 | 150 |
|
162 | | -Technical internals and component structure are documented in [ARCHITECTURE.md](ARCHITECTURE.md). |
| 151 | +- Documentation portal: [https://snapfx.org/](https://snapfx.org/) |
| 152 | +- Public API JavaDoc: [https://snapfx.org/api/](https://snapfx.org/api/) |
163 | 153 |
|
164 | | -## Testing |
| 154 | +## Features |
165 | 155 |
|
166 | | -Run the full test suite: |
| 156 | +### Core Architecture |
| 157 | +- **Tree-Based Model**: Logical structure (DockGraph) decoupled from the visual representation |
| 158 | +- **Minimal Wrapper**: Simple API `SnapFX.dock(myNode, "Title")` |
| 159 | +- **Smart Splitting**: Automatic flattening when orientation matches |
| 160 | +- **Auto-Cleanup**: Empty containers remove themselves automatically |
| 161 | +- **Java Module**: Full support for Java Platform Module System (JPMS) |
167 | 162 |
|
168 | | -```bash |
169 | | -./gradlew test |
170 | | -``` |
| 163 | +### Visual Features |
| 164 | +- **Drag & Drop**: Global drag service with visual feedback |
| 165 | +- **Dock Zones**: 5 zones (Top, Bottom, Left, Right, Center) |
| 166 | +- **Floating Windows**: Custom undecorated floating windows with attach/maximize/restore/close controls |
| 167 | +- **Snapping**: Floating windows snap to edges and corners (configurable) |
| 168 | +- **Cross-Window D&D**: Dock nodes between main layout and floating windows, including split/tab targets |
| 169 | +- **Quick Float Actions**: Float buttons in title bars and tab headers |
| 170 | +- **Context Menus**: Right-click actions for tabs, splitters, dock headers, and floating title bars (`Attach to Layout`, always-on-top toggle) |
| 171 | +- **Resizable Floating Windows**: Resize from edges and corners (undecorated behavior) |
| 172 | +- **Locked Mode**: Lock the layout; no D&D; no close buttons |
| 173 | +- **Configurable Keyboard Shortcuts**: Default actions (`Ctrl+W`, `Ctrl+Tab`, `Ctrl+Shift+Tab`, `Escape`, `Ctrl+Shift+P`) can be remapped or disabled via API |
| 174 | +- **Title Bar Modes**: ALWAYS/NEVER/AUTO; AUTO hides title bars for tabbed nodes to save space, so those nodes are moved via tabs only (pairs well with compact/locked layouts) |
| 175 | + |
| 176 | +### Persistence |
| 177 | +- **Layout Save/Load**: JSON-based serialization |
| 178 | +- **Full Structure**: Positions and split percentages |
| 179 | +- **Runtime Floating Memory**: Float/attach toggles preserve last floating bounds per node in-session |
| 180 | + |
| 181 | +### Look & Feel |
| 182 | +- **Native Look**: Seamless integration with the JavaFX Modena theme |
| 183 | +- **Themeable**: Dark/Light mode included |
| 184 | +- **CSS-based**: Fully customizable |
171 | 185 |
|
172 | | -Testing rules and merge gates are defined in [TESTING_POLICY.md](TESTING_POLICY.md). |
173 | | -Current health and validation snapshots are tracked in [STATUS.md](STATUS.md). |
174 | | -Versioned release history per tag is tracked in [CHANGELOG.md](CHANGELOG.md). |
175 | 186 |
|
176 | 187 | ## Demo Application |
177 | 188 |
|
178 | | -A full demo app is included: |
| 189 | +A full demo app is included in the project. |
| 190 | +You can run it with gradle or download the release assets from GitHub Releases. |
| 191 | +Everything is packaged with the jre and dependencies, so no installation required. |
| 192 | +Just unzip the archive and run it. |
| 193 | + |
| 194 | +**Windows**, **macOS**, **Linux** packages are provided for each release. |
179 | 195 |
|
180 | 196 | ```bash |
181 | 197 | ./gradlew run |
182 | 198 | ``` |
183 | 199 |
|
184 | | -The demo shows: |
| 200 | +### The demo shows all the features, including: |
185 | 201 | - Typical IDE layout (sidebar, editor, console) |
186 | 202 | - Lock/unlock functionality |
187 | 203 | - Save/load layout |
188 | | -- Multiple tabs |
| 204 | +- D&D between main layout and floating windows |
189 | 205 | - Floating/attach workflows from menu, title bars, and tab headers |
190 | | -- App-level `F11` fullscreen shortcut example |
191 | | - |
192 | | -### Update Preview Screenshot |
| 206 | +- Theme switching |
193 | 207 |
|
194 | | -```bash |
195 | | -# Regenerate README preview image from the current MainDemo UI |
196 | | -./scripts/update-main-demo-preview.ps1 |
197 | | -``` |
198 | | - |
199 | | -Optional output path: |
200 | | - |
201 | | -```bash |
202 | | -./scripts/update-main-demo-preview.ps1 -OutputPath "docs/images/main-demo.png" |
203 | | -``` |
| 208 | +## Technology Stack |
204 | 209 |
|
205 | | -## Example Layouts |
| 210 | +- **Java 21+** |
| 211 | +- **JavaFX 21+** |
| 212 | +- **Gson** (JSON serialization) |
| 213 | +- **JUnit 5 / TestFX** (testing) |
| 214 | +- **Gradle** (build) |
206 | 215 |
|
207 | | -### IDE Layout |
208 | | -``` |
209 | | -┌─────────────┬──────────────────────┬─────────────┐ |
210 | | -│ Project │ Editor │ Properties │ |
211 | | -│ Explorer │ │ │ |
212 | | -│ ├──────────────────────┤ │ |
213 | | -│ │ Console | Tasks │ │ |
214 | | -└─────────────┴──────────────────────┴─────────────┘ |
215 | | -``` |
216 | 216 |
|
217 | | -### Code with SnapFX |
218 | | -```java |
219 | | -DockNode project = snapFX.dock(projectTree, "Project"); |
220 | | -DockNode editor = snapFX.dock(editorArea, "Editor", project, DockPosition.RIGHT); |
221 | | -DockNode props = snapFX.dock(propsPanel, "Properties", editor, DockPosition.RIGHT); |
222 | | -DockNode console = snapFX.dock(consoleArea, "Console", editor, DockPosition.BOTTOM); |
223 | | -DockNode tasks = snapFX.dock(tasksList, "Tasks", console, DockPosition.CENTER); |
224 | | -``` |
| 217 | +## Contributing |
225 | 218 |
|
226 | | -## Roadmap |
| 219 | +* For contribution workflow, branch strategy, commit/PR expectations, and quality gates, see [CONTRIBUTING.md](CONTRIBUTING.md). |
| 220 | +* For maintainer release/versioning/tag flow, see [RELEASING.md](RELEASING.md). |
| 221 | +* Contact me via Discord if you have questions or suggestions. (Discord invite: https://discord.gg/WwDGWkVsnB) |
227 | 222 |
|
228 | | -Planned work is tracked in [ROADMAP.md](ROADMAP.md). |
229 | 223 |
|
230 | 224 | ## License |
231 | 225 |
|
232 | 226 | This project is licensed under the MIT License. |
233 | 227 |
|
234 | 228 | SnapFX is intended for personal and commercial use, including large applications. |
235 | 229 |
|
236 | | -## Contributing |
237 | | - |
238 | | -For contribution workflow, branch strategy, commit/PR expectations, and quality gates, see [CONTRIBUTING.md](CONTRIBUTING.md). |
239 | | - |
240 | | -For maintainer release/versioning/tag flow, see [RELEASING.md](RELEASING.md). |
241 | | - |
242 | | -## Documentation |
243 | | - |
244 | | -See JavaDoc in the source files and [ARCHITECTURE.md](ARCHITECTURE.md) for detailed framework internals. |
245 | | - |
246 | | -## Technology Stack |
247 | | - |
248 | | -- **Java 21+** |
249 | | -- **JavaFX 21+** |
250 | | -- **Gson** (JSON serialization) |
251 | | -- **JUnit 5 / TestFX** (testing) |
252 | | -- **Gradle** (build) |
253 | 230 |
|
254 | 231 | ## Support |
255 | 232 |
|
256 | | -If you have questions or issues, open an issue in the repository. |
257 | | -There is also a Discord server for community support: https://discord.gg/WwDGWkVsnB |
| 233 | +* If you have questions or issues, open an issue in the repository. |
| 234 | +* Discord server to get in contact with the devs and community: https://discord.gg/WwDGWkVsnB |
258 | 235 |
|
259 | 236 | --- |
260 | 237 |
|
|
0 commit comments