user590444
user590444

Reputation: 4332

Do Nimbus look and feel supports loading configuration from xml

NimbusLookAndFeel extends SynthLookAndFeel but does it supports loading properties from xml like SynthLookAndFeel does?

Is the XML settings format the same?

Upvotes: 0

Views: 282

Answers (1)

peterh
peterh

Reputation: 19285

Yes, but not 100% certain that you'll arrive at the same result as when using the NimbusLookAndFeel as-is. You'll find a skin.laf file in the JDK source which is essentially the XML file that Nimbus uses to bootstrap itself.

However this file is not read at runtime, rather it is read when the JDK is build and from that some source code is generated that become package-private classes that NimbusLookAndFeel then uses. You can see these generated classes if you browse the contents of your rt.jar file.

From what I understand this technique is used because it has performance advantages. The skin.laf is a pretty huge XML file and if it were to be parsed everytime Nimbus L&F is activated it probably wouldn't be good. Just my guess.

What I'm trying to say is: Nimbus L&F doesn't use the load() methods itself. It has another way of bootstrapping itself.

Upvotes: 1

Related Questions