rabbit.filter
Class SimpleTagFilter

java.lang.Object
  extended byrabbit.filter.HTMLFilter
      extended byrabbit.filter.SimpleTagFilter
Direct Known Subclasses:
BackgroundFilter, BodyFilter

public abstract class SimpleTagFilter
extends HTMLFilter

A class that inserts some text and links at the top of a page. Useful for inserting links to unfiltered page.


Field Summary
 
Fields inherited from class rabbit.filter.HTMLFilter
request, response
 
Constructor Summary
SimpleTagFilter(HTTPHeader request, HTTPHeader response)
          Create a new SimpleTagFilter for the given request, response pair.
 
Method Summary
 void filterHTML(HTMLBlock block)
          Iterate over all tags and call handleTag on them.
abstract  void handleTag(Tag tag, HTMLBlock block, int tokenIndex)
          Handle a tag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleTagFilter

public SimpleTagFilter(HTTPHeader request,
                       HTTPHeader response)
Create a new SimpleTagFilter for the given request, response pair.

Parameters:
request - the actual request made.
response - the actual response being sent.
Method Detail

filterHTML

public void filterHTML(HTMLBlock block)
Iterate over all tags and call handleTag on them.

Specified by:
filterHTML in class HTMLFilter
Parameters:
block - the part of the html page we are filtering.

handleTag

public abstract void handleTag(Tag tag,
                               HTMLBlock block,
                               int tokenIndex)
Handle a tag.

Parameters:
tag - the Tag to handle.
block - the current HTMLBlock
tokenIndex - the index of the current Token