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 public Annotation(T annotation, Layer layer, Paint paint,
32 boolean fill, Point2D location) {
33 this.annotation = annotation;
34 this.layer = layer;
35 this.paint = paint;
36 this.fill = fill;
37 this.location = location;
38 }
39
40
41
42 public T getAnnotation() {
43 return annotation;
44 }
45
46
47
48 public void setAnnotation(T annotation) {
49 this.annotation = annotation;
50 }
51
52
53
54 public Point2D getLocation() {
55 return location;
56 }
57
58
59
60 public Layer getLayer() {
61 return layer;
62 }
63
64
65
66 public void setLayer(Layer layer) {
67 this.layer = layer;
68 }
69
70
71
72 public void setLocation(Point2D location) {
73 this.location = location;
74 }
75
76
77
78 public Paint getPaint() {
79 return paint;
80 }
81
82
83
84 public void setPaint(Paint paint) {
85 this.paint = paint;
86 }
87
88
89
90 public boolean isFill() {
91 return fill;
92 }
93
94
95
96 public void setFill(boolean fill) {
97 this.fill = fill;
98 }
99 }