1
2
3
4
5
6
7
8
9
10
11 package edu.uci.ics.jung.visualization.layout;
12
13 import java.awt.geom.Point2D;
14 import java.io.IOException;
15 import java.io.Serializable;
16
17 import edu.uci.ics.jung.algorithms.layout.Layout;
18
19
20
21
22
23
24
25
26 public interface PersistentLayout<V, E> extends Layout<V,E> {
27
28 void persist(String fileName) throws IOException;
29
30 void restore(String fileName) throws IOException, ClassNotFoundException;
31
32 void lock(boolean state);
33
34
35
36
37 @SuppressWarnings("serial")
38 static class Point implements Serializable {
39 public double x;
40 public double y;
41 public Point(double x, double y) {
42 this.x=x;
43 this.y=y;
44 }
45 public Point(Point2D p) {
46 this.x = p.getX();
47 this.y = p.getY();
48 }
49 }
50
51 }