Overview

You can subclass a JADE control class to provide a new control to meet your own requirements.

Defining your own controls provides:

If you reimplement an event method, you must include an inheritMethod instruction in your code so that the corresponding event method in the standard control class is invoked.

The steps that you perform to create your own controls are:

  1. Subclass a JADE control class

  2. Add properties to your new control class

  3. Add methods to your new control class

For details, see the following sections.

Abstract control classes (for example, the BaseControl and ScrollBar classes) are not displayed on the Control palette in the JADE Painter. However, an icon is added to the palette for the HScroll and VScroll subclasses of the abstract ScrollBar class and when you subclass the BaseControl class unless you uncheck the Can be shown in the Painter’s control palette check box on the Options sheet of the Define Class dialog.

If you have mapping logic on subclassed controls, other processes such as the JADE Painter, Translator utility, or the loading of schemas may also execute that logic. The logic therefore may need to perform checks to determine if it is running in the user application environment, to ensure that exceptions are not generated in these other situations.