org.foray.pioneer
Class PioneerLS

java.lang.Object
  extended by org.foray.layout.LayoutStrategy
      extended by org.foray.pioneer.PioneerLS
All Implemented Interfaces:
org.axsl.fo.ProxyFactory, org.axsl.layout.Layout, org.axsl.text.line.LineBreakHandler

public class PioneerLS
extends LayoutStrategy
implements org.axsl.fo.ProxyFactory

The LayoutStrategy implementation for the Pioneer layout strategy. The Pioneer layout strategy is an "eager" layout strategy, which is to say that it is built more for speed and simplicity than for full conformance with the XSL-FO standard. The general flow of the Pioneer layout strategy is as follows:


Constructor Summary
PioneerLS(org.apache.commons.logging.Log logger)
          Constructor.
 
Method Summary
 void addPendingFootnote(org.axsl.fo.fo.FootnoteBody fb)
          Adds a footnote to the list of pending (not laid out) footnotes.
 Status checkBreakBefore(org.axsl.fo.Fo node, org.axsl.area.Area area)
          Indicates whether a "break-before" condition exists for a given FO Tree node being laid out in a given AreaTree area.
 void completeCurrentLineInBlock(org.axsl.area.NormalBlockArea blockArea)
          Completes the current line in a given block area.
 BlockPL getBlockPL(org.axsl.area.NormalBlockArea blockArea)
          Returns the layout manager for a given block area.
protected  FONodePL getLayoutProxy(org.axsl.fo.Fo node)
          Return or create a layout proxy for a given FO Tree node.
 org.axsl.text.line.EagerLineBreaker getLineBreaker()
          Return the line breaker used by this layout system.
 void layoutStaticContent(org.axsl.fo.fo.PageSequence pageSequence, org.axsl.fo.fo.Region region, org.axsl.area.RegionRefArea area)
          For a given region, layout the static content for that region.
 Object makeFObjProxy(org.axsl.fo.Fo node)
          Create a proxy for a given FOTree node.
 BasicLinkPL makeProxy(org.axsl.fo.fo.BasicLink node)
           
 BidiOverridePL makeProxy(org.axsl.fo.fo.BidiOverride node)
           
 BlockPL makeProxy(org.axsl.fo.fo.Block node)
           
 BlockContainerPL makeProxy(org.axsl.fo.fo.BlockContainer node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.Bookmark node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.BookmarkTitle node)
           
 FOTextPL makeProxy(org.axsl.fo.fo.CharacterSequence node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.ColorProfile node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.Declarations node)
           
 ExternalGraphicPL makeProxy(org.axsl.fo.fo.ExternalGraphic node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.Float node)
           
 FlowPL makeProxy(org.axsl.fo.fo.Flow node)
           
 NoLayoutPL makeProxy(org.axsl.fo.Fo node)
           
 FootnotePL makeProxy(org.axsl.fo.fo.Footnote node)
           
 FootnoteBodyPL makeProxy(org.axsl.fo.fo.FootnoteBody node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.InitialPropertySet node)
           
 InlinePL makeProxy(org.axsl.fo.fo.Inline node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.InlineContainer node)
           
 InstreamForeignObjectPL makeProxy(org.axsl.fo.fo.InstreamForeignObject node)
           
 LeaderPL makeProxy(org.axsl.fo.fo.Leader node)
           
 ListBlockPL makeProxy(org.axsl.fo.fo.ListBlock node)
           
 ListItemPL makeProxy(org.axsl.fo.fo.ListItem node)
           
 ListItemBodyPL makeProxy(org.axsl.fo.fo.ListItemBody node)
           
 ListItemLabelPL makeProxy(org.axsl.fo.fo.ListItemLabel node)
           
 MarkerPL makeProxy(org.axsl.fo.fo.Marker node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.MultiCase node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.MultiProperties node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.MultiPropertySet node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.MultiSwitch node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.MultiToggle node)
           
 PageNumberPL makeProxy(org.axsl.fo.fo.PageNumber node)
           
 PageNumberCitationPL makeProxy(org.axsl.fo.fo.PageNumberCitation node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.PageSequence node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.RegionAfter node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.RegionBefore node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.RegionBody node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.RegionEnd node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.RegionStart node)
           
 RetrieveMarkerPL makeProxy(org.axsl.fo.fo.RetrieveMarker node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.Root node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.SimplePageMaster node)
           
 StaticContentPL makeProxy(org.axsl.fo.fo.StaticContent node)
           
 NoLayoutPL makeProxy(org.axsl.fo.foreign.SvgElement node)
           
 TablePL makeProxy(org.axsl.fo.fo.Table node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.TableAndCaption node)
           
 TableBodyPL makeProxy(org.axsl.fo.fo.TableBody node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.TableCaption node)
           
 TableCellPL makeProxy(org.axsl.fo.fo.TableCell node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.TableColumn node)
           
 TableFooterPL makeProxy(org.axsl.fo.fo.TableFooter node)
           
 TableHeaderPL makeProxy(org.axsl.fo.fo.TableHeader node)
           
 TableRowPL makeProxy(org.axsl.fo.fo.TableRow node)
           
 NoLayoutPL makeProxy(org.axsl.fo.fo.Title node)
           
 WrapperPL makeProxy(org.axsl.fo.fo.Wrapper node)
           
 void processPageSequence(org.axsl.area.PageCollection pageCollection)
          Performs layout on one PageCollection.
protected  void setLayoutProxy(org.axsl.fo.Fo node, FONodePL layoutProxy)
          Sets the linkage for a given FoNode.
 void setLineBreaker(org.axsl.text.line.EagerLineBreaker lineBreaker)
          Sets the line breaker for this layout system.
 
Methods inherited from class org.foray.layout.LayoutStrategy
formatPageSequence, formatStaticContent, getLogger, handleLineBreakNonText, handleLineBreakText, popInlineStack, pushInlineStack
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PioneerLS

public PioneerLS(org.apache.commons.logging.Log logger)
Constructor.

Parameters:
logger - The logger to be used by this layout system.
Method Detail

getBlockPL

public BlockPL getBlockPL(org.axsl.area.NormalBlockArea blockArea)
Returns the layout manager for a given block area.

Parameters:
blockArea - The block area for which the layout manager is needed.
Returns:
The layout manager.

completeCurrentLineInBlock

public void completeCurrentLineInBlock(org.axsl.area.NormalBlockArea blockArea)
Completes the current line in a given block area.

Parameters:
blockArea - The block area which should be completed.

processPageSequence

public void processPageSequence(org.axsl.area.PageCollection pageCollection)
                         throws org.axsl.area.AreaTreeException
Description copied from class: LayoutStrategy
Performs layout on one PageCollection.

Specified by:
processPageSequence in class LayoutStrategy
Parameters:
pageCollection - The (empty) page collection into which layout should be placed. (The PageCollection has a reference to the FOTree PageSequence that has the content to be laid out).
Throws:
org.axsl.area.AreaTreeException - For errors during layout.

layoutStaticContent

public void layoutStaticContent(org.axsl.fo.fo.PageSequence pageSequence,
                                org.axsl.fo.fo.Region region,
                                org.axsl.area.RegionRefArea area)
                         throws org.axsl.area.AreaTreeException
Description copied from class: LayoutStrategy
For a given region, layout the static content for that region. This method allows PageCollection to generate blank pages as needed, and to call back to the LayoutStrategy for layout of the static content, without having to know the specifics of the layout process.

Specified by:
layoutStaticContent in class LayoutStrategy
Parameters:
pageSequence - The page sequence whose static content is being processed.
region - The page region whose static content is being laid out.
area - The region area into which the static content should be placed.
Throws:
org.axsl.area.AreaTreeException - For errors during layout.

checkBreakBefore

public Status checkBreakBefore(org.axsl.fo.Fo node,
                               org.axsl.area.Area area)
Indicates whether a "break-before" condition exists for a given FO Tree node being laid out in a given AreaTree area.

Parameters:
node - The FO Tree node to be laid out.
area - The AreaTree area into which node should be laid out.
Returns:
The break-before condition if a break is required, or Status.OK if no break is required.

makeFObjProxy

public Object makeFObjProxy(org.axsl.fo.Fo node)
Create a proxy for a given FOTree node.

Parameters:
node - The FOTree node for which a proxy needs to be created.
Returns:
The newly-created proxy.

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.Fo node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.PageSequence node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.BookmarkTitle node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.Bookmark node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.ColorProfile node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.Declarations node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public FOTextPL makeProxy(org.axsl.fo.fo.CharacterSequence node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.Title node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public BidiOverridePL makeProxy(org.axsl.fo.fo.BidiOverride node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public BlockPL makeProxy(org.axsl.fo.fo.Block node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public BlockContainerPL makeProxy(org.axsl.fo.fo.BlockContainer node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public ExternalGraphicPL makeProxy(org.axsl.fo.fo.ExternalGraphic node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public FlowPL makeProxy(org.axsl.fo.fo.Flow node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public FootnotePL makeProxy(org.axsl.fo.fo.Footnote node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.Float node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public FootnoteBodyPL makeProxy(org.axsl.fo.fo.FootnoteBody node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.InitialPropertySet node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public InlinePL makeProxy(org.axsl.fo.fo.Inline node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.InlineContainer node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public InstreamForeignObjectPL makeProxy(org.axsl.fo.fo.InstreamForeignObject node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public LeaderPL makeProxy(org.axsl.fo.fo.Leader node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public ListBlockPL makeProxy(org.axsl.fo.fo.ListBlock node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public ListItemPL makeProxy(org.axsl.fo.fo.ListItem node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public ListItemBodyPL makeProxy(org.axsl.fo.fo.ListItemBody node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public ListItemLabelPL makeProxy(org.axsl.fo.fo.ListItemLabel node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public MarkerPL makeProxy(org.axsl.fo.fo.Marker node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.MultiCase node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.MultiProperties node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.MultiPropertySet node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.MultiSwitch node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.MultiToggle node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public PageNumberPL makeProxy(org.axsl.fo.fo.PageNumber node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public PageNumberCitationPL makeProxy(org.axsl.fo.fo.PageNumberCitation node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public RetrieveMarkerPL makeProxy(org.axsl.fo.fo.RetrieveMarker node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public StaticContentPL makeProxy(org.axsl.fo.fo.StaticContent node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public TablePL makeProxy(org.axsl.fo.fo.Table node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.TableAndCaption node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public TableBodyPL makeProxy(org.axsl.fo.fo.TableBody node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.TableCaption node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public TableCellPL makeProxy(org.axsl.fo.fo.TableCell node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.TableColumn node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public TableFooterPL makeProxy(org.axsl.fo.fo.TableFooter node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public TableHeaderPL makeProxy(org.axsl.fo.fo.TableHeader node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public TableRowPL makeProxy(org.axsl.fo.fo.TableRow node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public WrapperPL makeProxy(org.axsl.fo.fo.Wrapper node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.RegionAfter node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.RegionBefore node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.RegionBody node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.RegionEnd node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.RegionStart node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.Root node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.fo.SimplePageMaster node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public BasicLinkPL makeProxy(org.axsl.fo.fo.BasicLink node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

makeProxy

public NoLayoutPL makeProxy(org.axsl.fo.foreign.SvgElement node)
Specified by:
makeProxy in interface org.axsl.fo.ProxyFactory

getLineBreaker

public org.axsl.text.line.EagerLineBreaker getLineBreaker()
Return the line breaker used by this layout system.

Returns:
The line breaker.

setLineBreaker

public void setLineBreaker(org.axsl.text.line.EagerLineBreaker lineBreaker)
Sets the line breaker for this layout system.

Parameters:
lineBreaker - The new line breaker.

getLayoutProxy

protected FONodePL getLayoutProxy(org.axsl.fo.Fo node)
Return or create a layout proxy for a given FO Tree node.

Parameters:
node - The node for which the proxy is needed.
Returns:
The proxy.

setLayoutProxy

protected void setLayoutProxy(org.axsl.fo.Fo node,
                              FONodePL layoutProxy)
Sets the linkage for a given FoNode.

Parameters:
node - The node whose linkage is to be set.
layoutProxy - The layout proxy for node.

addPendingFootnote

public void addPendingFootnote(org.axsl.fo.fo.FootnoteBody fb)
Adds a footnote to the list of pending (not laid out) footnotes.

Parameters:
fb - The footnote to be added.


Copyright © 2017. All rights reserved.