Child pages
  • Styling Solutions

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Servoy supports using Java Swing Look and Feels out of the box.

About Java Swing Look

...

and Feels

Java Swing Look and Feels come in two variaties:

...

Some LAFs support multiple themes. 

Adding Additional Look

...

and Feels

Besides the LAFs that are shipped with Java itself, additional third party LAFs can be added to Servoy, by placing the LAF library in the {servoyInstall}/application_server/lafs directory.

(warning)  A word of caution on third party Look And Feels

There are many third party Look And Feels around for Java, both free/open source LAFs and commercial LAFs. The quality of these LAFs differs, so when opting to use a third party LAF, make sure to properly test the LAF in combination with the developed Solution in Servoy. A public listing of the majority of the available third party LAFs can be found on http://www.javootoo.com/

Creating Custom Look

...

and Feels

Creating custom Look and Feels requires detailed Java knowledge and is in general a lot of work. 

Servoy partners with Centigrade, a company that provides User Interface Design services and products, one of the products being a customizable Look and Feel that is fully compatible with Servoy. For more information, see the Centigrade website

Specifying

...

the Default Look

...

and Feel

...

for Smart Clients

The Smart Client Settings  on the Servoy Application Server allow the configuration of the default LAF for all Smart Clients, through the 'selectedlnf' property. This property needs to be set to the className of the Look And Feel class. When the classNAme is unknown, it can be retrieved by calling the following function in a Smart Client, after manually selecting the LAF in the Smart Client Preferences:

...

If the LAF supports themes, the default theme to use can be specified through the 'lnf.theme' setting.

Manually Changing

...

the Look

...

and Feel

...

in a Smart Client

Through the Preference panel in the Smart Client, users can select the Look and Feel of their liking. The Preference panel is accessible through Edit > Preferences > Look and Feel.

...

The default styling of Forms and Element in the Web Client is determined by a default stylesheet that can be customized. See Customizing The the Web Client for more info.

Pushing Servoy Element Class

...

into DOM Element

Servoy allows the style classes of the Servoy elements that have 'styleClass' property to be pushed into the DOM elements.

...

Each Form created in Servoy Developer results in a customizable HTML and CSS template which are at runtime utilized to create the HTML markup of the Web Client. See Customizing The the Web Client for more info on template customization.

...

  • Updating UI component properties through their scripting API 
  • Conditional styling using the onRender event

Updating UI Component Properties

...

through Their Scripting API 

Each UI component provides a scripting API and that API provides methods to alter the appearance of the UI component dynamically at runtime.

For a complete overview of the runtime API of all UI components see RuntimeForm for Form instances and the childnodes of elements for all the different Element types 

Conditional Styling Using

...

the onRender Event

The onRender event on Forms and Elements provides a way to conditionally change the appearance of the UI component.

...