Time for action – changing themes
Follow these steps to explore the different themes that come with Vaadin:
Open the example application named themes on your IDE.
Run the application. Pretty much the same as the previous examples. Actually, the same we are used to:
Edit the
ThemesUI
class to match the highlighted code:@Theme("runo") public class ThemesUI extends UI { // ... } }
Run the application.
Aha! That's one small change for code, one giant leap for UI:
Now change the theme to
chameleon
and check it out:And one final theme,
liferay
:
Note
Liferay is an open source enterprise portal. A portal implements most features common to websites, such as, user registration, authorization, community and collaboration. You can develop your own functionality by implementing portlets using Vaadin. For more information, consult JSR-286, the Java specification for portlets technology.
What just happened?
Changing the theme for your application is as easy as annotating your UI
class:
@Theme("chameleon"...