Extending widget classes
ZIETrans provides a number of widget classes. You can extend any
of the widget classes found in the ComponentWidget.xml file
by replacing the
public class MyCustomWidget extends Widget implements HTMLRenderer
in the created .java file for
the new widget with the class name of an existing widget, such as
public class MyCustomWidget extends
com.ibm.hats.transform.widgets.FieldWidget
Note: Bidirectional widgets are stored in the com.ibm.hats.transform.widgets.BIDI
package. The names of bidirectional classes for widgets are the same
as regular widgets, but they are followed by "BIDI"; for example,
com.ibm.hats.transform.widgets.BIDI.FieldWidgetBIDI
If you want to modify an existing widget, you must extend one of the existing widget classes and override its drawHTML method. Refer to the ZIETrans API References (Javadoc) for details about widget interfaces and methods. See Using the API documentation (Javadoc).
ZIETrans instantiates the custom widget based on the setting of the widget attribute of the <ZIETrans:Component> tag.