@PublicAPI public class MView extends java.lang.Object implements java.io.Externalizable
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.
Constructor and Description |
---|
MView()
Constructor used for deserialization.
|
MView(MViewPane p)
Constructor used for serialization.
|
Modifier and Type | Method and Description |
---|---|
MViewPane |
getMViewPane() |
void |
readExternal(java.io.ObjectInput in)
Restores the viewer's state.
|
void |
writeExternal(java.io.ObjectOutput out)
Saves the viewer's state.
|
public MView()
public MView(MViewPane p)
p
- the viewer bean to serializepublic MViewPane getMViewPane()
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
in
- the stream to read data from in order to restore the objectjava.io.IOException
- if I/O errors occurjava.lang.ClassNotFoundException
- If the class for an object being restored cannot be found.public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- the stream to write the object tojava.io.IOException
- Includes any I/O exceptions that may occur