org.apache.tapestry.describe
Class HTMLDescriptionReceiver

java.lang.Object
  extended byorg.apache.tapestry.describe.HTMLDescriptionReceiver
All Implemented Interfaces:
DescriptionReceiver

public class HTMLDescriptionReceiver
extends java.lang.Object
implements DescriptionReceiver

Implementation of DescriptionReceiverthat produces HTML output using a IMarkupWriter.

TODO: Make describeAlternate(Object) exclusive with the other methods title(String),property(String, Object), etc.

Since:
4.0
Author:
Howard M. Lewis Ship

Constructor Summary
HTMLDescriptionReceiver(IMarkupWriter writer, DescribableStrategy adapter)
           
HTMLDescriptionReceiver(IMarkupWriter writer, DescribableStrategy strategy, HTMLDescriptionReceiverStyles styles)
           
 
Method Summary
 void array(java.lang.String key, java.lang.Object[] values)
          Emits a list of values for the key.
 void collection(java.lang.String key, java.util.Collection values)
          As with array(String, Object[]), but the values are in a collection (which may be null, to emit nothing).
 void describe(java.lang.Object object)
           
 void describeAlternate(java.lang.Object alternate)
          Invoke to describe another object instead of the current object.
 void property(java.lang.String key, boolean value)
           
 void property(java.lang.String key, byte value)
           
 void property(java.lang.String key, char value)
           
 void property(java.lang.String key, double value)
           
 void property(java.lang.String key, float value)
           
 void property(java.lang.String key, int value)
           
 void property(java.lang.String key, long value)
           
 void property(java.lang.String key, java.lang.Object value)
          Emits a key/value pair, describing a property of the object.
 void property(java.lang.String key, short value)
           
 void section(java.lang.String section)
          Starts a new sub-section within the description.
 void title(java.lang.String title)
          Provides a title for the object; usually the object's class name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLDescriptionReceiver

public HTMLDescriptionReceiver(IMarkupWriter writer,
                               DescribableStrategy adapter)

HTMLDescriptionReceiver

public HTMLDescriptionReceiver(IMarkupWriter writer,
                               DescribableStrategy strategy,
                               HTMLDescriptionReceiverStyles styles)
Method Detail

describe

public void describe(java.lang.Object object)

describeAlternate

public void describeAlternate(java.lang.Object alternate)
Description copied from interface: DescriptionReceiver
Invoke to describe another object instead of the current object.

Specified by:
describeAlternate in interface DescriptionReceiver

title

public void title(java.lang.String title)
Description copied from interface: DescriptionReceiver
Provides a title for the object; usually the object's class name.

Specified by:
title in interface DescriptionReceiver

section

public void section(java.lang.String section)
Description copied from interface: DescriptionReceiver
Starts a new sub-section within the description. A description may have any number of sections (but sections do not nest). A second title is only emitted when the firstproperty within the section is emitted.

Specified by:
section in interface DescriptionReceiver

property

public void property(java.lang.String key,
                     java.lang.Object value)
Description copied from interface: DescriptionReceiver
Emits a key/value pair, describing a property of the object. The value will itself be described. This method is overridden for scalar property types.

Specified by:
property in interface DescriptionReceiver

property

public void property(java.lang.String key,
                     boolean value)
Specified by:
property in interface DescriptionReceiver

property

public void property(java.lang.String key,
                     byte value)
Specified by:
property in interface DescriptionReceiver

property

public void property(java.lang.String key,
                     short value)
Specified by:
property in interface DescriptionReceiver

property

public void property(java.lang.String key,
                     int value)
Specified by:
property in interface DescriptionReceiver

property

public void property(java.lang.String key,
                     long value)
Specified by:
property in interface DescriptionReceiver

property

public void property(java.lang.String key,
                     float value)
Specified by:
property in interface DescriptionReceiver

property

public void property(java.lang.String key,
                     double value)
Specified by:
property in interface DescriptionReceiver

property

public void property(java.lang.String key,
                     char value)
Specified by:
property in interface DescriptionReceiver

array

public void array(java.lang.String key,
                  java.lang.Object[] values)
Description copied from interface: DescriptionReceiver
Emits a list of values for the key. Each value will be described. Emits nothing if the array is null.

Specified by:
array in interface DescriptionReceiver

collection

public void collection(java.lang.String key,
                       java.util.Collection values)
Description copied from interface: DescriptionReceiver
As with DescriptionReceiver.array(String, Object[]), but the values are in a collection (which may be null, to emit nothing).

Specified by:
collection in interface DescriptionReceiver