/**
* DropP5listener demonstrates how to use a DropListener with
* a custom class.
* code by andreas schlegel. http://www.sojamo.de/dropP5
*/
import dropP5.*;
DropP5 dropP5;
MyDropListener m;
void setup() {
size(400,400);
dropP5 = new DropP5(this);
m = new MyDropListener();
dropP5.addDropListener(m);
}
void draw() {
background(0);
}
void dropEvent(DropEvent theDropEvent) {}
// a custom DropListener class.
class MyDropListener extends DropListener {
MyDropListener() {}
void dropEvent(DropEvent theEvent) {
println("a drop event received from MyDropListener");
}
}