Adding Methods to Your Subclassed Control
You can add new methods to your control class as you can for any other class. Some of the methods that you add are likely to be the reimplementation of superclass methods.
Controls have the following method types.
-
Event external methods
-
Standard methods
Event methods are methods that are usually triggered by an event.
Event methods execute the logic in the method and then call a method (whose method name is specified by the control-name_this-method-name signature) of the form on which the control is placed.
When you reimplement an event method, include the inheritMethod call.
You must add event methods as external methods.
When you create your own event external methods, the highest method that is not reimplemented has the following format.
event-name(parameter-list) is CallControlEvent in jadpmap updating;
At run time, it is this call that causes a form message to be generated. Methods are event methods only if the highest level of method implementation has a signature with this format.
When a control is displayed during painting (that is, at development time), the control can respond only to the
If you reimplement these methods, ensure that you include an inheritMethod call. For example, if your subclassed control implements the
For details, see the appropriate method in
Generally, where there is a requirement to set default values for properties, a constructor is implemented for the class. Alternatively, your method can perform initialization logic in the
-
This method returns true if the control can be dragged to move it around the form in Painter.
-
This method returns true if the control can be selected in Painter.
Reimplement this method in your application to return false if you have created a custom (user-defined) control that has other controls embedded in it. In most cases, you would not want the embedded controls to be selected during painting.
-
This method returns true if the control can be resized in Painter.
-
This method returns true if the JADE Painter allows the control to be placed on the specified form or control.
-
This method returns true if the JADE Painter allows a control to be dropped on top of this control.
-
This method returns true if the JADE Painter allows the specified control to be placed on this control.
For details, see
In the Properties dialog, you can control how the property value is displayed and the values that are acceptable (that is, you can provide validation of the input value). To do this, reimplement the following methods.
-
This method gets the textual representation of the value to display.
-
This method returns true if the property has its own dialog for input and validation.
-
This method saves the properties edited by the property page dialogs.
-
This method displays a dialog that has previously been defined for the input and validation of the property value.