use of javax.media.j3d.WakeupOr in project ffx by mjschnie.
the class MouseBehavior method initialize.
/*
* Initializes the behavior.
*/
/**
* <p>
* initialize</p>
*/
public void initialize() {
mouseEvents = new WakeupCriterion[3];
mouseEvents[0] = new WakeupOnAWTEvent(MouseEvent.MOUSE_DRAGGED);
mouseEvents[1] = new WakeupOnAWTEvent(MouseEvent.MOUSE_PRESSED);
mouseEvents[2] = new WakeupOnAWTEvent(MouseEvent.MOUSE_RELEASED);
mouseCriterion = new WakeupOr(mouseEvents);
if (poster == null) {
wakeupOn(mouseCriterion);
} else {
postCriterion = new WakeupOnBehaviorPost(poster, id);
wakeupOn(postCriterion);
}
x = 0;
y = 0;
x_last = 0;
y_last = 0;
}
use of javax.media.j3d.WakeupOr in project ffx by mjschnie.
the class PickMouseBehavior method initialize.
/**
* <p>
* initialize</p>
*/
public void initialize() {
conditions = new WakeupCriterion[1];
conditions[0] = new WakeupOnAWTEvent(Event.MOUSE_DOWN);
wakeupCondition = new WakeupOr(conditions);
wakeupOn(wakeupCondition);
}
use of javax.media.j3d.WakeupOr in project ffx by mjschnie.
the class GraphicsEvents method initialize.
/**
* <p>
* initialize</p>
*/
public void initialize() {
WakeupCriterion[] behaviorPost = new WakeupCriterion[3];
behaviorPost[0] = new WakeupOnBehaviorPost(systemRotate, BEHAVIORDONEPOST);
behaviorPost[1] = new WakeupOnBehaviorPost(systemTranslate, BEHAVIORDONEPOST);
behaviorPost[2] = new WakeupOnBehaviorPost(globalZoom, BEHAVIORDONEPOST);
postCriterion = new WakeupOr(behaviorPost);
WakeupCriterion[] awtCriterion = new WakeupCriterion[2];
awtCriterion[0] = new WakeupOnAWTEvent(Event.MOUSE_DOWN);
awtCriterion[1] = new WakeupOnAWTEvent(Event.MOUSE_UP);
mouseCriterion = new WakeupOr(awtCriterion);
wakeupOn(mouseCriterion);
}
Aggregations