Customizing HTML emulation

OpenLegacy is shipped with built-in HTML emulation. It provides the ability to convert host screens to HTML automatically.

OpenLegacy is shipped with a set of Spring beans which, by fine tuning their properties, you can configure fonts, proportion, etc. from src/main/resource/

Override the default HTML elements provider in applicationContext.xml to change color and back color. Color and back color are converted using color mapper which converts a host color (org.openlegacy.terminal.Color enum) to CSS style color. If the color/back color is the default, no color/back color is rendered for the web field, and it uses the default color.

Code Snippet:

Working with themes

OpenLegacy is shipped with a predefined set of themes which can give a professional look to your Web application. Themes are packed as JARs, and predefined themes are located in the OpenLegacy Maven repository.

To add a theme of your choice for your Web application, add the theme JAR definition to your project pom.xml:

Code Snippet:

You can add multiple themes definitions, and let the user pick one.

To configure the used theme, edit src/main/resources/

Themes are set in InsertGlobalsInterceptor. Make sure it is configured in webmvc-config.xml.

If you have configured more thanone theme, you can let the end user switch between them using the JS function: changeTheme(‘cloud,night,red’). Refer to the MVC demo, “Theme” link.

The theme is used in template.jspx and public.jspx CSS imports.

OpenLegacy themes are relying on DOJO JS framework infrastructure.

Themes are read from JAR file according to the following definition in webmvc-config.xml:

Code Snippet:

If you wish to use a custom theme, you should remove this setting and create the new theme under src/main/webapps/themes.

Customizing CSS / logo

Once you pick a theme/s, you can apply your company logo into the theme. In css/project.css, add a reference to your company logo. Refer to MVC demo for an example.

project.css is also used to allow you to make small changes to the theme. If you need a brand new theme with a different look and feel, you should create a new theme. Follow our existing themes JAR structure.