nl.flotsam.pecia.builder.base
Class DefaultSectionBuilder<T>

java.lang.Object
  extended by nl.flotsam.pecia.builder.base.AbstractBuilder<T>
      extended by nl.flotsam.pecia.builder.base.DefaultSectionBuilder<T>
All Implemented Interfaces:
AnnotatedSection<T>, Initializer<AnnotatedSection<T>>, SectionBuilder<T>, Contents<Section<T>>, DocumentElement<T>, Section<T>, SimpleContents<Section<T>>

public class DefaultSectionBuilder<T>
extends AbstractBuilder<T>
implements SectionBuilder<T>


Constructor Summary
DefaultSectionBuilder(DocumentBuilder builder, String title, T parent, LifecycleListener listener)
           
 
Method Summary
 Section<T> document(Documenter<SimpleContents<?>> target)
          Generates documentation, and returns the current context.
 String getId()
           
 String getTitle()
           
 ItemizedList<? extends Section<T>> itemizedList()
          Adds an itemized list.
 AnnotatedSection<T> mark(String id)
          Marks the section with a certain unique identifier.
 ItemizedList<? extends Section<T>> orderedList()
          Adds an ordered list.
 Para<? extends Section<T>> para()
          Adds a paragraph.
 Section<T> para(String text)
          Adds a paragraph (Para) containing the text passed in.
 AnnotatedSection<? extends Section<T>> section(String title)
          Adds a new section.
 AnnotatedSection<T> start()
           
 Table2Cols<? extends Section<T>> table2Cols()
          Adds a two-column table.
 Table3Cols<? extends Section<T>> table3Cols()
          Adds a three-column table.
 Table4Cols<? extends Section<T>> table4Cols()
          Adds a four-column table.
 Table5Cols<? extends Section<T>> table5Cols()
          Adds a five-column table.
 Verbatim<? extends Section<T>> verbatim()
          Adds verbatim content.
 
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

DefaultSectionBuilder

public DefaultSectionBuilder(DocumentBuilder builder,
                             String title,
                             T parent,
                             LifecycleListener listener)
Method Detail

itemizedList

public ItemizedList<? extends Section<T>> itemizedList()
Description copied from interface: SimpleContents
Adds an itemized list.

Specified by:
itemizedList in interface SimpleContents<Section<T>>
Returns:
The itemized list just created.

orderedList

public ItemizedList<? extends Section<T>> orderedList()
Description copied from interface: SimpleContents
Adds an ordered list.

Specified by:
orderedList in interface SimpleContents<Section<T>>
Returns:
The ordered list just created.

para

public Para<? extends Section<T>> para()
Description copied from interface: SimpleContents
Adds a paragraph.

Specified by:
para in interface SimpleContents<Section<T>>
Returns:
The paragraph added.

section

public AnnotatedSection<? extends Section<T>> section(String title)
Description copied from interface: Contents
Adds a new section.

Specified by:
section in interface Contents<Section<T>>
Parameters:
title - The title of the section.
Returns:
The section just created.

table2Cols

public Table2Cols<? extends Section<T>> table2Cols()
Description copied from interface: SimpleContents
Adds a two-column table.

Specified by:
table2Cols in interface SimpleContents<Section<T>>
Returns:
A two column table.

table3Cols

public Table3Cols<? extends Section<T>> table3Cols()
Description copied from interface: SimpleContents
Adds a three-column table.

Specified by:
table3Cols in interface SimpleContents<Section<T>>
Returns:
A three column table.

table4Cols

public Table4Cols<? extends Section<T>> table4Cols()
Description copied from interface: SimpleContents
Adds a four-column table.

Specified by:
table4Cols in interface SimpleContents<Section<T>>
Returns:
A four column table.

table5Cols

public Table5Cols<? extends Section<T>> table5Cols()
Description copied from interface: SimpleContents
Adds a five-column table.

Specified by:
table5Cols in interface SimpleContents<Section<T>>
Returns:
A five column table.

verbatim

public Verbatim<? extends Section<T>> verbatim()
Description copied from interface: SimpleContents
Adds verbatim content.

Specified by:
verbatim in interface SimpleContents<Section<T>>
Returns:
The object representing verbatim content.

start

public AnnotatedSection<T> start()
Specified by:
start in interface Initializer<AnnotatedSection<T>>

getTitle

public String getTitle()
Specified by:
getTitle in interface SectionBuilder<T>

mark

public AnnotatedSection<T> mark(String id)
Description copied from interface: AnnotatedSection
Marks the section with a certain unique identifier. (Relevant for cross references.)

Specified by:
mark in interface AnnotatedSection<T>
Parameters:
id - The identifier of that section.
Returns:
The start of the Section, allowing you to potentially add more metadata.)

getId

public String getId()
Specified by:
getId in interface SectionBuilder<T>

para

public Section<T> para(String text)
Description copied from interface: SimpleContents
Adds a paragraph (Para) containing the text passed in.

Specified by:
para in interface SimpleContents<Section<T>>
Parameters:
text - The text to be added to the paragraph.
Returns:
The current element.

document

public Section<T> document(Documenter<SimpleContents<?>> target)
Description copied from interface: SimpleContents
Generates documentation, and returns the current context.

Specified by:
document in interface SimpleContents<Section<T>>
Parameters:
target - The object generating the documentation.


Copyright © 2010. All Rights Reserved.