Look and Feel (bug?)


#1

Just changed from using setDefaultLookAndFeel() in a plugin to relying on LookAndFeel inheritance and I've found a problem. 

If you set the look and feel for a parent component then add a Slider the slider fails to notice that the parent has a look and feel assigned and doesn't update its text box.  

This means you get a different behaviour depending on when you set the parents look and feel. Which is odd behaviour!

I think that the addChildComponent should check for a new look and feel and then send the right change notifications .. but I don't think that happens? 

... anyway, a few more weird things left to sort out now - better get back to it:)


#2

Okay - so while I'm at this, here's another question. If I have a custom typeface, it looks like getTypefaceForFont() is only ever called like this: 

  • getDefaultLookAndFeel().getTypefaceForFont (font);

Is there any way of doing a custom typeface without overriding this method? And if not does that mean I am stuck with using a singleton and using setDefaultLookandFeel() in a plugin? 


#3

I think BubbleComponent's don't inherit from their parent component either?


#4

It'd involve a lot of work if every component had to check whether the L+F had changed every time it got added/removed, but you can force an update yourself by calling lookAndFeelChanged()


#5

How did I miss that.