Added spatial selection into statistics; generic method for mouselistener selection type