andrewauclair / moderndocking Goto Github PK
View Code? Open in Web Editor NEWModern docking framework for Java Swing
Home Page: https://andrewauclair.github.io/modern-docking/starter-topic.html
License: MIT License
Modern docking framework for Java Swing
Home Page: https://andrewauclair.github.io/modern-docking/starter-topic.html
License: MIT License
Come up with some API for determining the appropriate docking position. Like some other libraries, there should be a simple dock or show function that just takes the dockable. Unlike those other libraries, I'd like this one to have some logic to where it shows the dockable.
This class requires a frame but doesn't use it.
The library is feature complete I think. It's time to clean it all up and organize it for release.
Position is restored after the frame is visible. A bit annoying.
java.lang.Error: Source component not connected to component tree hierarchy
at java.desktop/javax.swing.SwingUtilities.convertPoint(SwingUtilities.java:194)
at ModernDocking.floating.DockingOverlay.update(DockingOverlay.java:137)
at ModernDocking.floating.DockingUtilsFrame.update(DockingUtilsFrame.java:90)
at ModernDocking.floating.FloatListener.lambda$mouseDragged$4(FloatListener.java:185)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
An exception is thrown if tabText()
returns null. This isn't allowed (the function should always return a valid string) so we should have a specific exception that points it out.
All of the unpinned dockables should be hidden by default when restoring from a layout.
Looks like limitToRoot hasn't actually been implemented.
Vertical pinned dockables use a special text icon to display text vertical. This is preventing the button from also displaying the icon of the dockable.
Add support for showing icons instead of text when a dockable is unpinned and displayed on a toolbar.
Currently we just have the last tab selected when restoring a layout. I'd like to remember which tab was selected and reselect that tab.
Build a single demo that you can run and then launch the examples from that. Much like flexdock.
java.lang.NullPointerException: Cannot invoke "ModernDocking.internal.DockingPanel.dock(ModernDocking.Dockable, ModernDocking.DockingRegion, double)" because the return value of "ModernDocking.internal.DockableWrapper.getParent()" is null
at ModernDocking.Docking.dock(Docking.java:214)
at ModernDocking.Docking.dock(Docking.java:209)
Root docking would be nicer if it was 25% instead of 50%.
java.lang.NullPointerException: Cannot invoke "ModernDocking.layouts.DockingLayoutNode.replaceChild(ModernDocking.layouts.DockingLayoutNode, ModernDocking.layouts.DockingLayoutNode)" because "this.parent" is null
at ModernDocking.layouts.DockingSimplePanelNode.dock(DockingSimplePanelNode.java:64)
at ModernDocking.layouts.DockingLayoutBuilder.dock(DockingLayoutBuilder.java:44)
Panels that have been set to unpinned don't seem to persist.
I added a callback onDocking
to let the Dockable know that it's being docked which lets it override the docking and pick a better dock location if it wants. If you call display
, that will in turn call dock(Dockable source, Dockable target, DockingRegion region, double dividerProportion)
which does not call onDocking
.
Currently the docking-ui extension (using FlatLaf) isn't published and can't be used.
Looks like DockingLayoutBuilder is also missing an option to add the dividerPropertion.
maven publish gives us a bunch of warnings about undocumented methods, fix them.
By default, disallowedRegions() returns null when adding the methods with the IntelliJ auto completion. ModernDocking should properly check if its null and handle it like an empty list.
Sometimes the handles and overlay utility frame is not on top, the floating dockable frame is.
Currently using Flexdock and in a roundabout way we could change the tab text. Modern Docking doesn't allow the tab text to change. The dockable has to be undocked and docked.
Experiment with a Docking method that would do this. Probably ok if it just did a restore of the current layout. That might be enough to trigger it to redraw.
Would be good to abstract RootDockingPanel more to allow JFrame and JDialog and possibly other container types.
Not sure if this is just an issue with the demo app or the actual framework restore. When in full screen and restoring a non-full screen layout the app extended state doesn't change like it should.
Currently Modern Docking creates an empty JFrame with a RootDockingPanel when floating panels. It would be useful to allow the app to access and modify this JFrame. I'm thinking specifically to add a JMenuBar with options to it. But this could be extended to status bars and other non-root panels.
Auto persist does not handle panels that don't exist gracefully. I created panels dynamically at runtime and then didn't persist them. When the auto persist tried to load them from a layout file the next time I ran the app, it failed to restore. After this it was impossible to persist the layout because the auto persist was not running.
The auto persist should be reworked to better handle missing panels somehow. Either skip them or dock some fake failed panel and undock all the failed panels after loading.
A more user friendly way to integrate it into the app would be nice too.
I would like to subclass the HeaderUI classes (DefaultHeaderUI and FlatLafHeaderUI) to change backgrounds and font sizes.
Any issues with the restore should simply result in a failure to restore and use the default layout.
Currently there isn't a way to dock to a region with a divider propertion other than 0.5 using persistentIDs.
The root docking split size is 25% now when the user docks. However, it appears that docking programmatically still performs the normal 50% docking for the root.
Maximize option is available even though I turned it off.
I don't see an equivalent to flexdock DockingManager.display right now. Unless I'm just not remembering what I did to replace it.
Not sure if this is an issue with my setup or the framework. When I close a dockable using the X close button it changes the color of the button (as expected, I have a non-default background color for the titlebar). When the dockable is redisplayed again, the button is still highlighted.
It looks like the docking handles only display a center option if there are 2 panels and you try to drag and dock one of them.
Hello,
First I want to say thank you for building this great library.
I have a couple recommendations that would make the library much simpler to integrate into applications.
First, it would be great to have no-arg constructors, this would make using the components with UI building tools like JFormDesigner much simpler.
Second, having the properties in the components compatible with JSR 295 like other Swing components would a huge improvement as it adds support for using property bindings like JDesktop's beansbindings.
I recognize that this would be a large change in the API to implements.
Thank you,
Trevor
I would like to persist custom information per dockable (information about which columns are displayed in a JTable). This should be either functions right on the Dockable interface or another interface that can be used to register a handler.
The current method of using mouse motion listeners and using mouseMoved as the indicator that the dockable was dropped does not work on linux. I think it needs to be rewritten to use the Drag n' Drop Swing API.
Add callback methods to the Dockable interface that allow the panel to know when it has been docked and undocked. This could be useful for only executing certain extensive features when they are in use.
Noticed this while setting up a new machine. The gradle import in IntelliJ fails if it can't find the sonatypeUsername and sonatypePassword.
I saved the current layout to a member variable FullAppLayout
and it didn't restore the split sizes correctly.
Still need some sort of defaults. Had a panel dock on the top that should really default to south.
Project was published to Maven Central yesterday but it's not available, something went wrong.
Add an option to show stacked dockables with a dropdown option instead of a JTabbedPane.
I have some menu items that have dynamically defined persistent id's depending on app mode.
It would be nice to restore the full application layout without resetting the size and position of the main frame.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.