sunlabs.brazil.template
Class NoImageTemplate

java.lang.Object
  extended by sunlabs.brazil.template.Template
      extended by sunlabs.brazil.template.NoImageTemplate (view source)
All Implemented Interfaces:
TemplateInterface

public class NoImageTemplate
extends Template

Sample template class for removing all images from a web page, and replacing them with their alt strings. This class is used by the TemplateHandler Each image is replaced by a text string defined by the server property "template", which the first "%" replaced by the contents of the alt attribute. Defaults to "[<b>%<b>]".

template
The text used to replace the image. The first "%" will contain the image "alt" string, if any.


Field Summary
 
Fields inherited from class sunlabs.brazil.template.Template
debug
 
Constructor Summary
NoImageTemplate()
           
 
Method Summary
 boolean init(RewriteContext hr)
          Save a reference to our request properties We'll use it some day to tailor the image display
 void tag_img(RewriteContext hr)
          Convert the html tag img into text using the alt string
 
Methods inherited from class sunlabs.brazil.template.Template
done
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoImageTemplate

public NoImageTemplate()
Method Detail

init

public boolean init(RewriteContext hr)
Save a reference to our request properties We'll use it some day to tailor the image display

Specified by:
init in interface TemplateInterface
Overrides:
init in class Template

tag_img

public void tag_img(RewriteContext hr)
Convert the html tag img into text using the alt string

Parameters:
hr - The rewrite context containing the name/value pairs. src= alt=<...>

Version Kenai-svn-r24, Generated 08/18/09
Copyright (c) 2001-2009, Sun Microsystems.