1
2
3
4
5
6
7
8
9
10 package edu.uci.ics.jung.visualization.annotations;
11
12 import java.awt.Paint;
13 import java.awt.geom.Point2D;
14
15
16
17
18
19
20
21
22 public class Annotation<T> {
23
24 protected T annotation;
25 protected Paint paint;
26 protected Point2D location;
27 protected Layer layer;
28 protected boolean fill;
29 public static enum Layer { LOWER, UPPER }
30
31
32
33 public Annotation(T annotation, Layer layer, Paint paint,
34 boolean fill, Point2D location) {
35 this.annotation = annotation;
36 this.layer = layer;
37 this.paint = paint;
38 this.fill = fill;
39 this.location = location;
40 }
41
42
43
44 public T getAnnotation() {
45 return annotation;
46 }
47
48
49
50 public void setAnnotation(T annotation) {
51 this.annotation = annotation;
52 }
53
54
55
56 public Point2D getLocation() {
57 return location;
58 }
59
60
61
62 public Layer getLayer() {
63 return layer;
64 }
65
66
67
68 public void setLayer(Layer layer) {
69 this.layer = layer;
70 }
71
72
73
74 public void setLocation(Point2D location) {
75 this.location = location;
76 }
77
78
79
80 public Paint getPaint() {
81 return paint;
82 }
83
84
85
86 public void setPaint(Paint paint) {
87 this.paint = paint;
88 }
89
90
91
92 public boolean isFill() {
93 return fill;
94 }
95
96
97
98 public void setFill(boolean fill) {
99 this.fill = fill;
100 }
101
102
103 }