ModernDocking
ModernDocking copied to clipboard
How to remove floating window title bars
I need to drag the panel out of the original window and use a window style without a title bar for the panel, but I don't know how to set it up. Please give me a suggestion. Thank you.
I'm not sure I follow. The titlebar is always displayed. That's how things are displayed unless you use top tabs.
Perhaps they want the jframe title bar to function as the dockable's title bar when it is popped out.
Edit: the close button would have to close only the focused tab unless only one tab is remaining, then close the window.
That could be interesting. It would have to revert to individual titlebars if there is more than 1 dockable in the window.
I'm not sure I follow. The titlebar is always displayed. That's how things are displayed unless you use top tabs.
I want to drag the panel out of the window, and it will become a floating window~
That could be interesting. It would have to revert to individual titlebars if there is more than 1 dockable in the window.
I want to use jFrame. setUndecorated(true);
That should already be allowed by default. The method responsible is here: https://github.com/andrewauclair/ModernDocking/blob/main/docking-api/src/ModernDocking/Dockable.java#L95.
As long as your Dockable returns true for this method then you should be able to drag and drop outside of the frame to float the Dockable.
That could be interesting. It would have to revert to individual titlebars if there is more than 1 dockable in the window.
I think allowing customization would be better~
An example of floating can be seen here: https://github.com/andrewauclair/ModernDocking/blob/main/img/floating_panel.gif
An example of floating can be seen here: https://github.com/andrewauclair/ModernDocking/blob/main/img/floating_panel.gif
This example includes the window title bar, which is duplicated with the panel title bar. I don't need the window title bar, but I couldn't find the relevant settings~
Let me see if I understand now. You want the new frame to be undecorated?
Let me see if I understand now. You want the new frame to be undecorated?
Yes, because the window title bar is the same as the panel title bar, I would like to use the panel title bar instead of the window title bar, similar to how panels in similar to Visual Studio or IDEA are dragged out of the window.
Let me see if I understand now. You want the new frame to be undecorated?
The solution manager panel and code editor panel of Visual Studio have two different effects when being moved out of the window.
I need the first effect.
Let me see if I understand now. You want the new frame to be undecorated?
I found the relevant code:
I don't know if this is feasible, but if window transparency is set, kidney damage may occur...
I'll look into adding a setting. This will be more involved than simply calling setUndecorated(true); The resulting frame cannot be resized without additional changes.
Not sure if this is what's being requested here, but it would be nice if windows with only one dockable would use the window titlebar instead of the custom panel header. E.g. putting the Inheritance here into the title bar:
The three-dot menu would have to be hidden, but in this state it contains no useful elements anyway
Doing that would mean losing the ability to drag the dockable again as that titlebar is the drag source.
Doing that would mean losing the ability to drag the dockable again as that titlebar is the drag source.
Perhaps modifying the window style is not very reasonable. Since the window cannot be modified, can you customize the title bar? I have found the following examples:
https://stackoverflow.com/questions/12822037/how-to-create-customize-title-bar-with-close-button-on-jframe https://copyprogramming.com/howto/how-to-change-the-color-of-the-title-bar-in-javax-swing https://www.codespeedy.com/how-to-change-the-color-of-title-bar-in-jframe-in-java/
Doing that would mean losing the ability to drag the dockable again as that titlebar is the drag source.
Because this feature is different from typical dockable windows, I think it's possible to add a button for docking.
Not sure if this is what's being requested here, but it would be nice if windows with only one dockable would use the window titlebar instead of the custom panel header. E.g. putting the
Inheritancehere into the title bar:The three-dot menu would have to be hidden, but in this state it contains no useful elements anyway
I think in this situation, the title of the panel can be set to the window, including those three points.
