I am trying to optimize a webapplication for ipad use. I am now implementing the user interaction and related action / feedback. I have the following idea and was wondering if it is possible to achieve this.
Detect the user-interaction with javascript
Determine what element is touched.
Determine the movement.
Communicate with Wicket
Send the movement to the touched element if it implements a certain interface, i.e., touchable.
The element reacts to the user-interaction by implementing, in the interface, defined methods.
An example of a touchable element could be the following:
public class MyPanel extends Panel implements TouchableElement
@Override
public void react(int x, int y, int movement) {
....
}
}
Could someone tell me if this is possible and/or give me some tips, drawbacks et cetera. Every piece of feedback is helpfull.