This is not completely done yet; new functionalities will be added to support more of FontAwesome.

To use FontAwesome with DomUI you need to do the following:

This adds the resources needed, and makes all pages include the required style sheet - which in turn loads the correct fonts.

FontAwesome specific support

The component FaIcon can be used to add a FontAwesome icon to a page/component/whatever. An example usage is:

FaIcon icon = new FaIcon("fa-folder");
icon.addCssClass("dm-tree2-icon fa-2x");

This shows a folder icon. The fa-2x is a standard FontAwesome class which makes the icon twice as big as the normal font size. The dm-tree2-icon used in the example here defines a color for the icon so that it can be purple instead of black.

To add a FA icon to a button accepting an icon use the FontAwesome name without any embellishments, like:

bb.addBackButton("Back", "fa-arrow-left");

To be done

Support for FA icons in button(s).