How To Disable Synthetica Animations(10:55, 02. Apr. 2014)

As you maybe know some of our themes support some decent animation effects like Glowing and Fading mostly on hover and focus owner changes. This is pretty nice but sometimes it makes sense to disable effects i.e. when the screen content has to be transmitted through a remote connection. There are several levels on how this can be achieved.

Global Level

The UI-property Synthetica.animation.enabled allows you to disable all animations at once.

UIManager.setLookAndFeel("de.javasoft.plaf.synthetica.SyntheticaBlackEyeLookAndFeel");
UIManager.put("Synthetica.animation.enabled", false);

Class Level

In case you want to disable animations for a certain class (i.e. progressbars), you have to set the related animation delay property to -1.

UIManager.setLookAndFeel(...);
UIManager.put("Synthetica.progressBar.x.animation.delay", -1);

Component Level

In case you want to disable animations for a certain component, you have to append the style name (in the example below "MyComponent") to the Synthetica.animation.enabled property. Of course it's also possible to use the Synthetica.progressBar.x.animation.delay property but Synthetica.animation.enabled is simply shorter.

UIManager.setLookAndFeel(...);
UIManager.put("Synthetica.animation.enabled.MyComponent", false);
...
JProgressBar progressBar = new JProgressBar();
progressBar.setName("MyComponent");
...

 

Related Posts

How To Create A Flat Button Style
How To Add Separators To A ComboBox
How To Set A Custom Scalable Font Size
How To Create A Custom TableCellRenderer
How To Customize A JYTabbedPane Component
How to apply a Firefox style to a JTabbedPane