Esempio n. 1
0
 private void init() {
   viz = new VizThread(this, 50);
   viz.start();
   p = 0;
   a = 0;
   d = 0;
   addMouseListener(this);
   addMouseMotionListener(this);
   listeners = new Vector();
   this.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));
 }
Esempio n. 2
0
 // mouse handling stuff
 public void mouseClicked(MouseEvent e) {
   if (isEnabled()) {
     for (int i = 0; i < listeners.size(); i++) {
       ((ActionListener) listeners.elementAt(i))
           .actionPerformed(
               new AffectButtonActionEvent(this, actionCommand, 1, p, a, d, "no label"));
     }
     viz.clicked(5);
     System.out.println(p + "," + a + "," + d);
   }
 }