Working with Java Add-in Extensibility > Implementing Custom Toolkit Support > Understanding the Toolkit Support Class

Understanding the Toolkit Support Class

When all of the classes in a custom toolkit extend the basic user interface class of another toolkit (for example java.awt.Component) we say the custom toolkit extends that toolkit (in this example: AWT). Every custom toolkit support set has one toolkit support class that indicates the native toolkit that the custom toolkit extends.

By extending the custom toolkit support class from the correct native toolkit support set, you ensure that your toolkit inherits all of the necessary utility methods for basic functionality (such as event handling and dispatching).

The UFT Java Add-in provides custom toolkit support classes for AWT, SWT, and JFC (Swing). When you create new Java Add-in Extensibility custom toolkit support classes you extend one of these, or the custom toolkit support class of other existing Extensibility custom toolkit support sets.

The inheritance hierarchy of toolkit support classes reflects the hierarchy of the custom toolkits. For example, the JFCSupport class extends the class AWTSupport. A toolkit support class of a toolkit that extends JFC will extend JFCSupport thereby inheriting AWTSupport functionality. No further implementation is required in this class.

For example, this is the toolkit support class for the Javaboutique custom toolkit, which extends the AWT native toolkit:

package com.mercury.ftjadin.qtsupport.javaboutique;
import com.mercury.ftjadin.support.awt.AwtSupport;
public class JavaboutiqueSupport extends AwtSupport {}

The following table shows which toolkit support class to extend, if you want to extend the toolkit support classes provided for AWT, SWT, or JFC:

To extend the toolkit support class for:

Extend:

AWT

com.mercury.ftjadin.support.awt.AwtSupport

JFC11 (Swing)

com.mercury.ftjadin.support.jfc.JFCSupport

SWT

com.mercury.ftjadin.support.swt.SwtSupport