Package chemaxon.marvin.beans
Class MView
java.lang.Object
chemaxon.marvin.beans.MView
- All Implemented Interfaces:
Externalizable
,Serializable
Java independent serialization of the viewer bean. Experimental!
The Swing and AWT ancestor classes of MViewPane (like JComponent) have different serialVersionUID values in different Java versions, thus its simple serialization and deserialization with another Java version may not work. The workaround is to serialize class MView instead, which only extends Object and has a fixed serialVersionUID.
- Since:
- Marvin 3.5, 11/02/2004
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Restores the viewer's state.void
Saves the viewer's state.
-
Constructor Details
-
MView
public MView()Constructor used for deserialization. -
MView
Constructor used for serialization.- Parameters:
p
- the viewer bean to serialize
-
-
Method Details
-
getMViewPane
-
readExternal
Restores the viewer's state.- Specified by:
readExternal
in interfaceExternalizable
- Parameters:
in
- the stream to read data from in order to restore the object- Throws:
IOException
- if I/O errors occurClassNotFoundException
- If the class for an object being restored cannot be found.
-
writeExternal
Saves the viewer's state.- Specified by:
writeExternal
in interfaceExternalizable
- Parameters:
out
- the stream to write the object to- Throws:
IOException
- Includes any I/O exceptions that may occur
-