com.jeta.swingbuilder.gui.utils
Class FormConverter

java.lang.Object
  extended by com.jeta.swingbuilder.gui.utils.FormConverter

public class FormConverter
extends Object

This is a utility class for converting forms to/from XML/binary format. You must provide a valid Abeille project file or linked forms (nested forms that refer to other forms on disk) will not be resolved. Note that this class is in the com.jeta.swingbuilder package. This means that you will need to include designer.jar as well as formsrt.jar in your classpath if you decide to use this class to convert forms.


Constructor Summary
FormConverter(String projectFile)
          ctor creates a FormConverter object associated with the specified project.
 
Method Summary
 void convertToBinary(OutputStream binaryOutputStream, InputStream xmlInputStream)
          Converts an XML form to a binary .jfrm
 void convertToBinary(String binaryDestFile, String xmlSrcFile)
          Converts an XML form to a binary .jfrm
 void convertToXML(OutputStream xmlOutputStream, InputStream binaryInputStream)
          Converts a binary .jfrm to an XML file.
 void convertToXML(String xmlDestFile, String binarySrcFile)
          Converts a binary .jfrm to an XML file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormConverter

public FormConverter(String projectFile)
ctor creates a FormConverter object associated with the specified project.

Parameters:
projectFile - the full path and name of an Abeille project file. This is needed to resolve linked forms. For example: /home/jeff/abeille/myproject.jfpr
Method Detail

convertToXML

public void convertToXML(String xmlDestFile,
                         String binarySrcFile)
                  throws IOException,
                         FormException,
                         JMLException
Converts a binary .jfrm to an XML file.

Parameters:
xmlDestFile - the path and name of an XML file to create
binarySrcFile - the path an name of an existing binary .jfrm to read and convert.
Throws:
FormException
JMLException
IOException

convertToXML

public void convertToXML(OutputStream xmlOutputStream,
                         InputStream binaryInputStream)
                  throws FormException,
                         JMLException,
                         IOException
Converts a binary .jfrm to an XML file.

Throws:
FormException
JMLException
IOException

convertToBinary

public void convertToBinary(String binaryDestFile,
                            String xmlSrcFile)
                     throws FileNotFoundException,
                            ClassNotFoundException,
                            IOException,
                            JMLException,
                            FormException
Converts an XML form to a binary .jfrm

Parameters:
binaryDestFile -
xmlSrcFile -
Throws:
FileNotFoundException
ClassNotFoundException
IOException
JMLException
FormException

convertToBinary

public void convertToBinary(OutputStream binaryOutputStream,
                            InputStream xmlInputStream)
                     throws ClassNotFoundException,
                            IOException,
                            JMLException,
                            FormException
Converts an XML form to a binary .jfrm

Throws:
FileNotFoundException
ClassNotFoundException
IOException
JMLException
FormException


Copyright © 2005-2007 Jeff Tassin & Todd Viegut. All Rights Reserved.