Source code: com/memoire/dja/DjaHandle.java
1 /**
2 * @modification $Date: 2001/12/03 16:28:08 $
3 * @statut unstable
4 * @file DjaHandle.java
5 * @version 0.36
6 * @author Guillaume Desnoix
7 * @email guillaume@desnoix.com
8 * @license GNU General Public License 2 (GPL2)
9 * @copyright 1998-2001 Guillaume Desnoix
10 */
11
12 package com.memoire.dja;
13
14 import com.memoire.fu.*;
15 import com.memoire.dnd.*;
16 import com.memoire.bu.*;
17 import com.memoire.dja.*;
18 import com.memoire.mst.*;
19
20
21 import java.awt.*;
22
23 public class DjaHandle
24 extends DjaManipulator
25 {
26 private int x_;
27 private int y_;
28 private int o_;
29 private DjaObject parent_;
30
31 public DjaHandle(DjaObject _parent,int _o,int _x,int _y)
32 {
33 o_=_o;
34 x_=_x;
35 y_=_y;
36 parent_=_parent;
37 }
38
39 public final DjaOwner getOwner()
40 { return getParent(); }
41
42 public int getX() { return x_; }
43 public int getY() { return y_; }
44 public int getO() { return o_; }
45
46 public DjaObject getParent() { return parent_; }
47
48 public void paint(Graphics _g)
49 {
50 int x=getX();
51 int y=getY();
52
53 _g.setColor(handlesColor);
54 _g.fillRect(x-2,y-2,5,5);
55 }
56 }