Example usage for javax.media.j3d WakeupOnAWTEvent WakeupOnAWTEvent

List of usage examples for javax.media.j3d WakeupOnAWTEvent WakeupOnAWTEvent

Introduction

In this page you can find the example usage for javax.media.j3d WakeupOnAWTEvent WakeupOnAWTEvent.

Prototype

public WakeupOnAWTEvent(long eventMask) 

Source Link

Document

Constructs a new WakeupOnAWTEvent using Ored EVENT_MASK values.

Usage

From source file:FourByFour.java

public void initialize() {
    x = 0;//from   ww w . j av  a 2s .c o m
    y = 0;
    x_last = 0;
    y_last = 0;
    x_angle = 0;
    y_angle = 0;
    x_factor = .02;
    y_factor = .02;

    mouseEvents = new WakeupCriterion[2];
    mouseEvents[0] = new WakeupOnAWTEvent(MouseEvent.MOUSE_DRAGGED);
    mouseEvents[1] = new WakeupOnAWTEvent(MouseEvent.MOUSE_PRESSED);
    mouseCriterion = new WakeupOr(mouseEvents);
    wakeupOn(mouseCriterion);
}