1 package org.catacomb.graph.gui;
2
3 import java.awt.Color;
4
5
6 public class Labellee {
7
8 double[] xpts;
9 double[] ypts;
10 String label;
11 Color color;
12
13
14 double xlab;
15 double ylab;
16
17
18
19 public Labellee(double[] xp, double[] yp, String s, Color c) {
20 update(xp, yp, s, c);
21 }
22
23
24 public void update(double[] xp, double[] yp, String s, Color c) {
25 xpts = xp;
26 ypts = yp;
27 label = s;
28 color = c;
29 }
30
31
32 public void setLabelPosition(double x, double y) {
33 xlab = x;
34 ylab = y;
35 }
36
37
38 public void instruct(Painter p) {
39 p.drawLabel(label, xlab, ylab, color);
40 }
41
42
43
44 }