public void innerInitialize(BA pBA, String pEventName, boolean pKeepOldObject) {
if (!pKeepOldObject) {
setObject(new osas.track24.intermaphics.Viewport2DView(pBA.context));
detector = new GestureDetector(getObject(), mHandler);
detector.setOnDoubleTapListener(getObject());
getObject().setOnTouchListener(new OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
detector.onTouchEvent(event);
int count = event.getPointerCount();
float[] x = new float [count];
float[] y = new float [count];
int[] id = new int[count];
for (int i = 0; i < count; ++i) {
x = event.getX(i);
y = event.getY(i);
id = event.getPointerId(i);
}
switch (event.getAction() & MotionEvent.ACTION_MASK) {
case MotionEvent.ACTION_DOWN:
case MotionEvent.ACTION_POINTER_DOWN:
ba.raiseEvent(this, eventName + "_touch",x,y,id,MotionEvent.ACTION_POINTER_DOWN);
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_POINTER_UP:
ba.raiseEvent(this, eventName + "_touch",x,y,id,MotionEvent.ACTION_POINTER_UP);
case MotionEvent.ACTION_MOVE:
ba.raiseEvent(this, eventName + "_touch",x,y,id,MotionEvent.ACTION_MOVE);
}
return true;
//
}
});
pKeepOldObject=true; // now when super.innerInitialize(pBA, pEventName, pKeepOldObject); is executed the new object will be kept
}
super.innerInitialize(pBA, pEventName, pKeepOldObject);
}