nl.flotsam.pecia.builder.html
Class HtmlDocumentBuilder.HtmlParaBuilder<T>

java.lang.Object
  extended by nl.flotsam.pecia.builder.base.AbstractBuilder<T>
      extended by nl.flotsam.pecia.builder.base.DefaultParaBuilder<T>
          extended by nl.flotsam.pecia.builder.html.HtmlDocumentBuilder.HtmlParaBuilder<T>
All Implemented Interfaces:
Initializer<ParaBuilder<T>>, ParaBuilder<T>, DocumentElement<T>, Para<T>, ParaContents<T>
Enclosing class:
HtmlDocumentBuilder

public static class HtmlDocumentBuilder.HtmlParaBuilder<T>
extends DefaultParaBuilder<T>


Constructor Summary
HtmlDocumentBuilder.HtmlParaBuilder(DocumentBuilder builder, T parent, LifecycleListener listener, XmlWriter xmlWriter)
           
 
Method Summary
 Para<T> code(String text)
          Adds some code to the paragraph.
 Para<T> email(String email)
          Inserts an email address.
 Para<T> emphasis(String text)
          Adds an inline emphasized section.
 Para<T> link(Object id, String text)
          Constructs a link to the documet item identified by the specified id.
 Para<T> term(Object id, String text)
          Inserts a term into the content.
 Para<T> text(String text)
          Appends some text to the paragraph.
 Para<T> xref(String id)
          Inserts a cross reference to another document element.
 
Methods inherited from class nl.flotsam.pecia.builder.base.DefaultParaBuilder
document, footnote, footnote, start
 
Methods inherited from class nl.flotsam.pecia.builder.base.AbstractBuilder
end, getBuilder, getListener, getParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface nl.flotsam.pecia.DocumentElement
end, getParent
 

Constructor Detail

HtmlDocumentBuilder.HtmlParaBuilder

public HtmlDocumentBuilder.HtmlParaBuilder(DocumentBuilder builder,
                                           T parent,
                                           LifecycleListener listener,
                                           XmlWriter xmlWriter)
Method Detail

code

public Para<T> code(String text)
Description copied from interface: ParaContents
Adds some code to the paragraph. (Processing expectation: monospaced, 'code'-like rendering.)

Specified by:
code in interface ParaContents<T>
Overrides:
code in class DefaultParaBuilder<T>
Parameters:
text - The text to be produced as code.
Returns:
The same parent element as the one on which this operation is invoked.

link

public Para<T> link(Object id,
                    String text)
Description copied from interface: ParaContents
Constructs a link to the documet item identified by the specified id.

Specified by:
link in interface ParaContents<T>
Overrides:
link in class DefaultParaBuilder<T>
Parameters:
id - The identifier of the document element referenced.
text - The text to be included in the link.
Returns:
The parent element of the link.

email

public Para<T> email(String email)
Description copied from interface: ParaContents
Inserts an email address.

Specified by:
email in interface ParaContents<T>
Overrides:
email in class DefaultParaBuilder<T>
Parameters:
email - The email address.
Returns:
The paragraph in which the email address is inserted.

emphasis

public Para<T> emphasis(String text)
Description copied from interface: ParaContents
Adds an inline emphasized section.

Specified by:
emphasis in interface ParaContents<T>
Overrides:
emphasis in class DefaultParaBuilder<T>
Parameters:
text - The text to be emphasized.
Returns:
The same parent element as the one on which this operation is invoked.

text

public Para<T> text(String text)
Description copied from interface: ParaContents
Appends some text to the paragraph.

Specified by:
text in interface ParaContents<T>
Overrides:
text in class DefaultParaBuilder<T>
Parameters:
text - The text to be appended to the paragraph.
Returns:
The same parent element as the one on which this operation is invoked.

xref

public Para<T> xref(String id)
Description copied from interface: ParaContents
Inserts a cross reference to another document element.

Specified by:
xref in interface ParaContents<T>
Overrides:
xref in class DefaultParaBuilder<T>
Parameters:
id - The identifier of the element to which you are referring.
Returns:
The paragraph in which the email address is inserted.

term

public Para<T> term(Object id,
                    String text)
Description copied from interface: ParaContents
Inserts a term into the content.

Specified by:
term in interface ParaContents<T>
Overrides:
term in class DefaultParaBuilder<T>
Parameters:
id - The object identifying this term.
text - The term itself.


Copyright © 2010. All Rights Reserved.