/*
* Prevent simulated mouse events.
*/
touchStart.preventDefault();
if (dragmode != 0 || actionKeys != null) {
new Timer() {
@Override
public void run() {
TouchScrollDelegate activeScrollDelegate = TouchScrollDelegate
.getActiveScrollDelegate();
/*
* If there's a scroll delegate, check if
* we're actually scrolling and handle it.
* If no delegate, do nothing here and let
* the row handle potential drag'n'drop or
* context menu.
*/
if (activeScrollDelegate != null) {
if (activeScrollDelegate.isMoved()) {
/*
* Prevent the row from handling
* touch move/end events (the
* delegate handles those) and from
* doing drag'n'drop or opening a
* context menu.
*/
touchStart = null;
} else {
/*
* Scrolling hasn't started, so
* cancel delegate and let the row
* handle potential drag'n'drop or
* context menu.
*/
activeScrollDelegate
.stopScrolling();
}
}
}
}.schedule(TOUCHSCROLL_TIMEOUT);
if (contextTouchTimeout == null
&& actionKeys != null) {
contextTouchTimeout = new Timer() {
@Override
public void run() {
if (touchStart != null) {
showContextMenu(touchStart);