org.foray.output
Class MIFConverter

java.lang.Object
  extended by org.foray.output.OutputTarget
      extended by org.foray.output.Converter
          extended by org.foray.output.MIFConverter
All Implemented Interfaces:
org.axsl.output.OutputTarget

public class MIFConverter
extends Converter

Renders areas to MIF. Collects all the Pages and print them out at the end. This means that the MIF renderer does not stream.

Author:
Seshadri G, Mark Lillywhite

Constructor Summary
MIFConverter(org.axsl.mif.MifBook mifBook, org.apache.commons.logging.Log logger, org.axsl.output.DocumentConfiguration outputConfig)
          Create the MIF renderer.
 
Method Summary
protected  void addFilledRect(int x, int y, int w, int h, Color col)
          Creates a filled rectangle in the MIF output.
 void convert(org.axsl.fo.fo.Table table)
          Converts an FOTree table to a MIF Table.
 void convert(org.axsl.fo.fo.TableBody tableBody)
          Converts an FOTree table-body to a MIF Table Body.
 void convert(org.axsl.fo.fo.TableColumn column)
          Converts an FOTree table-column to a MIF Table Column.
 void convert(org.axsl.fo.fo.TableRow row)
          Converts an FOTree table-row to a MIF Table Row.
 int[] getFontSources()
           
 org.axsl.output.DocumentConfiguration getOutputConfiguration()
          Returns the output configuration for this renderer.
 void render(org.axsl.fo.fo.Block block)
          Render a given FOTree block.
 void render(org.axsl.fo.fo.TableCell cell)
          Converts an FOTree table-cell to a MIF Table Cell.
 void renderPage()
          Render a page.
 void startOutput()
           
 void stopOutput()
           
 
Methods inherited from class org.foray.output.OutputTarget
getApplicationName, getApplicationNameShort, getApplicationVersion, getDeveloperURLShort, getFontConsumer, getLogger, getOutputStream, getStrokeSVGText, outputStreamRequired, setApplicationName, setApplicationNameShort, setApplicationVersion, setDeveloperUrlShort, setFontConsumer, setOutputStream, setStrokeText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MIFConverter

public MIFConverter(org.axsl.mif.MifBook mifBook,
                    org.apache.commons.logging.Log logger,
                    org.axsl.output.DocumentConfiguration outputConfig)
Create the MIF renderer.

Parameters:
mifBook - The MIF book to be rendered.
logger - The logger.
outputConfig - The output configuration.
Method Detail

convert

public void convert(org.axsl.fo.fo.Table table)
Converts an FOTree table to a MIF Table.

Parameters:
table - The FOtree table to be converted.

convert

public void convert(org.axsl.fo.fo.TableBody tableBody)
Converts an FOTree table-body to a MIF Table Body.

Parameters:
tableBody - The FOtree table-body to be converted.

convert

public void convert(org.axsl.fo.fo.TableRow row)
Converts an FOTree table-row to a MIF Table Row.

Parameters:
row - The FOtree table-row to be converted.

convert

public void convert(org.axsl.fo.fo.TableColumn column)
Converts an FOTree table-column to a MIF Table Column.

Parameters:
column - The FOtree table-column to be converted.

render

public void render(org.axsl.fo.fo.TableCell cell)
Converts an FOTree table-cell to a MIF Table Cell.

Parameters:
cell - The FOtree table-cell to be converted.

addFilledRect

protected void addFilledRect(int x,
                             int y,
                             int w,
                             int h,
                             Color col)
Creates a filled rectangle in the MIF output.

Parameters:
x - The x coordinate of one corner of the rectangle, in millipoints.
y - The y coordinate of one corner of the rectangle, in millipoints.
w - The width of the rectangle, in millipoints.
h - The height of the rectangle, in millipoints.
col - The color of the rectangle.

render

public void render(org.axsl.fo.fo.Block block)
Render a given FOTree block.

Parameters:
block - The FOtree block to be rendered.

renderPage

public void renderPage()
Render a page.


startOutput

public void startOutput()
                 throws org.axsl.output.OutputException
Throws:
org.axsl.output.OutputException

stopOutput

public void stopOutput()
                throws org.axsl.output.OutputException
Throws:
org.axsl.output.OutputException

getFontSources

public int[] getFontSources()

getOutputConfiguration

public org.axsl.output.DocumentConfiguration getOutputConfiguration()
Description copied from class: OutputTarget
Returns the output configuration for this renderer.

Specified by:
getOutputConfiguration in class OutputTarget
Returns:
The output configuration for this renderer.


Copyright © 2017. All rights reserved.