4. Custom view components managed by CustomViewManager

What is a custom view component?

A custom view component is an object which reacts to certain document changes and updates the views of one or or more XML node views accordingly. A custom view component may be visual (e.g. a java.awt.Component or com.xmlmind.xmledit.gadget.Gadget implementing an interface specializing CustomViewManager.CustomView) or non-visual.

Where to declare a custom view component?

A custom view component is not declared anywhere. It is registered with the CustomViewManager of a ViewFactoryBase in the constructor of a stylesheet extension class using add methods such as CustomViewManager.add.

How to implement a custom view component?

Implement one of the interfaces specializing CustomViewManager.CustomView, for example BasicElementObserver. See sample BasicElementObserver.