Product Information > JADE Developer’s Reference > Chapter 5 - Creating Your Own Control Classes > Subclassing a JADE Control Class

Subclassing a JADE Control Class

The first step in creating your own JADE control is to subclass an existing JADE control class.

To subclass a JADE control class

  1. From the Class List of the Class Browser, select the control class that you want to subclass.

  2. Select the Add command from the Classes menu. The Define Class dialog is then displayed.

  3. Specify the name of your control in the Name text box of the Class sheet and then use the Subclass of combo box to select the control that you want to subclass; for example, BaseControl.

  4. Select your map file in the Map File combo box and then select your access, type, and persistence options, if required.

  5. Click the Options sheet. The Options sheet of the Define Class dialog is then displayed, to enable you to set properties that are specific to your class.

    An example of the Options sheet is shown in the following diagram.

  6. Click the Options sheet so that you can:

    1. Uncheck the Can be shown in the Painter’s control palette check box if you do not want the image (icon) for your control displayed in the control palette of JADE Painter. (By default, the control is displayed.)

    2. Click the Change button of the Picture for Painter toolbar if you want to select the picture that is to be displayed on the tool of the JADE Painter control palette for this control.

    3. Click the Design Time Properties button if you want to specify the control properties that are listed in the Properties dialog during your Painter sessions. (A value assigned to a design time property can be saved and used as the default value when a runtime instance of the control is created.)

      The Design Time Properties dialog is then displayed. For details about this dialog, see "Selecting Your Design Time Properties", in the following section.

When you have created your new control class (and specified your design time properties, if required), it is displayed as a subclass of the selected control class in the Class List of the Class Browser .