Draggable tabs

martin at percossi.com martin at percossi.com
Tue Mar 20 09:16:16 PDT 2012

> Could you attach your patch to the issue

Yes, I will, once I've signed the OCA, cleaned up the code a bit, and done some more testing. It shouldn't take that long, but if it drags for whatever reason I'll keep you informed.

> How about not just reordering the tabs in one tab pane, but to allow
for dragging one tab to another tab pane?

I agree that would be very nice, and it's also true that we're talking about the basis for a docking framework. Desirable features:

- good API, with behaviours properly spec'd out
- ability to dock North,South... within a tab pane => "splits" that tab pane into two tab panes in the appropriate way (note this is recursive).
- as the user drags a tab over dockable areas, those areas should "light up". The color, transparency, etc. should be customizable via CSS.
- when the user drags a tab, a screenshot of the contents of that tab are taken, and used as the "mouse pointer" (with opacity 0.5 or so), i.e. while you drag you see a semi-transparent "image" of the tab, complete with tab UI chrome.
- the user can not only drop tabs onto tab panes, but also outside of the main application window, in which case a new application window is created (containing a single tab pane with the dragged tab in it) once the user releases the mouse button.
- when a tab crosses another (during dragging), the tab not under user control should "slide" into its exchanged position via a short animation. There are a few other situations where adding an animation, or even better providing a hook for a user-customizable animation, would be very nice.

Once an API with roughly the capabilities outlined above are in place, I think it would be cool to make a browser demo which fully leverages the docking functionality. It would be a good demo, because it would be easy to write (just plug a WebView in a newly-dockable TabPane) and yet it would still beat all major browsers, at least in docking functionality.


-----Original Message-----
From: "Sven Reimers" <sven.reimers at gmail.com>
Sent: Tuesday, March 20, 2012 8:33am
To: openjfx-dev at openjdk.java.net
Subject: Re: Draggable tabs


great addition!

>From my point of view this could be an initial step for
http://javafx-jira.kenai.com/browse/RT-20477 (docking framework)

How about not just reordering the tabs in one tab pane, but to allow
for dragging one tab to another tab pane?

More information about the openjfx-dev mailing list