JPlanner enables the creation of user-defined themes. To create a custom theme, derive from Theme and implement all abstract members.
In order to work properly, all properties of the theme must be explicitly initialized. The theme properties cannot have undefined values. That is, a property should not be null. This ensues from the fact that the theme is the last layer in the appearance hierarchy and the mechanism to propagate a request further in the hierarchy when a theme property is undefined will fail.
The following sample code illustrates what is the usual structure of a custom theme class:
Java Copy Code |
---|
public class MyTheme extends com.mindfusion.scheduling.Theme |
All objects that cannot be instantiated directly, such as MonthSettings, can be created by calling various protected methods of the base Theme class. For example, in order to create a MonthSettings object, you need to invoke Theme.createMonthSettings.