WUI : API


org.westofj.wui
Class WHtmlLayout

java.lang.Object
  extended byorg.westofj.wui.WHtmlLayout
All Implemented Interfaces:
WMapLayoutManager

public final class WHtmlLayout
extends Object
implements WMapLayoutManager

An HTML layout manager renders the a container by replacing special tags in an HTML template with the HTML generated by the widgets.

Version:
$Revision: 1.8 $, $Date: 2004/03/22 00:34:01 $
Author:
bill

Constructor Summary
WHtmlLayout(String html)
          Constructs an HTML layout manager from String
 
Method Summary
static WHtmlLayout newFromFile(File file)
          Constructs an HTML layout manager from a file source.
static WHtmlLayout newFromFile(String path)
          Constructs an HTML layout manager from a file source.
static WHtmlLayout newFromReader(Reader reader)
          Constructs an HTML layout manager from a Reader source.
static WHtmlLayout newFromResource(String resource)
          Constructs an HTML layout manager from a resource on the classpath.
static WHtmlLayout newFromString(String html)
          Constructs an HTML layout manager from a String.
 void render(WMapContainer container, WRunner runner, WRenderContext context, PrintWriter out)
          Renders the WMapContainer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WHtmlLayout

public WHtmlLayout(String html)
Constructs an HTML layout manager from String

Parameters:
html - the String from which to read the layout specification.
Method Detail

newFromFile

public static WHtmlLayout newFromFile(File file)
                               throws IOException
Constructs an HTML layout manager from a file source.

Parameters:
file - the file from which to read the layout specification.
Returns:
WHtmlLayout the new layout manager.
Throws:
IOException

newFromFile

public static WHtmlLayout newFromFile(String path)
                               throws IOException
Constructs an HTML layout manager from a file source.

Parameters:
path - the file from which to read the layout specification.
Returns:
WHtmlLayout the new layout manager.
Throws:
IOException

newFromReader

public static WHtmlLayout newFromReader(Reader reader)
                                 throws IOException
Constructs an HTML layout manager from a Reader source.

Parameters:
reader - the reader from which to read the layout specification.
Returns:
WHtmlLayout the new layout manager.
Throws:
IOException

newFromResource

public static WHtmlLayout newFromResource(String resource)
                                   throws IOException
Constructs an HTML layout manager from a resource on the classpath.

Parameters:
resource - the resource from which to read the layout specification.
Returns:
WHtmlLayout the new layout manager.
Throws:
IOException

newFromString

public static WHtmlLayout newFromString(String html)
Constructs an HTML layout manager from a String.

Parameters:
html - the String from which to read the layout specification.
Returns:
WHtmlLayout the new layout manager.

render

public final void render(WMapContainer container,
                         WRunner runner,
                         WRenderContext context,
                         PrintWriter out)
                  throws WRenderException
Description copied from interface: WMapLayoutManager
Renders the WMapContainer.

Specified by:
render in interface WMapLayoutManager
Parameters:
container - the container to render.
runner - the current runner context.
out - the PrintWriterto which to render the WMapContainerinstance.
Throws:
WRenderException

Copyright (c) 2003 West of J - All rights reserved.