Esempio n. 1
0
 public BotMouseListener(Bot bot) {
   this.mouseEnabled = true;
   this.canvas = bot.getCanvas();
   this.defaultMouseListeners = canvas.getMouseListeners();
   this.defaultMouseMotionListeners = canvas.getMouseMotionListeners();
   this.defaultMouseWheelListeners = canvas.getMouseWheelListeners();
   this.mousePoint = new Point(-1, -1);
   addBotListeners();
 }
Esempio n. 2
0
 /** Backup old event handlers for restore. */
 final void backupGui() {
   canvasKeyListeners = canvas.getKeyListeners();
   windowKeyListeners = window.getKeyListeners();
   ijKeyListeners = IJ.getInstance().getKeyListeners();
   canvasMouseListeners = canvas.getMouseListeners();
   canvasMouseMotionListeners = canvas.getMouseMotionListeners();
   windowMouseWheelListeners = window.getMouseWheelListeners();
   clearGui();
 }