<Swing Dev> [9] Review request for 8136366 Add a public API to create a L&F without installation
Alexander Scherbatiy
alexandr.scherbatiy at oracle.com
Fri Apr 1 13:02:35 UTC 2016
On 01/04/16 16:12, Mario Torre wrote:
> On Fri, Apr 1, 2016 at 1:49 PM, Alexander Scherbatiy
> <alexandr.scherbatiy at oracle.com> wrote:
>> May be someone wants to get
>> fonts or colors from Windows L&F on Linux for its own custom L&F? It would
>> be useful to allow it.
> I don't think this would make any sense, the colours would still
> depend on a specific version of the OS, so is not clear what
> UIDefaults are returned by the Windows LAF on Linux or OSX, and those
> may also be different in different versions of Windows itself.
>
> I believe the Windows LAF is not "simulated" either, but the rendering
> is redirected to native widgets pretty much like the GTK/OSX Look and
> Feels work, so I doubt that running an application with the Windows
> LAF under Linux would work at all (or perhaps it could is running with
> wine, is that possible?), but I admit I didn't try this, so I'm open
> to be very surprised :)
>
> I think the sanest approach is to not support this scenario, though.
I see the point that creating non installed system L&F may not have
many sense.
One more use case that should be considered is using the
createLookAndFeel(className) method with custom L&Fs.
For example someone can have a list with L&F class names which
includes both system and custom L&F.
Using a class name he wants to check if the given L&F is supported.
Does he need to install the custom L&F first?
If no, he will need to handle L&Fs differently using
UIManager.createLookAndFeel(className) for system L&Fs and reflection
for custom.
Thanks,
Alexandr.
>
> Cheers,
> Mario
More information about the swing-dev
mailing list