|
JFormDesigner 5.0.4 Runtime API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jformdesigner.runtime.FormLoader
public class FormLoader
Loads the form model from a JFormDesigner .jfd file into memory.
Use FormCreator to create Swing component instances.
The separation of the file loading and the component creation into two classes
(FormLoader and FormCreator) enables you to cache the form model
in memory. Using FormCreator it's possible to create multiple instances
of a form from one form model.
| Method Summary | |
|---|---|
static FormModel |
load(java.io.File file)
Loads a form model from the specified file. |
static FormModel |
load(java.io.InputStream in)
Loads a form model from the given input stream. |
static FormModel |
load(java.io.InputStream in,
java.lang.ClassLoader classLoader)
Loads a form model from the given input stream. |
static FormModel |
load(java.lang.String resourceName)
Loads a form model from the specified resource using the default class loader. |
static FormModel |
load(java.lang.String resourceName,
java.lang.ClassLoader classLoader)
Loads a form model from the specified resource using the specified class loader. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static FormModel load(java.lang.String resourceName)
throws java.lang.Exception
ClassLoader.getResourceAsStream(java.lang.String)
to locate and load the form file.
resourceName - The name of the resource containing a form
(e.g. "com/jformdesigner/examples/LoaderExample.jfd").
java.lang.Exception - See load(InputStream) for details.
public static FormModel load(java.lang.String resourceName,
java.lang.ClassLoader classLoader)
throws java.lang.Exception
ClassLoader.getResourceAsStream(java.lang.String)
to locate and load the form file.
resourceName - The name of the resource containing a form
(e.g. "com/jformdesigner/examples/LoaderExample.jfd").classLoader - The class loader.
java.lang.Exception - See load(InputStream) for details.
public static FormModel load(java.io.File file)
throws java.lang.Exception
file - The file containing a form.
java.lang.Exception - See load(InputStream) for details.
public static FormModel load(java.io.InputStream in)
throws java.lang.Exception
A BufferedInputStream is used to improve performance.
in - The input stream. Closed when this method returns.
java.lang.IllegalArgumentException - If the input stream is null.
java.io.IOException - If an error occurred when reading from the input stream.
SAXParseException - If an error occurred when parsing the XML content.
java.lang.ClassNotFoundException - If a class used in the XML content is not found.
java.lang.ClassCastException - If the root object in the XML content is not a FormModel.
java.lang.Exception - If an other error occurred when decoding the XML content.
public static FormModel load(java.io.InputStream in,
java.lang.ClassLoader classLoader)
throws MultiException
A BufferedInputStream is used to improve performance.
in - The input stream. Closed when this method returns.classLoader - The class loader used to load classes.
java.lang.IllegalArgumentException - If the input stream is null.
MultiException - If a problem occurred when encoding the form model to XML.
java.lang.ClassCastException - If the root object in the XML content is not a FormModel.
|
JFormDesigner 5.0.4 Runtime API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||