Chapter 4. User Interface Components

This chapter provides an overview and a detailed description of all non-layout components in IT Mill Toolkit. Many features of the components are designed for various use cases and design patterns, which are mentioned below.

As most components are used inside a layout, you should familiarize yourself with the layout components in Chapter 5, Managing Layout.

4.1. Overview

IT Mill Toolkit provides a comprehensive set of user interface components and allows you to define custom components. Figure 4.1, “UI Component Inheritance Diagram” illustrates the inheritance hierarchy of the UI component classes and interfaces.

Figure 4.1. UI Component Inheritance Diagram

UI Component Inheritance Diagram

Interfaces are displayed in yellow, abstract classes in red, and regular classes in blue. At the bottom of the interface hierarchy, we have the Component interface. At the bottom of the class hierarchy, we have the AbstractComponent class. It is inherited by two other abstract classes: AbstractField, inherited further by field components and AbstractComponentContainer, inherited by various container components. Some miscellaneous components, such as labels and links, inherit this base class directly.

The layout of the various components in a window is controlled, logically, by layout components, just like in conventional Java UI toolkits for desktop applications. In addition, with the CustomLayout component, you can write a custom layout as an XHTML template that includes the locations of any contained components. Looking at the inheritance diagram, we can see that layout components inherit the AbstractComponentContainer and the Layout interface. Layout components are described in detail in Chapter 5, Managing Layout.

Looking at it from the perspective of an object hierarchy, we would have a Window object, which contains a hierachy of layout components, which again contain other layout components, field components, and other visible components.

You can browse the available UI components in the Feature Browser of the IT Mill Toolkit Demo Application. The Feature Browser shows a description, a list of properties, JavaDoc documentation, and a code sample for each of the components. On the right side of the screen, you can find the Properties panel, which you can use to edit the properties of the displayed component.