HyperRenderer

A HyperRenderer displays a hypertext document. It converts a stream of HyperComposite into a VisualCoponent tree that can then be displayed in a HyperView. It does so by assigning a RenderPolicy to each HyperComponent that it is given. For example, in the parse tree of a HTML document, the WebComponent that represents the end paragraph tag P was assigned a ParagraphPolicy. The RenderPolicy is a Strategy[ralph] object which constructs a VisualLink for a HyperComponent. Then, HyperRenderer puts different VisualLinks into Wrappers and then put them into a HyperView.

A VisualLink ties together a VisualComponent and a HyperComponent. It is a subclass of VisualComponent, and it uses its VisualComponent to display itself. Since it keeps track of the HyperComponent that it was built from, it makes it easy for LinkResolvers to find the corresponding HyperComponent when users point to the display.

An example of a rendered HTML document can be found in the section The story starts with a hypertext document.