Adding a New Form

You can create forms only in the JADE Painter. A form can be a subclass only of another user-defined form class or of the Form system class. Existing forms are displayed in the Existing Forms list box, to enable you to select the form that is to be subclassed.

A subform inherits all of the methods and properties of its parent, or superform. All forms are subclasses of the Window class.

Use a form to create an interface for your JADE applications. A form is a window on which you paint controls for the running of your application. Controls are objects such as text boxes, list boxes, buttons, check boxes, and so on. You also use a form to define a print layout.

When you add the first form to your schema, it is automatically created as a subclass of the Form system class (superclass), inherited from the RootSchema.

The first form that you add to a schema becomes the default start-up form (the form that is initially created and displayed automatically when the application is started up).

To create a new form, perform one of the following actions

The New Form dialog, shown in the following image, is then displayed, to enable you to define your new form.

To define your new form

  1. If you do not want to define a form for the Painter’s current schema, select the schema to which you want to add the form in the Schema combo box at the lower right of the dialog. The Existing Forms list box then displays the forms defined for that schema. (For details about editing existing forms, see "Editing an Existing Form", later in this chapter.)

  2. Specify a form name in the Form Name text box. You must specify a form name, which cannot have the same name as:

    • Another form

    • An application name within the current schema

    • Another class in the current schema (or any of its superschemas)

    • Predefined JADE classes or interfaces

    The form name must start with a letter. It can include numbers and underscore characters, but cannot include punctuation or spaces. As forms are defined in the JADE database as classes, the first letter of the name is converted to an uppercase character, if it is lowercase.

  3. If your form is a subform, perform one of the following actions.

    • Specify its superform in the Sub-Form of combo box.

    • Select its superform from the Sub-Form of combo box.

    • Select its superform from the Existing Forms list box.

    A subform inherits all the methods and properties of its parent or superform.

  4. In the Form Style group box, select the Printer or the Web Page option button if you do not want to define a screen form (the default). You can define your form as a screen, printer, or Web page form. The controls on a printer form do not accept input at run time.

    If you select the Screen default option, use the Form Type group box to define the type of screen entity.

    For details about creating a form as a Printer form, see "Printer‑style Forms", in the following subsection. For details about creating a Web page form, see "Creating Web Pages", in Chapter 1 of the JADE Web Application Guide.

  5. In the Form Type group box, select the Dialog Box option button if you do not want to define a window form (the default). The Dialog option button automatically provides you with control buttons for OK, Cancel, and Help functions.

  6. Click the OK button. Alternatively, click the Cancel button to abandon your selections.