// (c) Matti J. Katila package org.fenfire.util; import org.nongnu.libvob.VobScene; import java.awt.event.*; import java.util.*; /** XXX */ public class ControlBinding { public static boolean dbg = false; private static void p(String s) { System.out.println("ControlBinding:: "+s); } static private boolean FAST = true; static private boolean ANIMATE = false; public ControlBinding() { ; // nothing } // -- Methods to handle events wisely. private MouseEvent pressState = null; public void removePressState() { pressState = null; lastEvent=null;} public boolean hasPressState() { return pressState!=null; } // for keeping change of dragging. private MouseEvent lastEvent; public boolean handleEvent(Object forObject, MouseEvent event, VobScene oldVS) { if (event.getID() == event.MOUSE_PRESSED) { pressState = event; return FAST; } float x = event.getX(); float y = event.getY(); if (event.getID() == event.MOUSE_WHEEL) { if (dbg) p("It's wheel!"); for (int i=0; i