net.sourceforge.jeuclid.converter
Class FreeHepConverter

java.lang.Object
  extended by net.sourceforge.jeuclid.converter.FreeHepConverter
All Implemented Interfaces:
ConverterPlugin

public class FreeHepConverter
extends Object
implements ConverterPlugin

Converter for output formats supported by FreeHEP.

Version:
$Revision: 1d64d806165c $

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.sourceforge.jeuclid.converter.ConverterPlugin
ConverterPlugin.DocumentWithDimension
 
Method Summary
 ConverterPlugin.DocumentWithDimension convert(Node doc, LayoutContext context)
          Convert from the given Math Object to an XML DOM Document.
 Dimension convert(Node doc, LayoutContext context, OutputStream outStream)
          Write the given MathBase object with its rendering parameters into the given output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

convert

public Dimension convert(Node doc,
                         LayoutContext context,
                         OutputStream outStream)
                  throws IOException
Write the given MathBase object with its rendering parameters into the given output stream.

Specified by:
convert in interface ConverterPlugin
Parameters:
doc - A JEuclid DocumentElement
context - LayoutContext to use.
outStream - Target output stream.
Returns:
Rendering's dimension based on the spefic plugin's Graphics2D implementation.
Throws:
IOException - if an I/O error occurred during write.

convert

public ConverterPlugin.DocumentWithDimension convert(Node doc,
                                                     LayoutContext context)
Convert from the given Math Object to an XML DOM Document.

Specified by:
convert in interface ConverterPlugin
Parameters:
doc - A JEuclid DocumentElement
context - LayoutContext to use.
Returns:
an instance of DocumentWithDimension, containing a Document of the appropriate subtype for this format (e.g. SVGDocument), if available. If conversion is not supported by this plugin, it may return null.


Copyright © 2002-2010 The JEuclid project. All Rights Reserved.