Do not use getView2D in the examples

This is finally done without typecasting, but by keeping a reference to the created View2D object.