com.creamtec.ajaxswing.rendering
Class AbstractDocumentRenderer

java.lang.Object
  extended by com.creamtec.ajaxswing.rendering.AbstractDocumentRenderer
All Implemented Interfaces:
DocumentRenderer
Direct Known Subclasses:
HTMLPageRenderer

public abstract class AbstractDocumentRenderer
extends java.lang.Object
implements DocumentRenderer

Acts as a base class for all document renderers and contains logic shared by all of them. Includes support for renderer maps


Field Summary
static boolean LIMIT_MODE
           
 
Constructor Summary
AbstractDocumentRenderer()
           
 
Method Summary
abstract  Document createDocument()
          Abstract Factory Method design pattern to create documents.
 ComponentRenderer getComponentRenderer(java.lang.Object component)
          Locates the proper renderer for the given component and returns it
 ComponentRenderer getComponentRenderer(java.lang.String className)
           
 void initializeDocument(Document document)
           
 void redirectoToStandardPage(ClientAgent agent, int status, java.lang.Throwable x)
          Renders a standard page based on the template and the status
abstract  Document renderDocument(ClientAgent agent, java.util.List<java.awt.Window> windows)
          Top level method used to get a document representing a rendering of the window of the agent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LIMIT_MODE

public static boolean LIMIT_MODE
Constructor Detail

AbstractDocumentRenderer

public AbstractDocumentRenderer()
Method Detail

createDocument

public abstract Document createDocument()
                                 throws java.lang.Exception
Abstract Factory Method design pattern to create documents.

Throws:
java.lang.Exception

renderDocument

public abstract Document renderDocument(ClientAgent agent,
                                        java.util.List<java.awt.Window> windows)
                                 throws java.lang.Exception
Description copied from interface: DocumentRenderer
Top level method used to get a document representing a rendering of the window of the agent

Specified by:
renderDocument in interface DocumentRenderer
Parameters:
agent - an agent representing a client to AjaxSwing application
Throws:
java.lang.Exception

initializeDocument

public void initializeDocument(Document document)

getComponentRenderer

public ComponentRenderer getComponentRenderer(java.lang.String className)

getComponentRenderer

public ComponentRenderer getComponentRenderer(java.lang.Object component)
Locates the proper renderer for the given component and returns it

Parameters:
component - descendant or Object descendant such as MenuBar
Throws:
AjaxSwingException - if there is no renderer for the component

redirectoToStandardPage

public void redirectoToStandardPage(ClientAgent agent,
                                    int status,
                                    java.lang.Throwable x)
                             throws java.lang.Exception
Renders a standard page based on the template and the status

Throws:
java.lang.Exception


Copyright © 2000-2012 CreamTec LLC. All Rights Reserved.