Add some "close enough" borders to UIDefaults table

Request new features and improvements you want to see in WebLaF.
I will answer any request so don't hesitate and post it!

Add some "close enough" borders to UIDefaults table

Postby robert » Sun Mar 31, 2013 8:15 am

For those of us who have an existing application that supports multiple LAFs, and don't want to rewrite the whole app to use WebLookAndFeel-isms, it would be nice if a "close enough" border for some components (e.g. TextField, TextArea, etc.) were put into the UIDefaults table.

I understand the mechanism for painting borders is different for WebLaF, and so you wouldn't be able to provide something that would look "right" (e.g. it wouldn't highlight when focused, etc.). However, I sometimes have custom components that steal existing components' borders to blend better with whatever LAF is installed. For example, a breadcrumb bar, similar to that found in Windows Explorer. It uses TextField.border. In the case of WebLaF, this property isn't defined, so we fall back to the BasicLookAndFeel's TextField.border, which is the ugly old beveled style. If even a LineBorder of the "right" color were installed, it would go a long way for custom components.

I'm not above writing an adapter class that installs & tweaks WebLookAndFeel via reflection if it's installed by the user, so alternatively, if there's some way to "install" a standard WebLaF Painter on a component to render its border-ish parts, I'd be happy to do that as well if you pointed me in the right direction. I'm currently exploring the StyleConstants class and maybe I'll figure something out.
Posts: 4
Joined: Fri Mar 15, 2013 3:07 am

Re: Add some "close enough" borders to UIDefaults table

Postby mgarin » Mon Apr 01, 2013 6:08 pm

I understand the problem with the custom components and you indeed offered a good way to workaround some of the problems. I will be adding such "placeholder" WebLaF-like borders into UIDefaults later.

I just have a lot of things to do before starting to fix compatibility problems with other libraries or 3rd-party components, but i will certainly fix them later :)
User avatar
Site Admin
Posts: 223
Joined: Mon Apr 16, 2012 1:01 pm
Location: Russia, Saint-Petersburg

Return to Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest