1    
2    import java.io.*;
3    import java.awt.geom.*;
4    
5    public class SaveablePoint extends Point2D.Double implements Serializable {
6    
7      private static final long serialVersionUID = Version.getSUID();
8    
9      public SaveablePoint(double x, double y) {
10       super(x,y);
11     }
12   
13     public SaveablePoint() {
14       super();
15     }
16   
17     private void readObject(java.io.ObjectInputStream stream)
18         throws java.io.IOException,java.lang.ClassNotFoundException {
19       stream.defaultReadObject();
20       setLocation(stream.readDouble(),stream.readDouble());
21     }
22   
23     private void writeObject(java.io.ObjectOutputStream stream)
24         throws java.io.IOException,java.lang.ClassNotFoundException {
25       stream.defaultWriteObject();
26       stream.writeDouble(getX());
27       stream.writeDouble(getY());
28     }
29   }
30