simple.template.layout
Class PlainLayout

java.lang.Object
  extended by simple.template.layout.PlainLayout
All Implemented Interfaces:
Layout

public class PlainLayout
extends java.lang.Object
implements Layout

The PlainLayout object provides an implementation of the Layout interface, which performs no layout. All documents retrieved from this implementation are directly taken from the provided PanelFactory. This is used if there is no specific implementation suggested. Also it is used when no layout is required by the template engine.

Author:
Niall Gallagher

Constructor Summary
PlainLayout(simple.template.layout.PanelFactory factory)
          Constructor for the PlainLayout object.
 
Method Summary
 Panel getPanel(java.lang.String name, java.lang.Object data, boolean share)
          This method basically acts as an adapter method to the provided PanelFactory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlainLayout

public PlainLayout(simple.template.layout.PanelFactory factory)
Constructor for the PlainLayout object. The factory provided to this object is used to retrieve all requested Dcoument objects, which will remain unmodified by the Layout implementation.

Parameters:
factory - the factory that produces all documents
Method Detail

getPanel

public Panel getPanel(java.lang.String name,
                      java.lang.Object data,
                      boolean share)
               throws java.lang.Exception
This method basically acts as an adapter method to the provided PanelFactory. This will leave all retrieved documents unmodified so that no layout is used.

Specified by:
getPanel in interface Layout
Parameters:
name - this is the target template to be retrieved
data - this is the data source used by the template
share - should the data model be inherited or shared
Throws:
java.lang.Exception