Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/memoire/dja/DjaControl.java


1   /**
2    * @modification $Date: 2001/12/03 16:28:08 $
3    * @statut       unstable
4    * @file         DjaControl.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 DjaControl
24         extends DjaManipulator
25  {
26    private int p_;
27    private int o_;
28    private int x_;
29    private int y_;
30  
31    private DjaObject parent_;
32  
33    public DjaControl(DjaObject _parent,int _p,int _o,int _x,int _y)
34    {
35      p_=_p;
36      o_=_o;
37      x_=_x;
38      y_=_y;
39      parent_=_parent;
40    }
41  
42    public final DjaOwner getOwner()
43    { return getParent(); }
44  
45    public int getP() { return p_; }
46    public int getO() { return o_; }
47    public int getX() { return x_; }
48    public int getY() { return y_; }
49  
50    public DjaObject getParent() { return parent_; }
51  
52    public void paint(Graphics _g)
53    {
54      int x=getX();
55      int y=getY();
56  
57      _g.setColor(controlsColor);
58      _g.fillRect(x-2,y-2,5,5);
59    }
60  
61    public void draggedTo(int _x,int _y) // abstract
62    {
63    }
64  }
65