update for processing2.x

**1.use registerMethod to replace registerDispose and registerMouseEvent and registerKeyEvent.**
### new code:
```java
p.registerMethod("dispose", this);
p.registerMethod("mouseEvent", this);
p.registerMethod("keyEvent", this);
```
### old code
```java
p.registerDispose(this);
p.registerMouseEvent(this);
p.registerKeyEvent(this);
```
**2.use processing inner Event class to replace awt Event class.**
### new code:
```java
import processing.event.KeyEvent;
import processing.event.MouseEvent;
```
### old code:
```java
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
```