com.taursys.xml.render
Class DocumentElementRenderer

java.lang.Object
  extended bycom.taursys.xml.render.AbstractRenderer
      extended bycom.taursys.xml.render.VisibleRenderer
          extended bycom.taursys.xml.render.DocumentElementRenderer
Direct Known Subclasses:
FormRenderer, TemplateRenderer

public class DocumentElementRenderer
extends VisibleRenderer

DocumentElementRendere renders a DocumentElement. In response to a RenderEvent, it simply shows or hides the Document Element and, if visible, dispatches a RenderEvent to the children of the DocumentElement.

In response to a RecycleEvent, it simply makes the Document Element visible, and dispatches a RecycleEvent to the children of the DocumentElement.

Version:
1.0
Author:
Marty Phelan

Field Summary
 
Fields inherited from class com.taursys.xml.render.AbstractRenderer
id, parentDocumentAdapter
 
Constructor Summary
DocumentElementRenderer(DocumentElement de)
          Constructs a new DocumentElementRenderer
 
Method Summary
 void recycle()
          Recycles this component by restoring the Document element to a default state.
protected  void renderContents()
          Renders the DocumentElement by simply invoking the DocumentElement's renderDispatcher to dispatch the RenderEvent to the children.
 
Methods inherited from class com.taursys.xml.render.AbstractRenderer
getComponent, getComponentNode, getDocument, getParentNode, getSiblingNode, init, isRemoved, removeSelf, render, restoreSelf, setRemoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentElementRenderer

public DocumentElementRenderer(DocumentElement de)
Constructs a new DocumentElementRenderer

Method Detail

recycle

public void recycle()
             throws RecycleException
Recycles this component by restoring the Document element to a default state. This implementation simply makes it visible, and dispatches a recycle event to any children.

If a Document element was left invisible, and the Document changed, then the invisible component would become dereferenced.

Throws:
RecycleException - if problem occurs during recycling.

renderContents

protected void renderContents()
                       throws RenderException
Renders the DocumentElement by simply invoking the DocumentElement's renderDispatcher to dispatch the RenderEvent to the children.

Overrides:
renderContents in class VisibleRenderer
Throws:
RenderException - if any problem occurs during rendering


Copyright © 2007 Martin T Phelan. All Rights Reserved.