public class SimpleMarshaller
extends java.lang.Object
MoveableItem class
automatically, saving and loading the basic parameters (x, y, width, height,
drawerId, image, transformation matrix and class name) as well as all extra
fields that are marked with XmlAttribute annotation.| Constructor and Description |
|---|
SimpleMarshaller() |
| Modifier and Type | Method and Description |
|---|---|
static void |
marshallLayout(java.io.File file)
Save the layout of the workspace into the specified file.
|
static void |
unmarshallGui(Application app,
java.io.File file)
Load the GUI layout from the specified file.
|
static void |
unmarshallLayout(java.io.File file)
Load the workspace layout from the specified file.
|
public static void marshallLayout(java.io.File file)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException,
javax.xml.parsers.ParserConfigurationException,
javax.xml.transform.TransformerException
file - a valid file instance to save the layout intojava.lang.IllegalArgumentExceptionjava.lang.IllegalAccessExceptionjavax.xml.parsers.ParserConfigurationExceptionjavax.xml.transform.TransformerExceptionpublic static void unmarshallLayout(java.io.File file)
throws javax.xml.transform.TransformerException,
java.lang.IllegalArgumentException,
java.lang.IllegalAccessException,
java.lang.InstantiationException,
java.lang.reflect.InvocationTargetException,
java.lang.NoSuchMethodException,
java.lang.SecurityException
file - valid XML file that contains a workspace layoutjavax.xml.transform.TransformerExceptionjava.lang.IllegalArgumentExceptionjava.lang.IllegalAccessExceptionjava.lang.InstantiationExceptionjava.lang.reflect.InvocationTargetExceptionjava.lang.NoSuchMethodExceptionjava.lang.SecurityExceptionpublic static void unmarshallGui(Application app, java.io.File file) throws javax.xml.transform.TransformerException, java.lang.NumberFormatException, java.lang.IllegalArgumentException, java.lang.IllegalAccessException, org.w3c.dom.DOMException, java.lang.InstantiationException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.SecurityException
app - Application objectfile - valid XML file that contains the GUI layoutjavax.xml.transform.TransformerExceptionjava.lang.NumberFormatExceptionjava.lang.IllegalArgumentExceptionjava.lang.IllegalAccessExceptionorg.w3c.dom.DOMExceptionjava.lang.InstantiationExceptionjava.lang.reflect.InvocationTargetExceptionjava.lang.NoSuchMethodExceptionjava.lang.SecurityException