Views
5 months ago

tornadofx-guide

Workspaces Figure 16.8

Workspaces Figure 16.8 By right clicking the drawer and checking the Floating drawers option, the expanded drawer item content will instead float above the content, like in Figure 16.9: Figure 16.9 244

Workspaces This could be a good idea depending on the available space and the nature of the docked content. You can change the floating drawer mode in code as well, by setting leftDrawer.floatingDrawers = true . Remember that Views can contribute drawer items programmatically in their onDock callback. Use this to provide extra tools for an advanced editor for example. They can easily communicate between each other using ViewModels. It is recommended to create a new scope to make it easier for these view parts to work in concert on shared data structures. Vetoing navigation from the docked View The currently docked View will receive a callback whenever the Back or Forward buttons of the Workspace is clicked. These functions are called onNavigateBack and onNavigateForward . The default implementation returns true to signal that the navigation 245

GUIDE
GUIDE
A GUIDE TO
guide
GUIDE
Guide
Guide
GUIDE
guide
Guide
GUIDE
guide
Guide
GUIDE
GUIDE
GUIDE
guide
Guide
guide
GUIDE
guide
GUIDE
GUIDE
Guide
Guide
GUIDE
GUIDE TO
guide
guides
A GUIDE