|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.docking.DockingPersistenceUtils
public class DockingPersistenceUtils
The docking persistence utility class to save/load docking layout to/from XML format stream or file.
Constructor Summary | |
---|---|
DockingPersistenceUtils()
|
Method Summary | |
---|---|
static boolean |
compare(Document document1,
Document document2)
Compare two documents to check if the saved layout are the same. |
static boolean |
compare(Document document1,
String layoutName1,
Document document2,
String layoutName2)
Compare two documents to check if the saved layout are the same. |
static boolean |
load(DefaultDockingManager manager,
Document document,
PersistenceUtilsCallback.Load callback)
Loads the docking manager from the document. |
static boolean |
load(DefaultDockingManager manager,
InputStream in)
|
static boolean |
load(DefaultDockingManager manager,
InputStream in,
PersistenceUtilsCallback.Load callback)
|
static boolean |
load(DefaultDockingManager manager,
String fileName)
|
static boolean |
load(DefaultDockingManager manager,
String fileName,
PersistenceUtilsCallback.Load callback)
|
static void |
save(DefaultDockingManager manager,
OutputStream out)
Saves the DefaultDockingManager's layout to an output stream. |
static void |
save(DefaultDockingManager manager,
OutputStream out,
String encoding)
Saves the DefaultDockingManager's layout to an output stream. |
static void |
save(DefaultDockingManager manager,
OutputStream out,
String encoding,
PersistenceUtilsCallback.Save callback)
Saves the DefaultDockingManager's layout to an output stream. |
static Document |
save(DefaultDockingManager manager,
PersistenceUtilsCallback.Save callback)
Save the docking manager to a Document. |
static void |
save(DefaultDockingManager manager,
String fileName)
Saves the DefaultDockingManager's layout to a file. |
static void |
save(DefaultDockingManager manager,
String fileName,
String encoding)
Saves the DefaultDockingManager's layout to a file. |
static void |
save(DefaultDockingManager manager,
String fileName,
String encoding,
PersistenceUtilsCallback.Save callback)
Saves the DefaultDockingManager's layout to a file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DockingPersistenceUtils()
Method Detail |
---|
public static void save(DefaultDockingManager manager, String fileName) throws ParserConfigurationException, IOException
manager
- the docking managerfileName
- the file name
ParserConfigurationException
- if a DocumentBuilder cannot be created which satisfies the configuration
IOException
- If the pathname argument is null or any IO errors happenpublic static void save(DefaultDockingManager manager, String fileName, String encoding) throws ParserConfigurationException, IOException
manager
- the docking managerfileName
- the file nameencoding
- the encoding choice. It would be UTF-8 in default if you call the method without this parameter.
ParserConfigurationException
- if a DocumentBuilder cannot be created which satisfies the configuration
IOException
- If the pathname argument is null or any IO errors happenpublic static void save(DefaultDockingManager manager, String fileName, String encoding, PersistenceUtilsCallback.Save callback) throws ParserConfigurationException, IOException
manager
- the docking managerfileName
- the file nameencoding
- the encoding choice. It would be UTF-8 in default if you call the method without this parameter.callback
- the callback which will be called when saving each element to the XML document.
ParserConfigurationException
- if a DocumentBuilder cannot be created which satisfies the configuration
IOException
- If the pathname argument is null or any IO errors happenpublic static void save(DefaultDockingManager manager, OutputStream out) throws ParserConfigurationException, IOException
manager
- the docking managerout
- the output stream
ParserConfigurationException
- if a DocumentBuilder cannot be created which satisfies the configuration
IOException
- If the pathname argument is null or any IO errors happenpublic static void save(DefaultDockingManager manager, OutputStream out, String encoding) throws ParserConfigurationException, IOException
manager
- the docking managerout
- the output streamencoding
- the encoding choice. It would be UTF-8 in default if you call the method without this parameter.
ParserConfigurationException
- if a DocumentBuilder cannot be created which satisfies the configuration
IOException
- If the pathname argument is null or any IO errors happenpublic static void save(DefaultDockingManager manager, OutputStream out, String encoding, PersistenceUtilsCallback.Save callback) throws ParserConfigurationException, IOException
manager
- the docking managerout
- the output streamencoding
- the encoding choice. It would be UTF-8 in default if you call the method without this parameter.callback
- the callback which will be called when saving each element to the XML document.
ParserConfigurationException
- if a DocumentBuilder cannot be created which satisfies the configuration
IOException
- If the pathname argument is null or any IO errors happenpublic static Document save(DefaultDockingManager manager, PersistenceUtilsCallback.Save callback) throws ParserConfigurationException
manager
- the docking managercallback
- the callback which will be called when saving each element to the XML document.
ParserConfigurationException
- if there is any parser configuration issue.public static boolean load(DefaultDockingManager manager, InputStream in) throws ParserConfigurationException, SAXException, IOException
ParserConfigurationException
SAXException
IOException
public static boolean load(DefaultDockingManager manager, InputStream in, PersistenceUtilsCallback.Load callback) throws ParserConfigurationException, SAXException, IOException
ParserConfigurationException
SAXException
IOException
public static boolean load(DefaultDockingManager manager, String fileName) throws ParserConfigurationException, SAXException, IOException
ParserConfigurationException
SAXException
IOException
public static boolean load(DefaultDockingManager manager, String fileName, PersistenceUtilsCallback.Load callback) throws ParserConfigurationException, SAXException, IOException
ParserConfigurationException
SAXException
IOException
public static boolean load(DefaultDockingManager manager, Document document, PersistenceUtilsCallback.Load callback)
manager
- the DefaultDockingManagerdocument
- the document to be loadedcallback
- the load callback to customize reading
public static boolean compare(Document document1, Document document2)
document1
- the layout in document1document2
- the layout in document2
public static boolean compare(Document document1, String layoutName1, Document document2, String layoutName2)
document1
- the layout in document1layoutName1
- the layout name in document1document2
- the layout in document2layoutName2
- the layout name in document2
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |