2.17.2: 2011-06-17

net.sf.basedb.clients.web.extensions.renderer
Class PrefixSuffixRenderer<A extends Action>

java.lang.Object
  extended by net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer<A>
All Implemented Interfaces:
Renderer<A>, WrappingRenderer<A>

public class PrefixSuffixRenderer<A extends Action>
extends Object
implements WrappingRenderer<A>

A wrapping renderer for HTML output that can wrap the HTML generated by a parent renderer with a prefix and/or suffix.

Version:
2.12
Author:
Nicklas
Last modified
$Date: 2009-04-01 14:58:27 +0200 (Wed, 01 Apr 2009) $

Field Summary
private  JspContext context
           
private  Renderer<? super A> parent
           
private  String prefix
           
private  String suffix
           
 
Constructor Summary
PrefixSuffixRenderer(JspContext context, Renderer<? super A> parent, String prefix, String suffix)
          Create a prefix/suffix renderer with an initial parent.
PrefixSuffixRenderer(JspContext context, String prefix, String suffix)
          Create a prefix/suffix renderer that has no initial parent.
 
Method Summary
 Renderer<? super A> getParent()
          Get the current parent renderer.
 void render(A action)
          Render the action in the client application.
 void setParent(Renderer<? super A> parent)
          Set a parent renderer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

private JspContext context

parent

private Renderer<? super A extends Action> parent

prefix

private String prefix

suffix

private String suffix
Constructor Detail

PrefixSuffixRenderer

public PrefixSuffixRenderer(JspContext context,
                            String prefix,
                            String suffix)
Create a prefix/suffix renderer that has no initial parent.

Parameters:
context - The jsp context
prefix - Optional prefix string
suffix - Optional suffix string

PrefixSuffixRenderer

public PrefixSuffixRenderer(JspContext context,
                            Renderer<? super A> parent,
                            String prefix,
                            String suffix)
Create a prefix/suffix renderer with an initial parent.

Parameters:
context - The jsp context
parent - The initial parent renderer
prefix - Optional prefix string
suffix - Optional suffix string
Method Detail

render

public void render(A action)
Description copied from interface: Renderer
Render the action in the client application.

Specified by:
render in interface Renderer<A extends Action>
Parameters:
action - The action to render

getParent

public Renderer<? super A> getParent()
Description copied from interface: WrappingRenderer
Get the current parent renderer.

Specified by:
getParent in interface WrappingRenderer<A extends Action>
Returns:
A renderer or null if there is no parent

setParent

public void setParent(Renderer<? super A> parent)
Description copied from interface: WrappingRenderer
Set a parent renderer. Some implementations may have restrictions on this method. For example, they may not allow a parent renderer to be set after the object has been constructed, or they may not allow the parent to be set to null, etc.

Specified by:
setParent in interface WrappingRenderer<A extends Action>
Parameters:
parent - The parent renderer that should be wrapped by this renderer

2.17.2: 2011-06-17