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.IllegalArgumentException
java.lang.IllegalAccessException
javax.xml.parsers.ParserConfigurationException
javax.xml.transform.TransformerException
public 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.TransformerException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.lang.SecurityException
public 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.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