67 |
} |
} |
68 |
public boolean hasPressState() { return pressState!=null; } |
public boolean hasPressState() { return pressState!=null; } |
69 |
|
|
70 |
|
public void setPressStateByForce(MouseEvent event) { |
71 |
|
pressState = event; |
72 |
|
} |
73 |
|
|
74 |
|
|
75 |
// keeping track of drags for specific object |
// keeping track of drags for specific object |
76 |
private Object accursedObj = null; |
private Object accursedObj = null; |
123 |
return FAST; |
return FAST; |
124 |
} else { |
} else { |
125 |
c.controlPoint(x,y, scale); |
c.controlPoint(x,y, scale); |
126 |
return ANIMATE; |
return c.tryFast(); //ANIMATE; |
127 |
} |
} |
128 |
} |
} |
129 |
} |
} |
140 |
if (c.isChangeable()) |
if (c.isChangeable()) |
141 |
throw new Error("Clicks can't be used to measure of change."); |
throw new Error("Clicks can't be used to measure of change."); |
142 |
else c.controlPoint(x, y, scale); |
else c.controlPoint(x, y, scale); |
143 |
return ANIMATE; |
return c.tryFast(); //ANIMATE; |
144 |
} |
} |
145 |
} |
} |
146 |
} |
} |
179 |
ret = FAST; |
ret = FAST; |
180 |
} |
} |
181 |
else c.controlPoint(x, y, scale); |
else c.controlPoint(x, y, scale); |
182 |
ret = ANIMATE; |
ret = c.tryFast(); //ANIMATE; |
183 |
} |
} |
184 |
} |
} |
185 |
lastEvent = event; |
lastEvent = event; |
279 |
|
|
280 |
public interface Controller { |
public interface Controller { |
281 |
boolean isChangeable(); |
boolean isChangeable(); |
282 |
|
boolean tryFast(); |
283 |
void change(float x, float y); |
void change(float x, float y); |
284 |
void controlPoint(float x, float y, float scale); |
void controlPoint(float x, float y, float scale); |
285 |
void set(Object obj, VobScene oldVS); |
void set(Object obj, VobScene oldVS); |
288 |
public static abstract class AbstractController implements Controller { |
public static abstract class AbstractController implements Controller { |
289 |
public AbstractController() {} |
public AbstractController() {} |
290 |
public abstract boolean isChangeable(); |
public abstract boolean isChangeable(); |
291 |
|
public boolean tryFast() { return isChangeable(); } |
292 |
|
|
293 |
public void change(float x, float y) { } |
public void change(float x, float y) { |
294 |
public void controlPoint(float x, float y, float scale) {} |
if (dbg) p("change"); |
295 |
|
} |
296 |
|
public void controlPoint(float x, float y, float scale) { |
297 |
|
if (dbg) p("controlPoint"); |
298 |
|
} |
299 |
|
|
300 |
// need to be public to be accessible from Python... |
// need to be public to be accessible from Python... |
301 |
public Object obj = null; |
public Object obj = null; |