I tried it on Windows 10--I must say I strongly prefer the previous tab 
appearance (which you also wrote, so no shame in that! :-)

UIs are usually improved by removing unnecessary "bling", not adding more of 
it. The existing tab controls look simple and professional, and attract just 
about the right amount of attention to them: enough to clearly indicate which 
tab is active, but not enough to be distracting. Perhaps things are different 
on Darcula? If so, maybe some smaller Darcula color tweaks would achieve the 
same?

Animations also quickly get tiring. They tend to take something that was 
previously an instantaneous operation, like selecting a tab or even just 
hovering over one, and make it into something that is now perceived to take 
500ms of time. There are a few cases where animations _can_ be warranted, e.g. 
to show that a window is being minimized to a hidden taskbar on MacOS. But 
there is no such need here.

(That said, I love the existing NetBeans tab control! It looks a lot better 
than the Eclipse ones, and I use it in my NetBeans Platform application.)

-- Eirik

-----Original Message-----
From: Tim Boudreau <niftin...@gmail.com> 
Sent: Wednesday, April 10, 2019 3:57 PM
To: d...@netbeans.apache.org
Subject: Editor tab control UI replacement

Back in 2003/4, I wrote the tab control for the NetBeans 3.6 window system, 
which is still in use - the thing JTabbedPane should have been if it had been 
written with the needs of applications like NetBeans in mind (i.e.
model driven, not using the AWT hierarchy as its model, capable of complex 
transforms on its contents with minimal redraws, etc.).

Some time after that, NetBeans' Visual Library came into being, which makes 
easy a lot of things that are otherwise very hard in Swing - animation, glows 
around components that extend beyond the bounds of the component, smooth 
scrolling and more.  So I've had it in my head for years that someone ought to 
write a replacement UI delegate for the editor tabs which uses it.  Needing to 
take a break from another project, the other day I finally wrote that.  It 
should work on any Swing look and feel (and I tested it on a bunch) - it 
derives its colors from those of the look and feel.  And all of the gradient 
painting logic is carefully memory managed using cached BufferedImages (10-40x 
faster than caching GradientPaint in my tests and far more consistent in its 
performance).

What it does differently are mainly animation and bling, and highlighting for 
the selected tab that sits outside the tab.  It does have really lovely 
built-in tab-dragging support, but since drag support in the window system is 
implemented via an AWTEventListener in core.windows...I can disable that with a 
not-too-evil hack (have the UI delegate implement Tabbed.Adapter and then 
return null for its Tabbed instance), but then model changes aren't known to 
the window system, so it "corrects" them, undoing the drag on the next move.  
But the existing tab dragging support (with its ugly polygons) works fine, so 
that's disabled by default.

So, two things:
1.  If you'd like a little more (gratuitous?) bling in your editor tabs, please 
test it (download link below) 2.  I'd be happy to contribute it to NetBeans if 
there's interest - it's already licensed compatibly

Screen shot (running on my own Dark Look and Feel plugin):
https://timboudreau.com/files/screen/04-10-2019_15-48-36.png

Binary download compatible w/ JDK 8 and up, NetBeans 8.2 and up:
https://timboudreau.com/files/visual-library-tabbedcontrol-0.3.1.nbm

Github repo w/ source code:
https://github.com/timboudreau/visual-library-tabcontrol

Feedback appreciated.

Thanks,

Tim

--
http://timboudreau.com

Reply via email to