MultipointTouchEventsExample.java
/*
* Copyright © 2011 Nokia Corporation. All rights reserved.
* Nokia and Nokia Connecting People are registered trademarks of Nokia Corporation.
* Oracle and Java are trademarks or registered trademarks of Oracle and/or its
* affiliates. Other product and company names mentioned herein may be trademarks
* or trade names of their respective owners.
* See LICENSE.TXT for license information.
*/
import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
/*
* Main class MultipointTouchEventsExample.
*
* This application visualizes pointer events. Events generated by
* different pointers have different colors.
*/
public class MultipointTouchEventsExample extends MIDlet {
private ColorCanvas colorCanvas = null;
private Display display;
public MultipointTouchEventsExample() {
this.display = Display.getDisplay(this);
this.colorCanvas = new ColorCanvas(this);
this.colorCanvas.setParent(this);
this.display.setCurrent(this.colorCanvas);
}
protected void destroyApp(boolean unconditional) throws MIDletStateChangeException {
this.display.setCurrent(null);
this.colorCanvas = null;
this.display = null;
}
protected void pauseApp() {
}
protected void startApp() throws MIDletStateChangeException {
}
}