APIs for setting themes and painters on per-component level

View: New views
1 Messages — Rating Filter:   Alert me  

APIs for setting themes and painters on per-component level

by Sergiy Michka :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Kirill,

in your blog http://www.pushing-pixels.org/?p=295 you wrote about the changes for substance 5:
"Removed the client properties and APIs for setting themes and painters on per-component level. Use colorization client property and per-window skins for custom tweaking.".

Maybe you could explain how these settings/APIs can be used in substance 4.3?

I'm trying to set a different Skin (actually Themes from the Skin) for 3 Components (JTableHeader, JMenuItem and JSlider) but the main Theme for the rest of my App should remain the same.

Firstly I've tried to override getTheme(Component comp, ComponentState state, boolean toIgnoreHighlights) from SubstanceTheme in my custom Theme.
But I'm doing something wrong there. My Menus are looking different but pretty shity, JTableHeader remains unchanged and JSliders are looking kinda different but not as expected. When I'm using SubstanceLookAndFeel.setSkin(mySkin), mySkin is applied to all Components in my App, but I want it only for 3 of them.

Any ideas?

Thanks,
Sergiy




LightInTheBox - Buy quality products at wholesale price