org.jfree.layouting.normalizer.generator

Class DefaultContentGenerator

public class DefaultContentGenerator extends Object implements ContentGenerator

The default content generator produces CSS-compliant content structures (also known as DOM-Trees). This model explicitly allows block elements to contain other block elements and to do all kinds of weird mixing of elements.

The content generator already has all knowledge to compute the manual pagebreaks. So this class could already fire pagebreaks. The next element in the layouting chain will be the Layouter itself. The renderer computes the element positions,knows about the page sizes (and whether we have pages anyway) and more important - keeps track of the current page and the page fill state.

The content generator is conceptionally a part of the normalizer step, and thererfore has access to the raw display model. The renderer receives a more generic view with no object hierarchies at all - if that whould be needed, it has to be rebuilt. (This simplifies serialization, so that most remote calls are now self-contained and do not supply a possibly contradictionary context (in terms of object-identity)).

Author: Thomas Morgner

Constructor Summary
DefaultContentGenerator(LayoutProcess layoutProcess)
protected DefaultContentGenerator(Renderer renderer)
Method Summary
voidaddContent(LayoutContext node, ContentToken contentToken)
voidaddPassThroughContent(LayoutContext node, ContentToken token)
voidfinishedBlock()
voidfinishedDocument()
Receives notification, that a new flow has started.
voidfinishedFlow()
voidfinishedInline()
voidfinishedMarker()
voidfinishedPassThrough()
voidfinishedRootInline()
voidfinishedTable()
voidfinishedTableCaption()
voidfinishedTableCell()
voidfinishedTableColumn()
voidfinishedTableColumnGroup()
voidfinishedTableRow()
voidfinishedTableSection()
RenderergetRenderer()
voidhandlePageBreak(PageContext pageContext)
StatesaveState()
voidstartedBlock(LayoutContext element)
voidstartedDocument(PageContext pageContext)
Receives the information, that the document processing has been started.
voidstartedFlow(LayoutContext element)
voidstartedInline(LayoutContext element)
voidstartedMarker(LayoutContext element)
voidstartedPassThrough(LayoutContext element)
voidstartedRootInline(LayoutContext element)
voidstartedTable(LayoutContext element)
voidstartedTableCaption(LayoutContext context)
voidstartedTableCell(LayoutContext element)
voidstartedTableColumn(LayoutContext element)
voidstartedTableColumnGroup(LayoutContext element)
voidstartedTableRow(LayoutContext element)
voidstartedTableSection(LayoutContext element)

Constructor Detail

DefaultContentGenerator

public DefaultContentGenerator(LayoutProcess layoutProcess)

DefaultContentGenerator

protected DefaultContentGenerator(Renderer renderer)

Method Detail

addContent

public void addContent(LayoutContext node, ContentToken contentToken)

addPassThroughContent

public void addPassThroughContent(LayoutContext node, ContentToken token)

finishedBlock

public void finishedBlock()

finishedDocument

public void finishedDocument()
Receives notification, that a new flow has started. A new flow is started for each flowing or absolutly positioned element.

Parameters: box

finishedFlow

public void finishedFlow()

finishedInline

public void finishedInline()

finishedMarker

public void finishedMarker()

finishedPassThrough

public void finishedPassThrough()

finishedRootInline

public void finishedRootInline()

finishedTable

public void finishedTable()

finishedTableCaption

public void finishedTableCaption()

finishedTableCell

public void finishedTableCell()

finishedTableColumn

public void finishedTableColumn()

finishedTableColumnGroup

public void finishedTableColumnGroup()

finishedTableRow

public void finishedTableRow()

finishedTableSection

public void finishedTableSection()

getRenderer

public Renderer getRenderer()

handlePageBreak

public void handlePageBreak(PageContext pageContext)

saveState

public State saveState()

startedBlock

public void startedBlock(LayoutContext element)

startedDocument

public void startedDocument(PageContext pageContext)
Receives the information, that the document processing has been started. This is fired only once.

startedFlow

public void startedFlow(LayoutContext element)

startedInline

public void startedInline(LayoutContext element)

startedMarker

public void startedMarker(LayoutContext element)

startedPassThrough

public void startedPassThrough(LayoutContext element)

startedRootInline

public void startedRootInline(LayoutContext element)

startedTable

public void startedTable(LayoutContext element)

startedTableCaption

public void startedTableCaption(LayoutContext context)

startedTableCell

public void startedTableCell(LayoutContext element)

startedTableColumn

public void startedTableColumn(LayoutContext element)

startedTableColumnGroup

public void startedTableColumnGroup(LayoutContext element)

startedTableRow

public void startedTableRow(LayoutContext element)

startedTableSection

public void startedTableSection(LayoutContext element)